Autocompletion and plugin
-
Hi
I have the autocompletion working but i would like to add new keywords to the list via C# plugin. Is this possible? I did quick search on ScintillaGateway using word auto but there was only some auto complete stuff therethx!
-
Off hand, I’d say no. You can add keywords to the predefined language via the
Settings->Style Configurator...->Language->C#->
(category) and then add them to the User Defined Keywords that will show up when you select different categories, likeInstruction Word, Type Word
, or any one of theUser Keywords 1-8
.This would probably be your best easiest bet, otherwise, your plugin will have to be your own lexer you will need to create. I may be wrong, but other than EnhanceAnyLexer, which only adds the ability to add color syntax highlighting via a regex to search the document, making it a native thing would require the above mentioned methods. Someone will correct me if I’m wrong. :-)
-
@General-Coder said in Autocompletion and plugin:
I have the autocompletion working but i would like to add new keywords to the list via C# plugin. Is this possible? I did quick search on ScintillaGateway using word auto but there was only some auto complete stuff there
Your question is confusing. You mention autocompletion and say you want to add new keywords, but scintilla only told you something about autocompletion: that makes little sense the way it’s actually phrased. The two ways I have of interpreting that:
- (like @Lycan-Thrope supposed) You have autocompletion, and you now want to also add your words to the syntax highlighing. Essentially, as he said, you’d have to either have your plugin be a full lexer plugin, or you’d have to separately add your user-defined keywords in the normal way
- You have normal autocompletion working, using the standard Notepad++ autoCompletion defeinition files for C# (and maybe even figured out how to add your own keywords into that existing autoCompletion definition), but maybe you are asking if your plugin could alternately add keywords to the auto-completion list without having to edit Notepad++'s config file for C#: yes, it can, using the “auto complete stuff there” that you found in the Scintilla Documentation. There are multiple open-source Notepad++ plugins which add their own words to the auto-completion, so you could look at their source code and see how they add their words to the autoCompletion, if the Scintilla Documentation isn’t sufficient for you to understand what needs to be done.
If neither of those are answers to what you were trying to ask, you may have to clarify your question.
-
thanks for the replies!
sorry if my question is unclear. to put my question as few words as possible it is this:
can you add more keywords to autocompletion via plugin?
i will see if I can find some source codes for this. (The plugin is written in C#)
thx