From c137431c14481ac784af7c70d287e42a4579f198 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 8 Jan 2023 15:07:07 +0100 Subject: refactor!: use new `opts` property --- lua/plugins/lsp.lua | 56 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 23 deletions(-) (limited to 'lua/plugins/lsp.lua') diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 6a7506b..342d408 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -3,39 +3,49 @@ return { -- uncomment and add lsp servers with their config to servers below { "neovim/nvim-lspconfig", - -- you can do any additional lsp server setup here - -- return true if you don't want this server to be setup with lspconfig - ---@param server string lsp server name - ---@param opts _.lspconfig.options any options set for the server - -- setup_server = function(server, opts) - -- return false - -- end, - ---@type lspconfig.options - -- servers = { - -- jsonls = {}, - -- sumneko_lua = { - -- settings = { - -- Lua = { - -- workspace = { - -- checkThirdParty = false, - -- }, - -- completion = { - -- callSnippet = "Replace", + -- ---@class PluginLspOpts + -- opts = { + -- ---@type lspconfig.options + -- servers = { + -- jsonls = {}, + -- sumneko_lua = { + -- settings = { + -- Lua = { + -- workspace = { + -- checkThirdParty = false, + -- }, + -- completion = { + -- callSnippet = "Replace", + -- }, -- }, -- }, -- }, -- }, + -- -- you can do any additional lsp server setup here + -- -- return true if you don't want this server to be setup with lspconfig + -- ---@type table + -- setup = { + -- -- example to setup with typescript.nvim + -- -- tsserver = function(_, opts) + -- -- require("typescript").setup({ server = opts }) + -- -- return true + -- -- end, + -- -- Specify * to use this function as a fallback for any server + -- -- ["*"] = function(server, opts) end, + -- }, -- }, }, -- uncomment and add tools to ensure_installed below { "williamboman/mason.nvim", - -- ensure_installed = { - -- "stylua", - -- "shellcheck", - -- "shfmt", - -- "flake8", + -- opts = { + -- ensure_installed = { + -- "stylua", + -- "shellcheck", + -- "shfmt", + -- "flake8", + -- }, -- }, }, } -- cgit v1.2.3