mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-31 07:09:23 +02:00
feat: configure multiple filetypes per provider (#1725)
This commit is contained in:
parent
195b07a464
commit
efd82c8756
3 changed files with 17 additions and 11 deletions
|
@ -15,10 +15,16 @@ function M:setup()
|
|||
require("lspconfig")["null-ls"].setup(lvim.lsp.null_ls.setup)
|
||||
for filetype, config in pairs(lvim.lang) do
|
||||
if not vim.tbl_isempty(config.formatters) then
|
||||
formatters.setup(config.formatters, filetype)
|
||||
vim.tbl_map(function(c)
|
||||
c.filetypes = { filetype }
|
||||
end, config.formatters)
|
||||
formatters.setup(config.formatters)
|
||||
end
|
||||
if not vim.tbl_isempty(config.linters) then
|
||||
linters.setup(config.linters, filetype)
|
||||
vim.tbl_map(function(c)
|
||||
c.filetypes = { filetype }
|
||||
end, config.formatters)
|
||||
linters.setup(config.linters)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue