diff options
author | Christian Clason <c.clason@uni-graz.at> | 2021-11-16 18:26:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-16 18:26:03 +0100 |
commit | b5eab2a98a11468e3c8b25276a9ab24909a67254 (patch) | |
tree | 38cdcc7f385c6627e23e3d159b9ffb8fdef01691 | |
parent | 8fb09bc5129db9d9b2f650ab30f35f55593937f3 (diff) | |
download | rneovim-b5eab2a98a11468e3c8b25276a9ab24909a67254.tar.gz rneovim-b5eab2a98a11468e3c8b25276a9ab24909a67254.tar.bz2 rneovim-b5eab2a98a11468e3c8b25276a9ab24909a67254.zip |
vim-patch:8.2.3603: fish filetype not recognized (#16337)
Problem: Fish filetype not recognized.
Solution: Add a file pattern and match script line. (Doug Kearns)
https://github.com/vim/vim/commit/b1b163efd7bb3ca68cce101d4e431559d2944a8e
-rw-r--r-- | runtime/filetype.vim | 3 | ||||
-rw-r--r-- | runtime/scripts.vim | 4 | ||||
-rw-r--r-- | src/nvim/testdir/test_filetype.vim | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 02faafc85f..9f86b246f8 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -613,6 +613,9 @@ autocmd BufRead,BufNewFile *.fnl setf fennel " Fetchmail RC file au BufNewFile,BufRead .fetchmailrc setf fetchmail +" Fish shell +au BufNewFile,BufRead *.fish setf fish + " FlexWiki - disabled, because it has side effects when a .wiki file " is not actually FlexWiki "au BufNewFile,BufRead *.wiki setf flexwiki diff --git a/runtime/scripts.vim b/runtime/scripts.vim index 79fd0a77e9..0ff8e49088 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -194,6 +194,10 @@ if s:line1 =~# "^#!" elseif s:name =~# 'rsc\>' set ft=routeros + " Fish shell + elseif s:name =~# 'fish\>' + set ft=fish + endif unlet s:name diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index cc8181c597..ff696a436c 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -180,6 +180,7 @@ let s:filename_checks = { \ 'fennel': ['file.fnl'], \ 'fetchmail': ['.fetchmailrc'], \ 'fgl': ['file.4gl', 'file.4gh', 'file.m4gl'], + \ 'fish': ['file.fish'], \ 'focexec': ['file.fex', 'file.focexec'], \ 'forth': ['file.fs', 'file.ft', 'file.fth'], \ 'fortran': ['file.f', 'file.for', 'file.fortran', 'file.fpp', 'file.ftn', 'file.f77', 'file.f90', 'file.f95', 'file.f03', 'file.f08'], @@ -661,6 +662,7 @@ let s:script_checks = { \ 'pascal': [['#!/path/instantfpc']], \ 'fennel': [['#!/path/fennel']], \ 'routeros': [['#!/path/rsc']], + \ 'fish': [['#!/path/fish']], \ } " Various forms of "env" optional arguments. |