all repos

init.lua @ f0588aab5671630f511f3576c9a60cb94d4e2fbc

my nvim config
1 files changed, 50 insertions(+), 0 deletions(-)
feat(lsp): add lsp servers config
Author: Smirnov Olexander ss2316544@gmail.com
Committed at: 2022-04-29 22:56:58 +0300
Parent: 8971bec
M lua/configs/lsp/providers.lua

@@ -1,3 +1,53 @@

+---@param server Server +---@param opts table +---@return table return function(server, opts) + if server.name == "sumneko_lua" then + return vim.tbl_extend( + "force", + opts, + require("lua-dev").setup { lspconfig = server:get_default_options() } + ) + end + + if server.name == "pyright" then + return vim.tbl_extend("force", opts, { + python = { + disableOrganizeImports = true, + autoSearchPaths = true, + analysis = { useLibraryCodeForTypes = false }, + }, + }) + end + + if server.name == "gopls" then + return vim.tbl_extend("force", opts, { + settings = { + gopls = { + linksInHover = false, + analyses = { + unusedparams = true, + unreachable = true, + }, + staticcheck = true, + memoryMode = "Normal", + }, + }, + }) + end + + if server.name == "yamlls" then + return vim.tbl_extend("force", opts, { + settings = { + yaml = { + schemaStore = { + enable = true, + url = "https://www.schemastore.org/api/json/catalog.json", + }, + }, + }, + }) + end + return opts end