You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
filetype.lua is now enabled by default (early adopters should make sure to remove vim.g.did_load_filetypes = 0 from their config!).
Huge shoutout to @smjonas and @kessejones for their diligent and patient efforts in porting all the complicated filetype patterns and detection functions and dealing with the edge cases that kept popping up! 🎉
For those coming here from Twitter (and not subscribed to the "Following HEAD" issue): If you were using filetype.lua before, you now must removeg:did_load_filetypes = 0 from your init.vim (which again follows upstream use to disable all filetype detection).
Goal: Make
filetype.lua
detection the default for Neovim 0.8.Roadmap:
filetype.vim
tofiletype.lua
(rough list) feat(filetype): add more filetype patterns to Lua #18219 refactor(runtime): port remaining patterns from filetype.vim to filetype.lua #18814 fix(filetype): fix filetype patterns #19218dist#ft.vim
tofiletype/detect.lua
refactor(runtime): convert dist#ft functions to lua #18247, refactor(runtime): convert more dist#ft functions to lua #18430, refactor(runtime): convert remaining dist#ft functions to lua #18623vim.filetype.match
to return the detected filetype instead of setting it (see Expose filetype matching from filetype.lua #18241) feat(filetype): remove side effects from vim.filetype.match #18894filetype.lua
to set buffer variables invim.filetype.match()
(and allow opting out) feat(filetype): remove side effects from vim.filetype.match #18894filetype.lua
anddetect.lua
to have a clearer separation of concerns; better sorting refactor(runtime): refactor filetype.lua #18813filetype.match()
to allow matching on buffer, filename or contents refactor(filetype)!: allow vim.filetype.match to use different strategies #18895scripts.vim
to Lua refactor(runtime): port scripts.vim to lua #18710[ ] support (builtin) globs in(not needed for parity)nvim__get_runtime
(so Lua and Vimftdetect
files are loaded in the correct order; see fix(runtime): correct load order for ftplugin/* #18426)g:do_filetype_lua
andg:did_load_filetypes
feat(runtime)!: enable filetype.lua by default #19216The text was updated successfully, but these errors were encountered: