diff options
-rw-r--r-- | .github/MAINTAINERS | 2 | ||||
-rw-r--r-- | runtime/filetype.vim | 3 | ||||
-rw-r--r-- | runtime/ftplugin/jj.vim | 19 | ||||
-rw-r--r-- | runtime/syntax/jj.vim | 20 | ||||
-rw-r--r-- | src/testdir/test_filetype.vim | 1 | ||||
-rw-r--r-- | src/version.c | 2 |
6 files changed, 47 insertions, 0 deletions
diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index ac41ed5678..36b352ffbf 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -161,6 +161,7 @@ runtime/ftplugin/j.vim @glts runtime/ftplugin/java.vim @zzzyxwvut runtime/ftplugin/javascript.vim @dkearns runtime/ftplugin/javascriptreact.vim @dkearns +runtime/ftplugin/jj.vim @gpanders runtime/ftplugin/json.vim @dbarnett runtime/ftplugin/json5.vim @dkearns runtime/ftplugin/jsonc.vim @izhakjakov @@ -406,6 +407,7 @@ runtime/syntax/j.vim @glts runtime/syntax/jargon.vim @h3xx runtime/syntax/java.vim @zzzyxwvut runtime/syntax/javascript.vim @fleiner +runtime/syntax/jj.vim @gpanders runtime/syntax/json.vim @vito-c runtime/syntax/jsonc.vim @izhakjakov runtime/syntax/julia.vim @carlobaldassi diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 927230d4ff..f45866cb82 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1148,6 +1148,9 @@ au BufNewFile,BufRead *.clp setf jess " Jgraph au BufNewFile,BufRead *.jgr setf jgraph +" Jujutsu +au BufNewFile,BufRead *.jjdescription setf jj + " Jovial au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial diff --git a/runtime/ftplugin/jj.vim b/runtime/ftplugin/jj.vim new file mode 100644 index 0000000000..cc5d700a30 --- /dev/null +++ b/runtime/ftplugin/jj.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin +" Language: jj description +" Maintainer: Gregory Anders <greg@gpanders.com> +" Last Change: 2024 May 8 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +" Use the same formatoptions and textwidth as the gitcommit ftplugin +setlocal nomodeline formatoptions+=tl textwidth=72 +setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q formatoptions+=n +setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}]\\s\\+\\\|^\\s*[-*+]\\s\\+ + +setlocal comments=b:JJ: +setlocal commentstring=JJ:\ %s + +let b:undo_ftplugin = 'setl modeline< formatoptions< textwidth< formatlistpat< comments< commentstring<' diff --git a/runtime/syntax/jj.vim b/runtime/syntax/jj.vim new file mode 100644 index 0000000000..a2911a0268 --- /dev/null +++ b/runtime/syntax/jj.vim @@ -0,0 +1,20 @@ +" Vim syntax file +" Language: jj description +" Maintainer: Gregory Anders <greg@gpanders.com> +" Last Change: 2024 May 8 + +if exists('b:current_syntax') + finish +endif +let b:current_syntax = 'jj' + +syn match jjAdded "A .*" contained +syn match jjRemoved "D .*" contained +syn match jjChanged "M .*" contained + +syn region jjComment start="^JJ: " end="$" contains=jjAdded,jjRemoved,jjChanged + +hi def link jjComment Comment +hi def link jjAdded Added +hi def link jjRemoved Removed +hi def link jjChanged Changed diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index 4a2a25e7cd..c98bb56df2 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -359,6 +359,7 @@ def s:GetFilenameChecks(): dict<list<string>> javascriptreact: ['file.jsx'], jess: ['file.clp'], jgraph: ['file.jgr'], + jj: ['file.jjdescription'], jq: ['file.jq'], jovial: ['file.jov', 'file.j73', 'file.jovial'], jproperties: ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file', 'org.eclipse.xyz.prefs'], diff --git a/src/version.c b/src/version.c index 0e6ac314ed..8dd6d18c09 100644 --- a/src/version.c +++ b/src/version.c @@ -705,6 +705,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 396, +/**/ 395, /**/ 394, |