Make all plugin configs return a function
Simplifies writing the `config = ...` field for each plugin
This commit is contained in:
@@ -16,9 +16,13 @@
|
||||
|
||||
-- https://github.com/williamboman/mason-lspconfig.nvim
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
-- A list of servers to automatically install if they're not already installed. Example: { "rust_analyzer@nightly", "lua_ls" }
|
||||
-- This setting has no relation with the `automatic_installation` setting.
|
||||
---@type string[]
|
||||
ensure_installed = require("lsp"):language_servers(),
|
||||
})
|
||||
local function setup()
|
||||
require("mason-lspconfig").setup({
|
||||
-- A list of servers to automatically install if they're not already installed. Example: { "rust_analyzer@nightly", "lua_ls" }
|
||||
-- This setting has no relation with the `automatic_installation` setting.
|
||||
---@type string[]
|
||||
ensure_installed = require("lsp"):language_servers(),
|
||||
})
|
||||
end
|
||||
|
||||
return setup
|
||||
|
||||
Reference in New Issue
Block a user