mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-31 15:19:26 +02:00
refactor: deprecate lvim.lang.FOO (#1913)
Consolidate configuration styles for linters and formatters Fixes #1756
This commit is contained in:
parent
37e6e5fd5c
commit
e79b6bf8aa
3 changed files with 3 additions and 19 deletions
|
@ -1,8 +1,6 @@
|
|||
local M = {}
|
||||
|
||||
local Log = require "lvim.core.log"
|
||||
local formatters = require "lvim.lsp.null-ls.formatters"
|
||||
local linters = require "lvim.lsp.null-ls.linters"
|
||||
|
||||
function M:setup()
|
||||
local status_ok, null_ls = pcall(require, "null-ls")
|
||||
|
@ -19,20 +17,6 @@ function M:setup()
|
|||
end
|
||||
|
||||
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
|
||||
vim.tbl_map(function(c)
|
||||
c.filetypes = { filetype }
|
||||
end, config.formatters)
|
||||
formatters.setup(config.formatters)
|
||||
end
|
||||
if not vim.tbl_isempty(config.linters) then
|
||||
vim.tbl_map(function(c)
|
||||
c.filetypes = { filetype }
|
||||
end, config.formatters)
|
||||
linters.setup(config.linters)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue