function list questions



  • It would be nice if the custom function list definition allowed more customization. It is very primitive.

    1. Is there a way to eliminate multiple adjacent white-space within the function list definition?

    When I have written a function with many parameters such that the parameters are on separate lines for readability and I choose to show the parameters in the function list, all of the white-space is preserved and shown and the formatting is very bad. It would be nice to have an option to collapse white-space to a single space.

    Even better, it would be nice to have the name of the function itself on the main line and have its parameters be revealed in a lower level of the tree.

    1. I don’t understand what ‘commentExpr’ is doing. If I don’t include a ‘commentExpr’ then my custom function list does not work. When I do include it, it seems to have no effect. It would be nice if comments were handled properly as subprograms with comments don’t show up in the list.

    2. My language permits nested subroutines. Is there a way that the nesting can optionally be preserved in the function list tree similar to how function are nested in a ‘class’?

    3. My language has four kinds of subprogram types. Is there a way to be able to distinguish them with a special notation or icon rather than have to include the language keyword in the function list?

    4. My language has multiple modifier keywords that can be used in front of a subprogram definition: like static, abstract, etc. Is there a way to be able to distinguish various kinds of subprograms with icons?

    I think many of these are feature requests, but since the documentation is very sparse, I’m not sure I am aware of all the capabilities.



  • @Matt-Borchers said in function list questions:

    It would be nice if the custom function list definition allowed more customization. It is very primitive.

    “[This software] is very primitive” is not a good way to build a good rapport with the members of a Community where you are going for help.

    I personally find the function list feature highly advanced for a text editor; a dedicated IDE for a particular language, or one that has millions of dollars poured into R&D to dedicate serious resources into making customizations for multiple languages, might have more features available… but that’s not describing Notepad++.

    1. Is there a way to eliminate multiple adjacent white-space within the function list definition?

    When I have written a function with many parameters such that the parameters are on separate lines for readability and I choose to show the parameters in the function list, all of the white-space is preserved and shown and the formatting is very bad.

    Usually when I am defining custom functionList definitions, I don’t include the parameter list in the function name, because parameter lists are not part of the name. As such, extra spacing in a parameter list doesn’t bother me, because it doesn’t show in the functionList panel.

    It would be nice to have an option to collapse white-space to a single space.

    The functionName parser was designed as a search-and-match, not a search-and-replace. Sorry. It would take significant redesign

    Even better, it would be nice to have the name of the function itself on the main line and have its parameters be revealed in a lower level of the tree.

    The Function List feature was designed as a listing of the function names, and wasn’t meant to clean up function prototypes to display in whatever arbitrary format you desire.

    1. I don’t understand what ‘commentExpr’ is doing. If I don’t include a ‘commentExpr’ then my custom function list does not work. When I do include it, it seems to have no effect. It would be nice if comments were handled properly as subprograms with comments don’t show up in the list.

    If the function name is matched inside of a commentExpr’s match, it will not include that function name in the functionList panel, because that function has been commented out.

    1. My language permits nested subroutines. Is there a way that the nesting can optionally be preserved in the function list tree similar to how function are nested in a ‘class’?

    The Function List feature only provides one level of nesting: a single “class” around one or more “functions”.

    1. My language has four kinds of subprogram types. Is there a way to be able to distinguish them with a special notation or icon rather than have to include the language keyword in the function list?

    Since it’s a search-and-match, not a search-and-replace, then no, not as far as I’m aware. Sorry.

    1. My language has multiple modifier keywords that can be used in front of a subprogram definition: like static, abstract, etc. Is there a way to be able to distinguish various kinds of subprograms with icons?

    Since it’s a search-and-match, not a search-and-replace, then no, not as far as I’m aware. Sorry.

    I think many of these are feature requests, but since the documentation is very sparse, I’m not sure I am aware of all the capabilities.

    If you look in the FAQ section, you will find there is a FAQ dedicated to how to make feature requests (though I suggest changing the way you phrase things, because starting a feature request with an insult is likely to get you completely ignored in the issue tracker). There is also another FAQ with practical tips on the structure of the Function List file and what each of the terms in that file mean.

    And the npp-user-manual.org team is always happy to entertain ideas for improving the documentation, so if you have practical suggestions for how to improve the user manual (rather than vague “lack of documentation” assertions), let us know. (The online user manual gives a link to the usermanual repo, where you can put in issues or make pull requests.)




Log in to reply