From ff52cc24f0a608f254d2f038e2acc6263b455c78 Mon Sep 17 00:00:00 2001 From: Daniel Carrillo Date: Sun, 12 Mar 2023 13:58:45 +0100 Subject: [PATCH] . --- .config/nvim/lua/plugins/lsp/handlers.lua | 6 +++--- .config/nvim/lua/plugins/lsp/mason.lua | 3 ++- .config/nvim/lua/plugins/lsp/settings/pyright.lua | 10 ++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 .config/nvim/lua/plugins/lsp/settings/pyright.lua diff --git a/.config/nvim/lua/plugins/lsp/handlers.lua b/.config/nvim/lua/plugins/lsp/handlers.lua index cafde0d..3c4206f 100644 --- a/.config/nvim/lua/plugins/lsp/handlers.lua +++ b/.config/nvim/lua/plugins/lsp/handlers.lua @@ -50,12 +50,12 @@ M.setup = function() end M.on_attach = function(client) - if client.name == "tsserver" then + if client.name == "lua_ls" then client.server_capabilities.document_formatting = false end - if client.name == "lua_ls" then - client.server_capabilities.document_formatting = false + if client.name == "ruff-lsp" then + client.server_capabilities.hover = false end local status_ok, illuminate = pcall(require, "illuminate") diff --git a/.config/nvim/lua/plugins/lsp/mason.lua b/.config/nvim/lua/plugins/lsp/mason.lua index edee4ba..da487f1 100644 --- a/.config/nvim/lua/plugins/lsp/mason.lua +++ b/.config/nvim/lua/plugins/lsp/mason.lua @@ -5,8 +5,9 @@ local servers = { "html", "jdtls", "jsonls", - "pyright", "lua_ls", + "pyright", + "ruff_lsp", "terraformls", "yamlls", } diff --git a/.config/nvim/lua/plugins/lsp/settings/pyright.lua b/.config/nvim/lua/plugins/lsp/settings/pyright.lua new file mode 100644 index 0000000..a5d98b2 --- /dev/null +++ b/.config/nvim/lua/plugins/lsp/settings/pyright.lua @@ -0,0 +1,10 @@ +return { + settings = { + python = { + analysis = { + autoSearchPaths = true, + useLibraryCodeForTypes = true, + }, + }, + }, +}