fix: file pattern match
This commit is contained in:
parent
745c028e35
commit
48ee862b35
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ function M.on_attach(client, bufnr)
|
||||||
-- autocommand for format on save with specified filetype(s)
|
-- autocommand for format on save with specified filetype(s)
|
||||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||||
callback = function(ev)
|
callback = function(ev)
|
||||||
for pattern, _ in pairs(filetype_patterns) do
|
for _, pattern in pairs(filetype_patterns) do
|
||||||
if string.match(ev.file, pattern) then
|
if string.match(ev.file, pattern) then
|
||||||
filetype_allowed = true
|
filetype_allowed = true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue