A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/neovim/neovim/commit/fdea15723fab6a3ee96218f13669d9f2e0a6d6d7 below:

support scripts.vim with filetype.lua (#17517) · neovim/neovim@fdea157 · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+7

-0

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+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