Community
    • Login

    Autocompletion and plugin

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 69 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • General CoderG
      General Coder
      last edited by

      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 there

      thx!

      Lycan ThropeL PeterJonesP 2 Replies Last reply Reply Quote 0
      • Lycan ThropeL
        Lycan Thrope @General Coder
        last edited by Lycan Thrope

        @General-Coder ,

        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, like Instruction Word, Type Word, or any one of the User 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. :-)

        1 Reply Last reply Reply Quote 1
        • PeterJonesP
          PeterJones @General Coder
          last edited by

          @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:

          1. (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
          2. 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.

          1 Reply Last reply Reply Quote 2
          • General CoderG
            General Coder
            last edited by

            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.

            thx

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors