patch 9.1.0278: filetype: zathurarc files not recognized

Commit: 
https://github.com/vim/vim/commit/72d81a66edd835aeff3f539ccd0f97afb1ebd63c
Author: Wu, Zhenyu <wuzhe...@ustc.edu>
Date:   Mon Apr 8 22:19:06 2024 +0200

    patch 9.1.0278: filetype: zathurarc files not recognized
    
    Problem:  filetype: zathurarc files not recognized
    Solution: Detect '.zathurarc' files as zathurarc filetype,
              add zathurarc filetype (Wu, Zhenyu)
    
    closes: #14380
    
    Signed-off-by: Wu, Zhenyu <wuzhe...@ustc.edu>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 8e96e15f2..30996f794 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -2980,6 +2980,8 @@ au filetypedetect BufNewFile,BufRead,StdinReadPost *
 " Yarn lock
 au BufNewFile,BufRead yarn.lock                        setf yaml
 
+" Zathurarc
+au BufNewFile,BufRead zathurarc                        setf zathurarc
 
 " If the GUI is already running, may still need to install the Syntax menu.
 " Don't do it when the 'M' flag is included in 'guioptions'.
diff --git a/runtime/ftplugin/zathurarc.vim b/runtime/ftplugin/zathurarc.vim
new file mode 100644
index 000000000..259fb137a
--- /dev/null
+++ b/runtime/ftplugin/zathurarc.vim
@@ -0,0 +1,22 @@
+" Vim filetype plugin file
+" Language:             Zathurarc
+" Maintainer:           Wu, Zhenyu <wuzhe...@ustc.edu>
+" Documentation:        https://pwmt.org/projects/zathura/documentation/
+" Upstream:             https://github.com/Freed-Wu/zathurarc.vim
+" Latest Revision:      2024-04-02
+
+if exists('b:did_ftplugin')
+  finish
+endif
+let b:did_ftplugin = 1
+
+let s:save_cpoptions = &cpoptions
+set cpoptions&vim
+
+let b:undo_ftplugin = 'setlocal comments< commentstring< include<'
+setlocal comments=:#
+setlocal commentstring=#\ %s
+setlocal include=^\sinclude
+
+let &cpoptions = s:save_cpoptions
+unlet s:save_cpoptions
diff --git a/runtime/syntax/zathurarc.vim b/runtime/syntax/zathurarc.vim
new file mode 100644
index 000000000..5e0526d02
--- /dev/null
+++ b/runtime/syntax/zathurarc.vim
@@ -0,0 +1,37 @@
+" Vim syntax file
+" Language:             Zathurarc
+" Maintainer:           Wu, Zhenyu <wuzhe...@ustc.edu>
+" Documentation:        https://pwmt.org/projects/zathura/documentation/
+" Upstream:             https://github.com/Freed-Wu/zathurarc.vim
+" Latest Revision:      2024-04-02
+
+if exists('b:current_syntax')
+  finish
+endif
+let b:current_syntax = 'zathurarc'
+
+syntax case match
+syntax iskeyword @,48-57,_,192-255,-
+
+syntax region zathurarcComment start="\%([     ]*\&\([^\]\zs\|^\)\)#" end="$"
+syntax match zathurarcBracket /[<>]/ contained
+syntax match zathurarcNotation `<[A-Z][a-z0-9]\+>` contains=zathurarcBracket
+syntax match zathurarcNumber `\<[0-9.]\>`
+syntax region zathurarcString start=`"` skip=`\"` end=`"`
+syntax region zathurarcString start=`'` skip=`\'` end=`'`
+syntax keyword zathurarcMode normal fullscreen presentation index
+syntax keyword zathurarcBoolean true false
+syntax keyword zathurarcCommand include map set unmap
+syntax keyword zathurarcOption abort-clear-search adjust-open 
advance-pages-per-row completion-bg completion-fg completion-group-bg 
completion-group-fg completion-highlight-bg completion-highlight-fg 
continuous-hist-save database dbus-raise-window dbus-service default-bg 
default-fg exec-command filemonitor first-page-column font guioptions 
highlight-active-color highlight-color highlight-fg highlight-transparency 
incremental-search index-active-bg index-active-fg index-bg index-fg 
inputbar-bg inputbar-fg link-hadjust link-zoom n-completion-items 
notification-bg notification-error-bg notification-error-fg notification-fg 
notification-warning-bg notification-warning-fg page-cache-size page-padding 
page-right-to-left page-thumbnail-size pages-per-row recolor recolor-darkcolor 
recolor-keephue recolor-lightcolor recolor-reverse-video render-loading 
render-loading-bg render-loading-fg sandbox scroll-full-overlap scroll-hstep 
scroll-page-aware scroll-step scroll-wrap search-hadjust selection-clipboard 
selection-notification show-directories show-hidden show-recent 
statusbar-basename statusbar-bg statusbar-fg statusbar-h-padding 
statusbar-home-tilde statusbar-page-percent statusbar-v-padding synctex 
synctex-editor-command vertical-center window-height window-icon 
window-icon-document window-title-basename window-title-home-tilde 
window-title-page window-width zoom-center zoom-max zoom-min zoom-step
+
+highlight default link zathurarcComment Comment
+highlight default link zathurarcNumber Number
+highlight default link zathurarcMode Macro
+highlight default link zathurarcString String
+highlight default link zathurarcBoolean Boolean
+" same as vim
+highlight default link zathurarcBracket Delimiter
+highlight default link zathurarcNotation Special
+highlight default link zathurarcCommand Statement
+highlight default link zathurarcOption PreProc
+" ex: nowrap
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 03af29770..3b94f96c6 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -827,6 +827,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     yang: ['file.yang'],
     yuck: ['file.yuck'],
     z8a: ['file.z8a'],
+    zathurarc: ['zathurarc'],
     zig: ['file.zig', 'build.zig.zon'],
     zimbu: ['file.zu'],
     zimbutempl: ['file.zut'],
diff --git a/src/version.c b/src/version.c
index 25b039985..93f6634e4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    278,
 /**/
     277,
 /**/

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1rtvcz-00GPb8-6E%40256bit.org.

Raspunde prin e-mail lui