aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-04-19 15:35:25 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-04-19 16:09:41 +0200
commit52d2851ca4e747146c30e1996c08bf504d99fe95 (patch)
tree9bce6c407fdd108fa2ee6ad890f8eea3c532855a
parent57c8f68e3bc7c7e830202c8d63e475368de50076 (diff)
downloadrneovim-52d2851ca4e747146c30e1996c08bf504d99fe95.tar.gz
rneovim-52d2851ca4e747146c30e1996c08bf504d99fe95.tar.bz2
rneovim-52d2851ca4e747146c30e1996c08bf504d99fe95.zip
vim-patch:9.1.0355: filetype: flake.lock files are not recognized
Problem: filetype: flake.lock files are not recognized Solution: Detect 'flake.lock' as json filetype (Riley Bruins) closes: vim/vim#14589 https://github.com/vim/vim/commit/ce736033ae86e14e8b1a56a3e4843c7ab24e48d2 Co-authored-by: Riley Bruins <ribru17@hotmail.com>
-rw-r--r--runtime/lua/vim/filetype.lua1
-rw-r--r--test/old/testdir/test_filetype.vim2
2 files changed, 2 insertions, 1 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index bcc745f125..a4c57bbc52 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -1436,6 +1436,7 @@ local filename = {
['.firebaserc'] = 'json',
['.prettierrc'] = 'json',
['.stylelintrc'] = 'json',
+ ['flake.lock'] = 'json',
['.babelrc'] = 'jsonc',
['.eslintrc'] = 'jsonc',
['.hintrc'] = 'jsonc',
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim
index f1cc06c61f..45e5eb996f 100644
--- a/test/old/testdir/test_filetype.vim
+++ b/test/old/testdir/test_filetype.vim
@@ -362,7 +362,7 @@ func s:GetFilenameChecks() abort
\ 'jq': ['file.jq'],
\ 'jovial': ['file.jov', 'file.j73', 'file.jovial'],
\ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file', 'org.eclipse.xyz.prefs'],
- \ 'json': ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings', '.prettierrc', '.firebaserc', '.stylelintrc', 'file.slnf', 'file.sublime-project', 'file.sublime-settings', 'file.sublime-workspace', 'file.bd', 'file.bda', 'file.xci'],
+ \ 'json': ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings', '.prettierrc', '.firebaserc', '.stylelintrc', 'file.slnf', 'file.sublime-project', 'file.sublime-settings', 'file.sublime-workspace', 'file.bd', 'file.bda', 'file.xci', 'flake.lock'],
\ 'json5': ['file.json5'],
\ 'jsonc': ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.jscsrc', '.vsconfig', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json', '.luaurc'],
\ 'jsonl': ['file.jsonl'],