blu3mania / npp-papyrus

Notepad++ plugin to provide Papyrus scripting language support to Notepad++, such as syntax highlighting with automatic recognition of class names/functions/properties, keywords matching, and hyperlinks to referenced scripts. It also comes with a compiler that can provide compilation errors in a separate list window, as well as inline annotation and indication where errors are reported, plus support anonymization of compiled .pex files.
GNU General Public License v3.0
27 stars 7 forks source link

Dark mode support #35

Closed comiluv closed 2 years ago

comiluv commented 2 years ago

Enabling dark mode results in undesirable text and background coloring

화면 캡처 2022-09-04 234650
blu3mania commented 2 years ago

This is unfortunately how Lexer plugins work in Notepad++. NPP only allows one style configuration from the plugin, regardless what theme user chooses. If you want I can open an enhancement request against Notepad++ but I have a feeling it will not be addressed judging by the sheer amount of issues reported there and what happened to my previous enhancement request.

My suggestion is to use NPP's Style Configurator to manually configure colors to your like. Doing so will overwrite Papyrus.xml. If you are not sure whether you will stick to one theme or not, you can keep a copy of your current one as light mode config, and save a copy of your new config after you are satisfied as dark mode config. In the future, depending on the theme you choose, you can then manually copy the corresponding Papyrus.xml to Notepad++'s plugin config folder, which by default is %APPDATA%\Notepad++\plugins\config.

comiluv commented 2 years ago

How about a separate plugin called npp-papyrus-dark as an option for NPP's default dark mode

blu3mania commented 2 years ago

Hmm, that would be too much just for a separate set of style configuration. I could include a separate config file in the installation package and update configuration guide to specify how to manually install it.

blu3mania commented 1 year ago

Posting this so others can see if they are having similar question.

Since v0.5 separate configurations for light and dark mode were included in the package, and in v1.0 it was further enhanced to provide a new menu under Advanced menu to copy the corresponding default lexer styling configuration based on currently selected mode (light or dark). It does still require restarting Notepad++ after copying the config, but at least most of the workflow is now automated and requires minimal user actions.

Unfortunately there isn't a fully automated solution due to Notepad++ limitation. I logged https://github.com/notepad-plus-plus/notepad-plus-plus/issues/12190 and provided a PR https://github.com/notepad-plus-plus/notepad-plus-plus/issues/12290 but it was deemed that the changes would make NPP more complex and harder to maintain. So, for now we will have to live with the limitation.