aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/system_spec.lua
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2022-06-26 10:41:20 -0600
committerGitHub <noreply@github.com>2022-06-26 18:41:20 +0200
commitf3ce06cfa139ca3fb142cf5adf96a2ecc4d8f551 (patch)
tree2454132cd59362a4ad0b232af644ec10917c37ad /test/functional/vimscript/system_spec.lua
parentae3e371303a3f806e0deed3c57ed3892cbfc4f22 (diff)
downloadrneovim-f3ce06cfa139ca3fb142cf5adf96a2ecc4d8f551.tar.gz
rneovim-f3ce06cfa139ca3fb142cf5adf96a2ecc4d8f551.tar.bz2
rneovim-f3ce06cfa139ca3fb142cf5adf96a2ecc4d8f551.zip
refactor(filetype)!: allow vim.filetype.match to use different strategies (#18895)
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)`
Diffstat (limited to 'test/functional/vimscript/system_spec.lua')
0 files changed, 0 insertions, 0 deletions