patch 9.1.0778: filetype: lf config files are not recognized
Problem: filetype: lf config files are not recognized
Solution: detect lfrc files as lf filetype, include a syntax
script for lf files (Andis Spriņķis).
References:
- https://github.com/gokcehan/lf
closes: #15859
Signed-off-by: Andis Spriņķis <spr.andis@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 6b7dbf9..29bb7b5 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 9.1. Last change: 2024 Oct 06
+*syntax.txt* For Vim version 9.1. Last change: 2024 Oct 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2223,6 +2223,20 @@
:let lace_case_insensitive=1
+LF (LFRC) *lf.vim* *ft-lf-syntax* *g:lf_shell_syntax*
+ *b:lf_shell_syntax*
+
+For the lf file manager configuration files (lfrc) the shell commands
+syntax highlighting can be changed globally and per buffer by setting
+a different 'include' command search pattern using these variables:
+ let g:lf_shell_syntax = "syntax/dosbatch.vim"
+ let b:lf_shell_syntax = "syntax/zsh.vim"
+
+These variables are unset by default.
+
+The default 'include' command search pattern is 'syntax/sh.vim'.
+
+
LEX *lex.vim* *ft-lex-syntax*
Lex uses brute-force synchronizing as the "^%%$" section delimiter
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 246ea96..8dee55d 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -6121,6 +6121,7 @@
b:clojure_syntax_keywords syntax.txt /*b:clojure_syntax_keywords*
b:clojure_syntax_without_core_keywords syntax.txt /*b:clojure_syntax_without_core_keywords*
b:current_syntax-variable syntax.txt /*b:current_syntax-variable*
+b:lf_shell_syntax syntax.txt /*b:lf_shell_syntax*
b:netrw_lastfile pi_netrw.txt /*b:netrw_lastfile*
b:rust_cargo_avoid_whole_workspace ft_rust.txt /*b:rust_cargo_avoid_whole_workspace*
b:rust_cargo_check_all_features ft_rust.txt /*b:rust_cargo_check_all_features*
@@ -7331,6 +7332,7 @@
ft-ksh-syntax syntax.txt /*ft-ksh-syntax*
ft-lace-syntax syntax.txt /*ft-lace-syntax*
ft-lex-syntax syntax.txt /*ft-lex-syntax*
+ft-lf-syntax syntax.txt /*ft-lf-syntax*
ft-lifelines-syntax syntax.txt /*ft-lifelines-syntax*
ft-lisp-syntax syntax.txt /*ft-lisp-syntax*
ft-lite-syntax syntax.txt /*ft-lite-syntax*
@@ -7581,6 +7583,7 @@
g:html_use_input_for_pc syntax.txt /*g:html_use_input_for_pc*
g:html_use_xhtml syntax.txt /*g:html_use_xhtml*
g:html_whole_filler syntax.txt /*g:html_whole_filler*
+g:lf_shell_syntax syntax.txt /*g:lf_shell_syntax*
g:markdown_fenced_languages syntax.txt /*g:markdown_fenced_languages*
g:markdown_minlines syntax.txt /*g:markdown_minlines*
g:markdown_syntax_conceal syntax.txt /*g:markdown_syntax_conceal*
@@ -8556,6 +8559,7 @@
less various.txt /*less*
letter print.txt /*letter*
lex.vim syntax.txt /*lex.vim*
+lf.vim syntax.txt /*lf.vim*
lhaskell.vim syntax.txt /*lhaskell.vim*
libcall() builtin.txt /*libcall()*
libcallnr() builtin.txt /*libcallnr()*