mirror of
https://github.com/neovim/neovim.git
synced 2026-04-24 16:25:40 +00:00
vim-patch:9.1.0866: filetype: LLVM IR files are not recognized (#31228)
Problem: filetype: LLVM IR files are not recognized
Solution: detect '*.ll' files either as lifelines or llvm filetype
(Wu, Zhenyu)
closes: vim/vim#15824
bc32bbddcf
N/A patch:
vim-patch:7e4b861: runtime(filetype): remove duplicated *.org file pattern
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
This commit is contained in:
@@ -682,7 +682,6 @@ local extension = {
|
||||
l = 'lex',
|
||||
lhs = 'lhaskell',
|
||||
lidr = 'lidris2',
|
||||
ll = 'lifelines',
|
||||
ly = 'lilypond',
|
||||
ily = 'lilypond',
|
||||
liquid = 'liquid',
|
||||
@@ -697,6 +696,7 @@ local extension = {
|
||||
lt = 'lite',
|
||||
lite = 'lite',
|
||||
livemd = 'livebook',
|
||||
ll = detect.ll,
|
||||
log = detect.log,
|
||||
Log = detect.log,
|
||||
LOG = detect.log,
|
||||
|
||||
@@ -868,6 +868,16 @@ function M.log(path, _)
|
||||
end
|
||||
end
|
||||
|
||||
--- @type vim.filetype.mapfn
|
||||
function M.ll(_, bufnr)
|
||||
local first_line = getline(bufnr, 1)
|
||||
if matchregex(first_line, [[;\|\<source_filename\>\|\<target\>]]) then
|
||||
return 'llvm'
|
||||
else
|
||||
return 'lifelines'
|
||||
end
|
||||
end
|
||||
|
||||
--- @type vim.filetype.mapfn
|
||||
function M.lpc(_, bufnr)
|
||||
if vim.g.lpc_syntax_for_c then
|
||||
|
||||
Reference in New Issue
Block a user