neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit af82eab946cf9f36e544b0591b8c8c02e8ddf316
parent 35aa072647ec67e33e4bfb21b7febd369f63c33b
Author: Christian Clason <c.clason@uni-graz.at>
Date:   Mon, 25 Apr 2022 20:02:36 +0200

vim-patch:8.2.4826: .cshtml files are not recognized (#18259)

Problem:    .cshtml files are not recognized.
Solution:   Use html filetype for .cshtml files. (Julien Voisin, closes vim/vim#10212)
https://github.com/vim/vim/commit/1f435dafff2452e0b55d1ca457ce7402e526e92a
Diffstat:
Mruntime/filetype.vim | 1+
Mruntime/lua/vim/filetype.lua | 1+
Msrc/nvim/testdir/test_filetype.vim | 1+
3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/runtime/filetype.vim b/runtime/filetype.vim @@ -817,6 +817,7 @@ au BufNewFile,BufRead *.t.html setf tilde " HTML (.shtml and .stm for server side) au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml() +au BufNewFile,BufRead *.cshtml setf html " HTML with Ruby - eRuby au BufNewFile,BufRead *.erb,*.rhtml setf eruby diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua @@ -142,6 +142,7 @@ local extension = { cs = "cs", csc = "csc", csdl = "csdl", + cshtml = "html", fdr = "csp", csp = "csp", css = "css", diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim @@ -258,6 +258,7 @@ let s:filename_checks = { \ 'rnoweb': ['file.rnw', 'file.snw'], \ 'rrst': ['file.rrst', 'file.srst'], \ 'template': ['file.tmpl'], + \ 'html': ['file.html', 'file.htm', 'file.cshtml'], \ 'htmlm4': ['file.html.m4'], \ 'httest': ['file.htt', 'file.htb'], \ 'ibasic': ['file.iba', 'file.ibi'],