update to lsp configurations

This commit is contained in:
Daveanand Mannie
2024-08-25 18:14:59 -04:00
parent 278dbcc34a
commit caf6878b2c
2 changed files with 39 additions and 0 deletions

25
lua/plugins/lsp.lua Normal file
View File

@@ -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,
},
}

14
lua/plugins/which-key.lua Normal file
View File

@@ -0,0 +1,14 @@
return {
{
"folke/which-key.nvim",
config = function()
local wk = require("which-key")
wk.add(
{
{ "<leader><leader>cL", ":LspRestart<CR>", desc = "Restart LSP"},
}
)
end,
},
}