Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request fro more keyword categories #22

Open
dizietsma opened this issue Mar 2, 2022 · 3 comments
Open

Request fro more keyword categories #22

dizietsma opened this issue Mar 2, 2022 · 3 comments
Labels
dependencies Pull requests that update a dependency file

Comments

@dizietsma
Copy link

dizietsma commented Mar 2, 2022

Other user defined versions of Papyrus language I have found for notepad++ had more categorys of keywords (although they were not able to be configured from the style configurator of course).
It would be cool to have two or three extra user sets of keywords available in the style configurator. Personally I would like to have a different colour for SKSE/F4SE functions etc.
I tried editing the xml file but I had no joy, I read online that the lexer itself (dll) must support the keywrod categories?

diziet

edit: apparently I can't spell:)

@blu3mania
Copy link
Owner

blu3mania commented Mar 3, 2022

@dizietsma Yes, it requires lexer to recognize these configured keywords and assign "states" to them, which map to configured word styles in the XML. In theory, it seems this can be simply done by adding new keywords categories in the config and let lexer read and parse them. However, unfortunately it is not that simple. For some reason NPP can only support 9 word lists, i.e. instre1, instre2, type1 to 7. In this plugin, 8 of them are already defined so at most one can be used for user defined keywords, but I want to reserve it for potential future use.

I am not sure why NPP has such a limit. From its code comments it seems there is a defined constant that limits the # of keyword lists, and that constant used to be 8 (the numbering is zero based, thus giving 9). However, it was increased to 30 in 2012 but somehow the code is still hardcoded to only support 9 lists.

@blu3mania blu3mania added the dependencies Pull requests that update a dependency file label Mar 3, 2022
@blu3mania
Copy link
Owner

blu3mania commented Mar 3, 2022

Dependency on NPP enhancement notepad-plus-plus/notepad-plus-plus#11330.

@dizietsma
Copy link
Author

Thanks for the explanation and your raising it on the NP++ issues:)
In the meantime, I'm enjoying the plugin, especially the auto-detection of SkyrimSE or F4 scripts.

diziet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants