diff options
author | Christian Clason <c.clason@uni-graz.at> | 2024-04-08 22:39:30 +0200 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2024-04-09 09:53:49 +0200 |
commit | bef4ad6507a53db8570909de954a538b50b97a30 (patch) | |
tree | 7249b6a430921d87fea20921f41603142e8c9b3b | |
parent | a663eb10bd345fabc88e479bef292d0222928ec0 (diff) | |
download | rneovim-bef4ad6507a53db8570909de954a538b50b97a30.tar.gz rneovim-bef4ad6507a53db8570909de954a538b50b97a30.tar.bz2 rneovim-bef4ad6507a53db8570909de954a538b50b97a30.zip |
vim-patch:9.1.0279: filetype: roc files are not recognized
Problem: filetype: roc files are not recognized
Solution: Detect '*.roc' files as roc filetype,
add a basic filetype plugin (nat-418)
closes: vim/vim#14416
https://github.com/vim/vim/commit/196b6678c5483217ea5bc7d047b02c915615dae6
Co-authored-by: nat-418 <93013864+nat-418@users.noreply.github.com>
-rw-r--r-- | runtime/ftplugin/roc.vim | 14 | ||||
-rw-r--r-- | runtime/lua/vim/filetype.lua | 1 | ||||
-rw-r--r-- | test/old/testdir/test_filetype.vim | 1 |
3 files changed, 16 insertions, 0 deletions
diff --git a/runtime/ftplugin/roc.vim b/runtime/ftplugin/roc.vim new file mode 100644 index 0000000000..c66510874d --- /dev/null +++ b/runtime/ftplugin/roc.vim @@ -0,0 +1,14 @@ +" Roc filetype plugin file +" Language: Roc +" Maintainer: nat-418 <93013864+nat-418@users.noreply.github.com> +" Latest Revision: 2024-04-5 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal comments=:##,:# +setlocal commentstring=#\ %s + +let b:undo_ftplugin = "setl com< cms<" diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 083ad9f24f..1cbefc842f 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -887,6 +887,7 @@ local extension = { Snw = 'rnoweb', robot = 'robot', resource = 'robot', + roc = 'roc', ron = 'ron', rsc = 'routeros', x = 'rpcgen', diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index 50e89d461f..1de36e37db 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -567,6 +567,7 @@ func s:GetFilenameChecks() abort \ 'rpgle': ['file.rpgle', 'file.rpgleinc'], \ 'robot': ['file.robot', 'file.resource'], \ 'robots': ['robots.txt'], + \ 'roc': ['file.roc'], \ 'ron': ['file.ron'], \ 'routeros': ['file.rsc'], \ 'rpcgen': ['file.x'], |