Comments (2)
You can achieve your goal as follows:
- Open
%AppData%/Roaming/Notepad++/langs.xml
in any text editor. - Search for
language name="json
in the document. You should find an XML element that looks like this:
<Language name="json" ext="json" commentLine="" commentStart="" commentEnd="">
<Keywords name="instre1">false null true</Keywords>
<Keywords name="instre2">@id @context @type @value @language @container @list @set @reverse @index @base @vocab @graph</Keywords>
</Language>
- Delete the value inside the
ext
attribute of theLanguage
tag, so that the opening tag now looks like<Language name="json" ext="" commentLine="" commentStart="" commentEnd="">
. This will make it so that the normal JSON lexer is no longer associated with thejson
file extension. - If a
Language name="json5"
element is already below theLanguage name="json"
element, delete thejson5
element. - Paste in the following between the
Language name="json"
element and whatever element came after it:
<Language name="json5" ext="json5 jsonc json" commentLine="//" commentStart="/*" commentEnd="*/">
<Keywords name="instre1">false null true</Keywords>
<Keywords name="instre2">@id @context @type @value @language @container @list @set @reverse @index @base @vocab @graph</Keywords>
</Language>
This will cause the json5
lexer to be associated with json5
, json
, and jsonc
file extensions.
6. Reopen Notepad++, and the changes will be applied. Note that this will not apply automatically to any files that you already had open, so you will need to manually change any files you already had open. Notepad++ remembers the lexer it was using for a previously open file, and applies that instead of the default lexer for its extension.
from notepad-plus-plus.
I guess this method does work. It will have to do as a workaround for now, thank you!
That aside - unless someone else deems it better to do so, I think I will leave this open since this post was originally made wrt the Style Configurator not having the option, but this is definitely a good solution as-is.
from notepad-plus-plus.
Related Issues (20)
- Why you don't stand with people of gaze? HOT 1
- hyperlink [bug] HOT 2
- Updater windows do not pop up on top
- Potential crash when crossing Notepad++ filebuffer 2GB threshold
- BUG: In window User-Defined some Styler buttons doesn't have the right position.
- Errors while installing on Windows Server HOT 1
- parenthesys missing in debug info HOT 1
- [BUG] save as admin fails sometimes - filebuffer flushing fail HOT 14
- [Feature request] JSON5 style support HOT 4
- [Feature request] When automatically commenting selected block of XML, alter nested XML comment declarations HOT 2
- [BUG] Find window: Checkboxes working if clicked in blank space. HOT 22
- [BUG] WARNING - filebuffer flushing fail! HOT 1
- [Feature request] Simplify Update Process HOT 1
- Lost session of unsaved files HOT 5
- Notepad++ Theme keeps getting reset every time
- [BUG] <Current line highlighting not holding between restrating program>
- [BUG] Python, use spaces setting is overwritten (or not saved) if you close then open Notepad++ HOT 2
- Copy Link Under Caret Shortcut Key Needed HOT 2
- Improved support for importing exporting backup restoring settings and configuration and plugins and extensions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notepad-plus-plus.