diff options
| author | Ibrahim Muftee <ibrahim@muftee.net> | 2024-06-19 15:51:34 -0500 |
|---|---|---|
| committer | Ibrahim Muftee <ibrahim@muftee.net> | 2026-07-01 00:23:31 -0400 |
| commit | 9a2b54fda164996e03bacb2eb2076ca4c4479989 (patch) | |
| tree | c5631d1ef805f6be303662d8457ed3251da97aad | |
| parent | ff6b35411a0dfdfd0b367f85d81d24531bfe9446 (diff) | |
feat(nvim): switch python lsp to basedpyright with inlay type hints
| -rw-r--r-- | dot_config/nvim/lua/plugins/lsp-zero.lua | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/dot_config/nvim/lua/plugins/lsp-zero.lua b/dot_config/nvim/lua/plugins/lsp-zero.lua index 0cc0bfe..b58284e 100644 --- a/dot_config/nvim/lua/plugins/lsp-zero.lua +++ b/dot_config/nvim/lua/plugins/lsp-zero.lua @@ -44,13 +44,25 @@ return { require('mason-lspconfig').setup({ ensure_installed = { - 'pyright', + 'basedpyright', 'ruff_lsp', 'tsserver', 'lua_ls', }, handlers = { lsp_zero.default_setup, + basedpyright = function() + local basedpyright_opts = { + settings = { + basedpyright = { + -- Type checking is very strict by default. Standard is a good balance. + typeCheckingMode = "standard", + } + } + } + require('lspconfig').basedpyright.setup(basedpyright_opts) + + end, lua_ls = function() -- (Optional) Configure lua langauge server for neovim local lua_opts = lsp_zero.nvim_lua_ls() @@ -63,6 +75,8 @@ return { underline = false, }) + vim.lsp.inlay_hint.enable() + end, }, |
