aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJade Lovelace <software@lfcode.ca>2022-03-15 14:46:32 -0700
committerGitHub <noreply@github.com>2022-03-15 22:46:32 +0100
commit5a8bf31d328ecdb79453bf1eb22ff10aabbe0422 (patch)
treefa2269af3e5e531f42498aff71730306523243e0
parenta1a8cbe9e409dc9cb7aadcec7e5258ab85240f28 (diff)
downloadrneovim-5a8bf31d328ecdb79453bf1eb22ff10aabbe0422.tar.gz
rneovim-5a8bf31d328ecdb79453bf1eb22ff10aabbe0422.tar.bz2
rneovim-5a8bf31d328ecdb79453bf1eb22ff10aabbe0422.zip
vim-patch:8.2.4571: not all gdb files are recognized (#17727)
Problem: Not all gdb files are recognized. Solution: Add a few more patterns for gdb. (closes https://github.com/vim/vim/pull/9956) https://github.com/vim/vim/commit/8d5e514d77bd4b1956656ad2be2ce7094bd43a72
-rw-r--r--runtime/filetype.vim2
-rw-r--r--runtime/lua/vim/filetype.lua3
-rw-r--r--src/nvim/testdir/test_filetype.vim2
3 files changed, 5 insertions, 2 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 8114ad4092..9df89674e3 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -664,7 +664,7 @@ au BufNewFile,BufRead *.fs call dist#ft#FTfs()
au BufNewFile,BufRead *.fsi,*.fsx setf fsharp
" GDB command files
-au BufNewFile,BufRead .gdbinit,gdbinit setf gdb
+au BufNewFile,BufRead .gdbinit,gdbinit,.gdbearlyinit,gdbearlyinit,*.gdb setf gdb
" GDMO
au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index f5e4dabfb6..b356f5e3dc 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -225,6 +225,7 @@ local extension = {
fsi = "fsharp",
fsx = "fsharp",
fusion = "fusion",
+ gdb = "gdb",
gdmo = "gdmo",
mo = "gdmo",
tres = "gdresource",
@@ -919,6 +920,8 @@ local filename = {
mtab = "fstab",
[".gdbinit"] = "gdb",
gdbinit = "gdb",
+ [".gdbearlyinit"] = "gdb",
+ gdbearlyinit = "gdb",
["lltxxxxx.txt"] = "gedcom",
["TAG_EDITMSG"] = "gitcommit",
["MERGE_MSG"] = "gitcommit",
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim
index 5f4a7dac6e..839d160e39 100644
--- a/src/nvim/testdir/test_filetype.vim
+++ b/src/nvim/testdir/test_filetype.vim
@@ -196,7 +196,7 @@ let s:filename_checks = {
\ 'fstab': ['fstab', 'mtab'],
\ 'fusion': ['file.fusion'],
\ 'fvwm': ['/.fvwm/file', 'any/.fvwm/file'],
- \ 'gdb': ['.gdbinit', 'gdbinit'],
+ \ 'gdb': ['.gdbinit', 'gdbinit', 'file.gdb', '.config/gdbearlyinit', '.gdbearlyinit'],
\ 'gdresource': ['file.tscn', 'file.tres'],
\ 'gdscript': ['file.gd'],
\ 'gdmo': ['file.mo', 'file.gdmo'],