• Login
Community
  • Login

Function List: Is file extension of User Defined Language still working?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
16 Posts 5 Posters 1.1k 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.
  • D
    dinkumoil @donho
    last edited by dinkumoil Oct 9, 2020, 7:38 AM Oct 9, 2020, 7:37 AM

    @donho , @Michael-Vincent

    When I’ve created a NppExec script UDL and also a function list parser, I noticed that it is necessary to have an UDL in order to get a working function list. It seems the function list parser is not triggered by the file’s extension but by the language type which is, of course, only present if one has an UDL.

    @Michael-Vincent

    If you are interested in how to activate NppExec syntax highlighting and function list parser automatically when the file npes_saved.txt is loaded with Notepad++, have a look at >> this comment << in the NppExec bug tracker.

    1 Reply Last reply Reply Quote 3
    • D
      donho
      last edited by Oct 9, 2020, 3:53 PM

      @dinkumoil

      . It seems the function list parser is not triggered by the file’s extension but by the language type

      I’m doing this ticket:
      https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4896

      With ext it makes new implementation more complex so less easy to maintain. Since ext part doesn’t work, I will remove this part.

      M 1 Reply Last reply Oct 9, 2020, 5:43 PM Reply Quote 1
      • M
        MAPJe71 @donho
        last edited by Oct 9, 2020, 5:43 PM

        @donho see also #298 and Function List known issue #4

        D 1 Reply Last reply Oct 9, 2020, 7:44 PM Reply Quote 1
        • D
          donho @MAPJe71
          last edited by Oct 9, 2020, 7:44 PM

          @MAPJe71
          Hmm… I think the file ext to apply function list is not necessary anymore. Users can set several exts in UDL, and once the file is recognized as UDL, function list will work on it if its parser is present.

          M 1 Reply Last reply Oct 9, 2020, 8:30 PM Reply Quote 1
          • A
            ArkadiuszMichalski
            last edited by Oct 9, 2020, 8:21 PM

            So to have working list we need two things, a parser and a UDL file (even without styles)?

            1 Reply Last reply Reply Quote 0
            • A
              ArkadiuszMichalski
              last edited by Oct 9, 2020, 8:27 PM

              Although in the case of UDL it’s obvious. There was no question.

              1 Reply Last reply Reply Quote 0
              • M
                MAPJe71 @donho
                last edited by Oct 9, 2020, 8:30 PM

                @donho
                The problem of FL ext not working is that it requires an UDL i.e. you can’t use an FL parser without an UDL.

                1 Reply Last reply Reply Quote 0
                • M
                  MAPJe71
                  last edited by Oct 9, 2020, 8:38 PM

                  @ArkadiuszMichalski appearently beat me to it.
                  You need both FL parser and UDL (can be a “dummy” i.e. with name and extension but without styles) because FL ext does not work.

                  1 Reply Last reply Reply Quote 0
                  • M
                    MAPJe71
                    last edited by Oct 9, 2020, 8:56 PM

                    Furthermore, for every UDL FunctionList parser deployed with Notepad++ you would also have to include the UDL definition in order for those parsers to work.

                    1 Reply Last reply Reply Quote 0
                    • D
                      donho
                      last edited by donho Oct 10, 2020, 1:06 AM Oct 10, 2020, 1:05 AM

                      So to have working list we need two things, a parser and a UDL file (even without styles)?

                      Yes. Set an empty UDL with the exts + the name via the UDL dialog - it took me 5 seconds only.

                      Furthermore, for every UDL FunctionList parser deployed with Notepad++ you would also have to include the UDL definition in order for those parsers to work.

                      Not necessary. A simple explanation in npp-user-manual will be enough.

                      1 Reply Last reply Reply Quote 0
                      • A
                        ArkadiuszMichalski
                        last edited by Oct 10, 2020, 9:21 AM

                        @donho But few UDL is not problem, what if someone has to make a lot of them and gets a trash on the menu?
                        https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4896#issuecomment-706421610

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