-
-
Couldn't load subscription status.
- Fork 5.9k
Support for JSONC #8500
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
Support for JSONC #8500
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8500 +/- ##
==========================================
- Coverage 90.01% 89.97% -0.04%
==========================================
Files 149 149
Lines 167978 167329 -649
==========================================
- Hits 151212 150562 -650
- Misses 16766 16767 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
Don't you need a ftplugin with jsonc? json has one: json.vim. Also you would need to adjust runtime/filetype.vim to let Vim know, when to apply the jsonc filetype. And when you add a new filetype to filetype.vim, please also add a test to src/testdir/test_filetype.vim |
new file: runtime/ftplugin/jsonc.vim modified: runtime/filetype.vim modified: runtime/syntax/jsonc.vim modified: src/testdir/test_filetype.vim
Done. |
|
Hi @brammool I think 3 files are missing from commit acbb4b5
Looks like it is only including: `runtime/filetype.vim` and
`src/testdir/test_filetype.vim` However, there should also be 3
`jsonc.vim` in runtime: `syntax/`, `indent/` and `ftplugin/`
The other files will be in the next runtime files update.
…--
hundred-and-one symptoms of being an internet addict:
84. Books in your bookcase bear the names Bongo, WinSock and Inside OLE
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
Problem: JSONC files are not recognized. Solution: Recognize .jsonc files. (Izhak Jakov, closes vim/vim#8500) vim/vim@acbb4b5 N/A patches for version.c: vim-patch:8.2.3081: cannot catch errors in a channel command Problem: Cannot catch errors in a channel command. Solution: Instead of skipping the error make it silent. (closes vim/vim#8477) vim/vim@11a632d vim-patch:8.2.3082: a channel command "echoerr" does not show anything Problem: A channel command "echoerr" does not show anything. Solution: Do not use silent errors when using an "echoerr" command. (closes vim/vim#8494) vim/vim@b836f63 vim-patch:8.2.3094: Test_popup_atcursor_pos() fails without the conceal feature Problem: Test_popup_atcursor_pos() fails without the conceal feature. Solution: Add a check for the conceal feature. (Dominique Pellé, closes vim/vim#8505) vim/vim@c60e959
Problem: JSONC files are not recognized. Solution: Recognize .jsonc files. (Izhak Jakov, closes vim/vim#8500) vim/vim@acbb4b5 N/A patches for version.c: vim-patch:8.2.3081: cannot catch errors in a channel command Problem: Cannot catch errors in a channel command. Solution: Instead of skipping the error make it silent. (closes vim/vim#8477) vim/vim@11a632d vim-patch:8.2.3082: a channel command "echoerr" does not show anything Problem: A channel command "echoerr" does not show anything. Solution: Do not use silent errors when using an "echoerr" command. (closes vim/vim#8494) vim/vim@b836f63 vim-patch:8.2.3094: Test_popup_atcursor_pos() fails without the conceal feature Problem: Test_popup_atcursor_pos() fails without the conceal feature. Solution: Add a check for the conceal feature. (Dominique Pellé, closes vim/vim#8505) vim/vim@c60e959 vim-patch:8.2.3098: popup window test is flaky on MS-Windows with GUI Problem: Popup window test is flaky on MS-Windows with GUI. Solution: Skip the check in this situation. vim/vim@999db23
Problem: JSONC files are not recognized. Solution: Recognize .jsonc files. (Izhak Jakov, closes vim#8500)
Description from issue #8499
I see more and more tools using jsonc format for their configuration files. I believe this trend will only increase and VIM should consider supporting these formats
jsonc
Basically a JSON with C-style line (
//) and block (/**/) comments.Exiting vim plugin: https://github.com/kevinoid/vim-jsonc
Steps to reproduce using
vim -u NONEActual behaviour
opens up as a plain text
Expected behaviour
Opened as a jsonc file: