mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
f3ce06cfa1
This enables vim.filetype.match to match based on a buffer (most accurate) or simply a filename or file contents, which are less accurate but may still be useful for some scenarios. When matching based on a buffer, the buffer's name and contents are both used to do full filetype matching. When using a filename, if the file exists the file is loaded into a buffer and full filetype detection is performed. If the file does not exist then filetype matching is only performed against the filename itself. Content-based matching does the equivalent of scripts.vim, and matches solely based on file contents without any information from the name of the file itself (e.g. for shebangs). BREAKING CHANGE: use `vim.filetype.match({buf = bufnr})` instead of `vim.filetype.match(name, bufnr)` |
||
---|---|---|
.. | ||
autoload | ||
colors | ||
compiler | ||
doc | ||
ftplugin | ||
indent | ||
keymap | ||
lua | ||
macros | ||
pack/dist/opt | ||
plugin | ||
queries/c | ||
spell | ||
syntax | ||
tools | ||
tutor | ||
bugreport.vim | ||
CMakeLists.txt | ||
delmenu.vim | ||
filetype.lua | ||
filetype.vim | ||
ftoff.vim | ||
ftplugin.vim | ||
ftplugof.vim | ||
indent.vim | ||
indoff.vim | ||
macmap.vim | ||
makemenu.vim | ||
menu.vim | ||
mswin.vim | ||
nvim.appdata.xml | ||
nvim.desktop | ||
nvim.png | ||
optwin.vim | ||
scripts.vim | ||
synmenu.vim |