aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/filetype
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-10-18 20:05:50 +0200
committerGitHub <noreply@github.com>2022-10-18 20:05:50 +0200
commit228a04070e94ca31884f304f3a8d34e67654025d (patch)
treec76590e93ac4b62ab1b18c8a88bc86c15cbe8ae1 /runtime/lua/vim/filetype
parentaa2f08a050682ed6b2ffae521feec88451f2d3c0 (diff)
downloadrneovim-228a04070e94ca31884f304f3a8d34e67654025d.tar.gz
rneovim-228a04070e94ca31884f304f3a8d34e67654025d.tar.bz2
rneovim-228a04070e94ca31884f304f3a8d34e67654025d.zip
vim-patch:9.0.0779: lsl and lm3 file extensions are not recognized (#20704)
Problem: lsl and lm3 file extensions are not recognized. Solution: Add *.lsl and *.lm3 patterns. (Doug Kearns, closes vim/vim#11384) https://github.com/vim/vim/commit/4ac8e7948cb3e07bc4598ede8b274891d14dfa7c
Diffstat (limited to 'runtime/lua/vim/filetype')
-rw-r--r--runtime/lua/vim/filetype/detect.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/runtime/lua/vim/filetype/detect.lua b/runtime/lua/vim/filetype/detect.lua
index 23fa1c5068..51ea1971cb 100644
--- a/runtime/lua/vim/filetype/detect.lua
+++ b/runtime/lua/vim/filetype/detect.lua
@@ -634,6 +634,19 @@ function M.lpc(bufnr)
return 'c'
end
+function M.lsl(bufnr)
+ if vim.g.filetype_lsl then
+ return vim.g.filetype_lsl
+ end
+
+ local line = nextnonblank(bufnr, 1)
+ if findany(line, { '^%s*%%', ':%s*trait%s*$' }) then
+ return 'larch'
+ else
+ return 'lsl'
+ end
+end
+
function M.m(bufnr)
if vim.g.filetype_m then
return vim.g.filetype_m