aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-08-30 21:16:03 +0200
committerGitHub <noreply@github.com>2022-08-30 21:16:03 +0200
commit6b7eed1884c3b022cc15568c39f80f8f4da0780b (patch)
treefbd92b294b56ef81584fca824fd75140643c2a0a
parent2828aae7b49921380f229ebf4d7432f39c6c2c2b (diff)
downloadrneovim-6b7eed1884c3b022cc15568c39f80f8f4da0780b.tar.gz
rneovim-6b7eed1884c3b022cc15568c39f80f8f4da0780b.tar.bz2
rneovim-6b7eed1884c3b022cc15568c39f80f8f4da0780b.zip
Vim 9.0.{0314,0319}: some filetypes are not recognized (#20005)
* vim-patch:9.0.0314: VDM files are not recognized Problem: VDM files are not recognized. Solution: Add patterns for VDM files. (Alessandro Pezzoni, closes vim/vim#11004) https://github.com/vim/vim/commit/bf26941f40923d331169a4ecb7341608f5d1ca38 * vim-patch:9.0.0319: Godot shader files are not recognized Problem: Godot shader files are not recognized. Solution: Add patterns for "gdshader". (Maxim Kim, closes vim/vim#11006) https://github.com/vim/vim/commit/d5c8f11905abc1bdf3b8864dbc40187855ed9374
-rw-r--r--runtime/filetype.vim10
-rw-r--r--runtime/lua/vim/filetype.lua9
-rw-r--r--src/nvim/testdir/test_filetype.vim4
3 files changed, 21 insertions, 2 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 52a20d5c10..98d9df8b5c 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -697,7 +697,10 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
au BufNewFile,BufRead *.gd setf gdscript
" Godot resource
-au BufRead,BufNewFile *.tscn,*.tres setf gdresource
+au BufRead,BufNewFile *.tscn,*.tres setf gdresource
+
+" Godot shader
+au BufRead,BufNewFile *.gdshader,*.shader setf gdshader
" Gedcom
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
@@ -2095,6 +2098,11 @@ au BufNewFile,BufRead */.config/upstart/*.override setf upstart
" Vala
au BufNewFile,BufRead *.vala setf vala
+" VDM
+au BufRead,BufNewFile *.vdmpp,*.vpp setf vdmpp
+au BufRead,BufNewFile *.vdmrt setf vdmrt
+au BufRead,BufNewFile *.vdmsl,*.vdm setf vdmsl
+
" Vera
au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index 99c98764dd..fcd697a7c1 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -422,9 +422,11 @@ local extension = {
gdb = 'gdb',
gdmo = 'gdmo',
mo = 'gdmo',
- tres = 'gdresource',
tscn = 'gdresource',
+ tres = 'gdresource',
gd = 'gdscript',
+ gdshader = 'gdshader',
+ shader = 'gdshader',
ged = 'gedcom',
gmi = 'gemtext',
gemini = 'gemtext',
@@ -1011,6 +1013,11 @@ local extension = {
dsm = 'vb',
ctl = 'vb',
vbs = 'vb',
+ vdmpp = 'vdmpp',
+ vpp = 'vdmpp',
+ vdmrt = 'vdmrt',
+ vdmsl = 'vdmsl',
+ vdm = 'vdmsl',
vr = 'vera',
vri = 'vera',
vrh = 'vera',
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim
index e3a8370661..68ce9148a4 100644
--- a/src/nvim/testdir/test_filetype.vim
+++ b/src/nvim/testdir/test_filetype.vim
@@ -209,6 +209,7 @@ let s:filename_checks = {
\ 'gdmo': ['file.mo', 'file.gdmo'],
\ 'gdresource': ['file.tscn', 'file.tres'],
\ 'gdscript': ['file.gd'],
+ \ 'gdshader': ['file.gdshader', 'file.shader'],
\ 'gedcom': ['file.ged', 'lltxxxxx.txt', '/tmp/lltmp', '/tmp/lltmp-file', 'any/tmp/lltmp', 'any/tmp/lltmp-file'],
\ 'gemtext': ['file.gmi', 'file.gemini'],
\ 'gift': ['file.gift'],
@@ -588,6 +589,9 @@ let s:filename_checks = {
\ 'usw2kagtlog': ['usw2kagt.log', 'USW2KAGT.LOG', 'usw2kagt.file.log', 'USW2KAGT.FILE.LOG', 'file.usw2kagt.log', 'FILE.USW2KAGT.LOG'],
\ 'vala': ['file.vala'],
\ 'vb': ['file.sba', 'file.vb', 'file.vbs', 'file.dsm', 'file.ctl'],
+ \ 'vdmpp': ['file.vpp', 'file.vdmpp'],
+ \ 'vdmrt': ['file.vdmrt'],
+ \ 'vdmsl': ['file.vdm', 'file.vdmsl'],
\ 'vera': ['file.vr', 'file.vri', 'file.vrh'],
\ 'verilog': ['file.v'],
\ 'verilogams': ['file.va', 'file.vams'],