mirror of
https://github.com/neovim/neovim.git
synced 2026-07-12 04:19:45 +00:00
vim-patch:9.2.0025: filetype: cshtml incorrectly recognized (#37957)
Problem: filetype: cshtml incorrectly recognized, razor files are not
recognized
Solution: Detect *.cshtml and *.razor files as razor filetype
(tris203)
Reference:
https://learn.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-10.0
closes: vim/vim#19207
68dbb58d51
Co-authored-by: tris203 <admin@snappeh.com>
This commit is contained in:
@@ -372,7 +372,6 @@ local extension = {
|
|||||||
cs = 'cs',
|
cs = 'cs',
|
||||||
csc = 'csc',
|
csc = 'csc',
|
||||||
csdl = 'csdl',
|
csdl = 'csdl',
|
||||||
cshtml = 'html',
|
|
||||||
fdr = 'csp',
|
fdr = 'csp',
|
||||||
csp = 'csp',
|
csp = 'csp',
|
||||||
css = 'css',
|
css = 'css',
|
||||||
@@ -1068,6 +1067,8 @@ local extension = {
|
|||||||
MODx = 'rapid',
|
MODx = 'rapid',
|
||||||
rasi = 'rasi',
|
rasi = 'rasi',
|
||||||
rasinc = 'rasi',
|
rasinc = 'rasi',
|
||||||
|
cshtml = 'razor',
|
||||||
|
razor = 'razor',
|
||||||
rbs = 'rbs',
|
rbs = 'rbs',
|
||||||
rego = 'rego',
|
rego = 'rego',
|
||||||
rem = 'remind',
|
rem = 'remind',
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ func s:GetFilenameChecks() abort
|
|||||||
\ 'hoon': ['file.hoon'],
|
\ 'hoon': ['file.hoon'],
|
||||||
\ 'hostconf': ['/etc/host.conf', 'any/etc/host.conf'],
|
\ 'hostconf': ['/etc/host.conf', 'any/etc/host.conf'],
|
||||||
\ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny', 'any/etc/hosts.allow', 'any/etc/hosts.deny'],
|
\ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny', 'any/etc/hosts.allow', 'any/etc/hosts.deny'],
|
||||||
\ 'html': ['file.html', 'file.htm', 'file.cshtml', 'file.component.html'],
|
\ 'html': ['file.html', 'file.htm', 'file.component.html'],
|
||||||
\ 'htmlm4': ['file.html.m4'],
|
\ 'htmlm4': ['file.html.m4'],
|
||||||
\ 'httest': ['file.htt', 'file.htb'],
|
\ 'httest': ['file.htt', 'file.htb'],
|
||||||
\ 'http': ['file.http'],
|
\ 'http': ['file.http'],
|
||||||
@@ -677,6 +677,7 @@ func s:GetFilenameChecks() abort
|
|||||||
\ 'rapid': ['file.sysx', 'file.Sysx', 'file.SysX', 'file.SYSx', 'file.SYSX', 'file.modx', 'file.Modx', 'file.ModX', 'file.MODx', 'file.MODX'],
|
\ 'rapid': ['file.sysx', 'file.Sysx', 'file.SysX', 'file.SYSx', 'file.SYSX', 'file.modx', 'file.Modx', 'file.ModX', 'file.MODx', 'file.MODX'],
|
||||||
\ 'rasi': ['file.rasi', 'file.rasinc'],
|
\ 'rasi': ['file.rasi', 'file.rasinc'],
|
||||||
\ 'ratpoison': ['.ratpoisonrc', 'ratpoisonrc'],
|
\ 'ratpoison': ['.ratpoisonrc', 'ratpoisonrc'],
|
||||||
|
\ 'razor': ['file.cshtml', 'file.razor'],
|
||||||
\ 'rbs': ['file.rbs'],
|
\ 'rbs': ['file.rbs'],
|
||||||
\ 'rc': ['file.rc', 'file.rch'],
|
\ 'rc': ['file.rc', 'file.rch'],
|
||||||
\ 'rcs': ['file,v'],
|
\ 'rcs': ['file,v'],
|
||||||
|
|||||||
Reference in New Issue
Block a user