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
Adding JQ Syntax to vim! #14619
Adding JQ Syntax to vim! #14619
Conversation
runtime/compiler/jq.vim
Outdated
let s:save_cpoptions = &cpoptions | ||
set cpoptions&vim | ||
|
||
if exists(':CompilerSet') != 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove the exists(':CompilerSet')
test. We just removed this from the other compilers.
runtime/ftplugin/jq.vim
Outdated
let b:did_ftplugin = 1 | ||
|
||
let s:save_cpoptions = &cpoptions | ||
set cpoptions&vim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are not using line-continuation here, so you can remove the save and restore of 'cpoptions'
syn match jqNumber /\<0[dDfFlL]\?\>/ " Just a bare 0 | ||
syn match jqNumber /\<[1-9]\d*[dDfFlL]\?\>/ " A multi-digit number - octal numbers with leading 0's are deprecated in Scala | ||
|
||
if !exists('jq_quote_highlight') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a section at :h syntax.txt
for this configuration settig?
runtime/syntax/jq.vim
Outdated
"hi def link jqRepeat Repeat | ||
"hi def link jqException Exception | ||
"hi def link jqInclude Include | ||
"hi def link jqDecorator Define |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove those commented out sections?
can you please also update https://github.com/vim/vim/blob/master/.github/CODEOWNERS? |
65e1f2b
to
d495c69
Compare
@chrisbra Should I resolve the comments as I fix the issues or do you want to resolve them after you have verified? |
Ah thanks. The documentation is still wrong, it uses |
runtime(jq): include syntax, ftplugin and compiler plugin closes: vim/vim#14619 vim/vim@79952b9 Co-authored-by: Vito <vito.blog@gmail.com>
runtime(jq): include syntax, ftplugin and compiler plugin closes: vim/vim#14619 vim/vim@79952b9 Co-authored-by: Vito <vito.blog@gmail.com>
setlocal commentstring=#%s | ||
compiler jq | ||
|
||
let &cpoptions = s:save_cpoptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to remove this as well
I am adding jq syntax to vim as well as updating the maintainer for json.
@itchyny @dtolnay @Freed-Wu