diff options
author | Christian Clason <c.clason@uni-graz.at> | 2024-05-20 14:21:18 +0200 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2024-05-20 14:43:12 +0200 |
commit | 70c0b03e61194766ec5b59e43ff2e98826d03048 (patch) | |
tree | 995f67bf0c91f878f122fa372b84da2a88cec7b1 | |
parent | 6745cd8d7202c1c6394fb787aa335f68b2077b95 (diff) | |
download | rneovim-70c0b03e61194766ec5b59e43ff2e98826d03048.tar.gz rneovim-70c0b03e61194766ec5b59e43ff2e98826d03048.tar.bz2 rneovim-70c0b03e61194766ec5b59e43ff2e98826d03048.zip |
vim-patch:9.1.0424: filetype: slint files are not recognized
Problem: filetype: slint files are not recognized
Solution: Detect '*.slint' files as slint filetype,
include basic sling filetype plugin
(Riley Bruins)
closes: vim/vim#14808
https://github.com/vim/vim/commit/aa3104b07a3e5e7cc41310f1fbfb00f71ef801a2
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
-rw-r--r-- | runtime/ftplugin/slint.vim | 15 | ||||
-rw-r--r-- | runtime/lua/vim/filetype.lua | 1 | ||||
-rw-r--r-- | test/old/testdir/test_filetype.vim | 1 |
3 files changed, 17 insertions, 0 deletions
diff --git a/runtime/ftplugin/slint.vim b/runtime/ftplugin/slint.vim new file mode 100644 index 0000000000..ac8057f39d --- /dev/null +++ b/runtime/ftplugin/slint.vim @@ -0,0 +1,15 @@ +" Vim filetype plugin +" Language: slint +" Maintainer: Riley Bruins <ribru17@gmail.com> +" Last Change: 2024 May 19 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +" Set 'comments' to format dashed lists in comments. +" Also include ///, used for Doxygen. +setl comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// commentstring=//\ %s + +let b:undo_ftplugin = 'setl com< cms<' diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index ba4667129e..97e69c0ca8 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -970,6 +970,7 @@ local extension = { cdf = 'skill', sl = 'slang', ice = 'slice', + slint = 'slint', score = 'slrnsc', sol = 'solidity', smali = 'smali', diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index aa1076902a..08f619a119 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -655,6 +655,7 @@ func s:GetFilenameChecks() abort \ 'slang': ['file.sl'], \ 'sage': ['file.sage'], \ 'slice': ['file.ice'], + \ 'slint': ['file.slint'], \ 'slpconf': ['/etc/slp.conf', 'any/etc/slp.conf'], \ 'slpreg': ['/etc/slp.reg', 'any/etc/slp.reg'], \ 'slpspi': ['/etc/slp.spi', 'any/etc/slp.spi'], |