Closed Vinc3r closed 3 years ago
Hi, @Vinc3r JSTool for Visual Studio Code won't change language setting that hard. If you say it is a JavaScript file, it will keep to be a JavaScript file after format. I'll try to implement this logic on NPP (if its API allow me to do this).
(sorry I haven't made the precision that this was on Notepad++ [actually I haven't noticed until now that you also dev for VSCode!])
thanks
This is relevant to JSON language so changing settings in JavaScript won't do anything https://github.com/notepad-plus-plus/notepad-plus-plus/issues/8035
You could try to clone styles from JavaScript to JSON like I'm proposing here https://github.com/sunjw/jstoolnpp/issues/89#issuecomment-598348845
or just modify the file directly using this file %USERPROFILE%\AppData\Roaming\Notepad++\stylers.xml
ok, thanks for the feedback!
Since few versions JSTools try to "guess JSON content and set document language type according to it" (from the changelog). It could be great to let user choose if he wants this autoset or not.
As example, I use a kind-of custom json, using .patch extension, but I want javascript coloring instead of JSON, so I set up Notepad++ as this:
Unfortunatly each time I do a JSFormat operation, I loose this setup.
PS: thanks for your nice plugin by the way ;)