chore(jedi.lua): disable popup on dot in jedi plugin configuration

chore(jedi.lua): remove unused keybindings in jedi plugin configuration
chore(lsp-config.lua): remove pyright language server configuration
feat(lsp-config.lua): add jedi_completion plugin configuration to pylsp language server
feat(lsp-config.lua): add jedi_language_server configuration
chore(mason.lua): remove pyright language server from mason plugin configuration
feat(mason.lua): add jedi_language_server to mason plugin configuration
chore(poet-v.lua): add autocommand to activate virtualenv when entering a buffer with .venv or .py file
This commit is contained in:
David Ibia
2024-01-03 19:05:06 +01:00
parent aee290dcf9
commit 68aba67294
4 changed files with 25 additions and 7 deletions

View File

@@ -1,3 +1,8 @@
vim.g["jedi#popup_on_dot"] = 0
-- Keybindings
vim.g["jedi#goto_command"] = "" -- "<leader>d"
vim.g["jedi#goto_assignments_command"] = "<leader>gD"
vim.g["jedi#goto_stubs_command"] = "" -- "<leader>s"

View File

@@ -111,16 +111,24 @@ lspconfig["emmet_ls"].setup({
filetypes = { "html", "typescriptreact", "javascriptreact", "css", "sass", "scss", "less", "svelte" },
})
-- -- configure python server
-- lspconfig["pyright"].setup({
-- capabilities = capabilities,
-- on_attach = on_attach,
-- })
-- configure python lsp
lspconfig["pylsp"].setup({
capabilities = capabilities,
on_attach = on_attach,
pylsp = {
plugins = {
jedi_completion = {
include_params = true
}
}
}
})
-- configure jedi language server
lspconfig["jedi_language_server"].setup({
capabilities = capabilities,
on_attach = on_attach,
})

View File

@@ -10,7 +10,7 @@ require("mason-lspconfig").setup({
"tailwindcss",
"svelte",
"cssls",
"pyright"
"jedi_language_server",
},
automatic_installation = true,
})

View File

@@ -15,3 +15,8 @@ vim.keymap.set("n", "<leader>pva", "<cmd>PoetvActivate<CR>", opts)
-- Poetv: Deactivate Virtualenv
opts.desc = "Poetv: Deactivate virtualenv"
vim.keymap.set("n", "<leader>pvd", "<cmd>PoetvDeactivate<CR>", opts)
-- Setup Autocommands
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" },
{ pattern = { "*/.venv/*", "*.py" }, callback = function() vim.cmd([[ PoetvActivate]]) end })