feat: clean up

This commit is contained in:
Matthew Leong 2023-10-18 19:49:23 -07:00
parent c978fd185e
commit 745c028e35

View file

@ -29,11 +29,8 @@ function M.on_attach(client, bufnr)
local filetype_patterns = {} local filetype_patterns = {}
local filetype_allowed = false local filetype_allowed = false
if vim.tbl_islist(user_config.lsp.format_on_save) then if vim.tbl_islist(user_config.lsp.format_on_save) then
for _, ft in pairs(user_config.lsp.format_on_save) do filetype_patterns = user_config.lsp.format_on_save
table.insert(filetype_patterns, '*' .. ft)
end
else -- any filetype if none set else -- any filetype if none set
table.insert(filetype_patterns, '*')
filetype_allowed = true filetype_allowed = true
end end