diff options
author | smjonas <jonas.strittmatter@gmx.de> | 2022-07-06 16:25:51 +0200 |
---|---|---|
committer | smjonas <jonas.strittmatter@gmx.de> | 2022-07-06 16:25:51 +0200 |
commit | f9683f28236599a7082f43304a9685fad8ee8e00 (patch) | |
tree | 32c80e667f2de1a7b2ebc7145ec933d822432910 /runtime/filetype.lua | |
parent | f3c78a4465942db62cf231b9eedc5107ad46e655 (diff) | |
download | rneovim-f9683f28236599a7082f43304a9685fad8ee8e00.tar.gz rneovim-f9683f28236599a7082f43304a9685fad8ee8e00.tar.bz2 rneovim-f9683f28236599a7082f43304a9685fad8ee8e00.zip |
fix(filetype): remove call to vim.fn.resolve and pass filename to match function
For example on MacOS, /etc/hostname.file is symlinked to
/private/etc/hostname.file. We only care about the original file path though.
Diffstat (limited to 'runtime/filetype.lua')
-rw-r--r-- | runtime/filetype.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/filetype.lua b/runtime/filetype.lua index 7728892c78..f1885a8b95 100644 --- a/runtime/filetype.lua +++ b/runtime/filetype.lua @@ -12,7 +12,7 @@ vim.api.nvim_create_augroup('filetypedetect', { clear = false }) vim.api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { group = 'filetypedetect', callback = function(args) - local ft, on_detect = vim.filetype.match({ buf = args.buf }) + local ft, on_detect = vim.filetype.match({ filename = args.match, buf = args.buf }) if not ft then -- Generic configuration file used as fallback ft = require('vim.filetype.detect').conf(args.file, args.buf) |