From caf6878b2c411d158284df3c068b4b559296b69a Mon Sep 17 00:00:00 2001 From: Daveanand Mannie Date: Sun, 25 Aug 2024 18:14:59 -0400 Subject: [PATCH] update to lsp configurations --- lua/plugins/lsp.lua | 25 +++++++++++++++++++++++++ lua/plugins/which-key.lua | 14 ++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 lua/plugins/lsp.lua create mode 100644 lua/plugins/which-key.lua diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua new file mode 100644 index 0000000..b091f87 --- /dev/null +++ b/lua/plugins/lsp.lua @@ -0,0 +1,25 @@ +return { + { + "neovim/nvim-lspconfig", + opts = function() + local lspconfig = require('lspconfig') + lspconfig.basedpyright.setup { + settings = { + python = { + analysis = { + inlayHints = { + variableTypes = false, + functionReturnTypes = false, + }, + }, + }, + }, + on_attach = function(client, bufnr) + if client.server_capabilities.inlayHintProvider then + vim.lsp.buf.inlay_hint(bufnr, false) + end + end, + } + end, + }, +} diff --git a/lua/plugins/which-key.lua b/lua/plugins/which-key.lua new file mode 100644 index 0000000..795ba2a --- /dev/null +++ b/lua/plugins/which-key.lua @@ -0,0 +1,14 @@ +return { + { + "folke/which-key.nvim", + config = function() + local wk = require("which-key") + + wk.add( + { + { "cL", ":LspRestart", desc = "Restart LSP"}, + } + ) + end, + }, +}