[vim/vim] Add g:json_no_conceal to disable conceal for json filetype (#4948)

31 views
Skip to first unread message

matsuhav

unread,
Sep 17, 2019, 10:20:51 AM9/17/19
to vim/vim, Subscribed

This PR is about vim syntax file, json.vim
I opened this PR because the maintainer's email is not on json.vim.
Currently json syntax file is unmaintained.
This PR is not about the syntax, but syntax file's option. So please merge.

Vim's conceal feature is used at many places and I want a option to disable json's conceal.
For example, I use vim plugin indentLine(https://github.com/Yggdroot/indentLine). This plugin uses conceal feature to display indent.
I can't disable json.vim's conceal while using indentLine's conceal with conceallevel.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/4948

Commit Summary

  • Add g:json_no_conceal to disable conceal for json filetype

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

Shidong Wang

unread,
Sep 17, 2019, 10:30:42 AM9/17/19
to vim_dev, vim/vim, Subscribed
there is an option named g:vim_json_warnings in this file, maybe use g:vim_json_conceal is better, also doc need to be updated.


--
Best regards,
wsdjeg
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/4948%40github.com.

Codecov

unread,
Sep 17, 2019, 10:44:02 AM9/17/19
to vim/vim, Subscribed

Codecov Report

Merging #4948 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@

##           master    #4948      +/-   ##

==========================================

+ Coverage   81.68%   81.69%   +0.01%     

==========================================

  Files         127      127              

  Lines      146494   146494              

==========================================

+ Hits       119661   119677      +16     

+ Misses      26833    26817      -16
Impacted Files Coverage Δ
src/gui_beval.c 62.5% <0%> (-0.87%) ⬇️
src/profiler.c 94.11% <0%> (-0.57%) ⬇️
src/window.c 87.9% <0%> (-0.07%) ⬇️
src/message.c 79.47% <0%> (-0.06%) ⬇️
src/term.c 79.17% <0%> (ø) ⬆️
src/gui_gtk_x11.c 58.21% <0%> (+0.09%) ⬆️
src/sign.c 94.59% <0%> (+0.18%) ⬆️
src/netbeans.c 27.46% <0%> (+0.22%) ⬆️
src/if_xcmdsrv.c 86.17% <0%> (+0.53%) ⬆️
src/gui.c 64.37% <0%> (+0.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0e57dd8...ba8a338. Read the comment docs.


You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub, or mute the thread.

Bram Moolenaar

unread,
Sep 17, 2019, 4:43:51 PM9/17/19
to vim...@googlegroups.com, Shidong Wang

> there is an option named g:vim_json_warnings in this file, maybe use
> g:vim_json_conceal is better, also doc need to be updated.

Yes, this would be more consistent:
if has('conceal') && (!exists("g:vim_json_conceal") || g:vim_json_conceal==1)

Avoiding "no" is also good.

Can you suggest a section for the help?

--
Life would be so much easier if we could just look at the source code.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Christian Brabandt

unread,
Sep 18, 2019, 2:25:42 AM9/18/19
to vim/vim, Subscribed

please have a look at the mailinglist. There were a couple of suggestions for this PR:

https://groups.google.com/d/msg/vim_dev/m4oV9tSS21I/XT5VzOiyBQAJ

matsuhav

unread,
Sep 18, 2019, 7:03:19 AM9/18/19
to vim/vim, Push

@matsuhav pushed 1 commit.

  • 88a8b17 Changed option name to be more consistent and updated help


You are receiving this because you are subscribed to this thread.

View it on GitHub

matsuhav

unread,
Sep 18, 2019, 7:15:50 AM9/18/19
to vim/vim, Subscribed

Thank you for reviews.
I updated the syntax file and added json.vim subject to the doc because there was no description.

Bram Moolenaar

unread,
Sep 19, 2019, 4:14:46 PM9/19/19
to vim/vim, Subscribed

I'll include it, thanks!

Bram Moolenaar

unread,
Sep 19, 2019, 4:14:46 PM9/19/19
to vim/vim, Subscribed

Closed #4948.

Reply all
Reply to author
Forward
0 new messages