+7
-0
lines changedFilter options
+7
-0
lines changed Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ if vim.g.do_filetype_lua ~= 1 then
7
7
return
8
8
end
9
9
10
+
-- TODO: Remove vim.cmd once Lua autocommands land
10
11
vim.cmd [[
11
12
augroup filetypedetect
12
13
au BufRead,BufNewFile * call v:lua.vim.filetype.match(expand('<afile>'))
@@ -18,6 +19,12 @@ runtime! ftdetect/*.lua
18
19
" Set a marker so that the ftdetect scripts are not sourced a second time by filetype.vim
19
20
let g:did_load_ftdetect = 1
20
21
22
+
" If filetype.vim is disabled, set up the autocmd to use scripts.vim
23
+
if exists('did_load_filetypes')
24
+
au BufRead,BufNewFile * if !did_filetype() && expand('<amatch>') !~ g:ft_ignore_pat | runtime! scripts.vim | endif
25
+
au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif
26
+
endif
27
+
21
28
augroup END
22
29
]]
23
30
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4