patch 9.1.0839: filetype: leo files are not recognized
Commit:
https://github.com/vim/vim/commit/93f65a4ab8168c766e4d3794607762b52762ef82
Author: Riley Bruins <[email protected]>
Date: Mon Nov 4 19:58:45 2024 +0100
patch 9.1.0839: filetype: leo files are not recognized
Problem: filetype: leo files are not recognized
Solution: detect '*.leo' files as leo filetype, include
a filetype plugin (Riley Bruins)
References:
https://github.com/ProvableHQ/leo
closes: #15988
Signed-off-by: Riley Bruins <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS
index e2f1fafd9..b3822c215 100644
--- a/.github/MAINTAINERS
+++ b/.github/MAINTAINERS
@@ -202,6 +202,7 @@ runtime/ftplugin/kdl.vim @imsnif @jiangyinzuo
runtime/ftplugin/kivy.vim @ribru17
runtime/ftplugin/kotlin.vim @udalov
runtime/ftplugin/ldapconf.vim @ribru17
+runtime/ftplugin/leo.vim @ribru17
runtime/ftplugin/less.vim @genoma
runtime/ftplugin/lex.vim @ribru17
runtime/ftplugin/liquid.vim @tpope
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index f2ddcc676..b3cec8721 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1325,6 +1325,9 @@ au BufRead,BufNewFile *.ldg,*.ledger,*.journal
setf ledger
" lf configuration (lfrc)
au BufNewFile,BufRead lfrc setf lf
+" Leo
+au BufNewFile,BufRead *.leo setf leo
+
" Less
au BufNewFile,BufRead *.less setf less
diff --git a/runtime/ftplugin/leo.vim b/runtime/ftplugin/leo.vim
new file mode 100644
index 000000000..a009c02df
--- /dev/null
+++ b/runtime/ftplugin/leo.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: Leo
+" Maintainer: Riley Bruins <[email protected]>
+" Last Change: 2024 Nov 03
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=:// commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 050ff5f39..9ddab9613 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -408,6 +408,7 @@ def s:GetFilenameChecks(): dict<list<string>>
ldif: ['file.ldif'],
lean: ['file.lean'],
ledger: ['file.ldg', 'file.ledger', 'file.journal'],
+ leo: ['file.leo'],
less: ['file.less'],
lex: ['file.lex', 'file.l', 'file.lxx', 'file.l++'],
lf: ['lfrc'],
diff --git a/src/version.c b/src/version.c
index d213e66a3..f13567f30 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 */
+/**/
+ 839,
/**/
838,
/**/
--
--
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 [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1t82XX-00EBBA-3u%40256bit.org.