notepad-plus-plus / notepad-plus-plus/notepad-plus-plus
Cannot register custom file extension for JSON5 formatting
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 29.4k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Issue
Right now, JSON5 is not available in the Style Configurator, and so adding custom file extensions to it is not possible this way.
While this isn't a serious problem by any means, it is marginally annoying in that I have a custom file format for a project I am currently developing which uses JSON5/JSONC formatting, but has a different file extension. Ideally I would like this extension to open with JSON5 formatting, not standard JSON.
Current Workaround
Adding this extension to the base JSON format works, save for the fact that comments are flagged as errors.
I can edit the error colors of JSON in the Style Configurator to include a comment-ish color so that it at least looks okay, but this isn't perfect because then genuine errors look like comments and don't stick out quite so much.
Debug Information
Notepad++ v8.6.5 (64-bit)
Build time : Mar 29 2024 - 17:04:43
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
Periodic Backup : ON
OS Name : Windows 10 Enterprise (64-bit
OS Version : 22H2
OS Build : 19045.4291
Current ANSI codepage : 1252
Plugins :
mimeTools (3.1)
NppConverter (4.6)
NppExport (0.4)
NPPJSONViewer (2.0.7)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the Style Configurator registers language-specific file extensions and inspect the JSON5/JSONC language configuration. Done means a custom extension can be assigned JSON5 formatting and comments remain distinct from genuine errors; verify the behavior in the Style Configurator on Windows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100