nppsnippets icon indicating copy to clipboard operation
nppsnippets copied to clipboard

Add support for UDL

Open EuropeanDeveloper opened this issue 2 years ago • 4 comments

Notepad++ supports creation of custom syntax-highlighting files, so-called UDL (User Defined Languages). If user has such file created, this language can't be used as Language for doc when snippet starts a new document. UDL can't be also set as library language.

EuropeanDeveloper avatar May 20 '22 08:05 EuropeanDeveloper

I have considered this, especially since Markdown is UDL. But so far I haven't been able to find a reliable way to support UDL. The main problem is to find out what definitions are installed and how to link that to a library.

ffes avatar May 22 '22 10:05 ffes

As an alternative solution (or as a feature), it would be nice if NPPSnippets had a parameter that switches the visibility of snippet libraries depending on the syntax of the current file. I installed custom UDL for SPARQL files, but after creating library I can't get access to this - there aren't SPARQL in "Language for doc:" list

sunvis0r avatar Aug 16 '22 15:08 sunvis0r

Could you be a bit more specific what you mean?

There is no way that I am aware of to get the UDL languages that are installed. How should I add them to the list of languages?

ffes avatar Aug 16 '22 16:08 ffes

This is not a direct solution, but it might help. As I understand, two things depend on the choice of syntax (including UDL): which libraries will be displayed and which syntax will be (for a new document). If you can't get a list of installed UDLs, you can improve one of the corollaries of this: allow the user to choose which libraries should be displayed

sunvis0r avatar Aug 17 '22 11:08 sunvis0r