diff options
author | zeertzjq <zeertzjq@outlook.com> | 2021-11-30 21:51:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-30 14:51:17 +0100 |
commit | caf41a7ac959768f8878a9bb9d3f0ae2d9726f79 (patch) | |
tree | af3253a6bf0aa924ba4b5fb0710f669ae43706d0 | |
parent | 04c7b550384b2246d37c1a893c0f858bc332cb8b (diff) | |
download | rneovim-caf41a7ac959768f8878a9bb9d3f0ae2d9726f79.tar.gz rneovim-caf41a7ac959768f8878a9bb9d3f0ae2d9726f79.tar.bz2 rneovim-caf41a7ac959768f8878a9bb9d3f0ae2d9726f79.zip |
vim-patch:8.2.3703: most people call F# "fsharp" and not "fs" (#16469)
Problem: Most people call F# "fsharp" and not "fs".
Solution: Rename filetype "fs" to "fsharp".
https://github.com/vim/vim/commit/53ba95e4f0a82f6dab1791bb01f6cddc9b3f61b3
-rw-r--r-- | runtime/autoload/dist/ft.vim | 2 | ||||
-rw-r--r-- | runtime/filetype.vim | 9 | ||||
-rw-r--r-- | src/nvim/testdir/test_filetype.vim | 4 |
3 files changed, 9 insertions, 6 deletions
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 0cbcb1bbb5..74df871544 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -231,7 +231,7 @@ func dist#ft#FTfs() \ || line =~ '^\s*: \S' setf forth else - setf fs + setf fsharp endif endif endfunc diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 0cad37531d..cc28dba1d0 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -630,9 +630,6 @@ au BufNewFile,BufRead *.mas,*.master setf master " Forth au BufNewFile,BufRead *.ft,*.fth setf forth -" F# or Forth -au BufNewFile,BufRead *.fs call dist#ft#FTfs() - " Reva Forth au BufNewFile,BufRead *.frt setf reva @@ -648,6 +645,12 @@ au BufNewFile,BufRead *.fsl setf framescript " FStab au BufNewFile,BufRead fstab,mtab setf fstab +" F# or Forth +au BufNewFile,BufRead *.fs call dist#ft#FTfs() + +" F# +au BufNewFile,BufRead *.fsi,*.fsx setf fsharp + " GDB command files au BufNewFile,BufRead .gdbinit,gdbinit setf gdb diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index eb7756de33..48b434b9fd 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -187,7 +187,7 @@ let s:filename_checks = { \ 'fpcmake': ['file.fpc'], \ 'framescript': ['file.fsl'], \ 'freebasic': ['file.fb', 'file.bi'], - \ 'fs': ['file.fs'], + \ 'fsharp': ['file.fs', 'file.fsi', 'file.fsx'], \ 'fstab': ['fstab', 'mtab'], \ 'fvwm': ['/.fvwm/file', 'any/.fvwm/file'], \ 'gdb': ['.gdbinit', 'gdbinit'], @@ -952,7 +952,7 @@ func Test_fs_file() call writefile(['looks like F#'], 'Xfile.fs') split Xfile.fs - call assert_equal('fs', &filetype) + call assert_equal('fsharp', &filetype) bwipe! let g:filetype_fs = 'forth' |