diff --git a/lua/absolute/after/jedi.lua b/lua/absolute/after/jedi.lua index 4f1e263..639ccfe 100644 --- a/lua/absolute/after/jedi.lua +++ b/lua/absolute/after/jedi.lua @@ -1,3 +1,8 @@ + +vim.g["jedi#popup_on_dot"] = 0 + + +-- Keybindings vim.g["jedi#goto_command"] = "" -- "d" vim.g["jedi#goto_assignments_command"] = "gD" vim.g["jedi#goto_stubs_command"] = "" -- "s" diff --git a/lua/absolute/after/lsp-config.lua b/lua/absolute/after/lsp-config.lua index 77342d2..48b8b73 100644 --- a/lua/absolute/after/lsp-config.lua +++ b/lua/absolute/after/lsp-config.lua @@ -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, }) diff --git a/lua/absolute/after/mason.lua b/lua/absolute/after/mason.lua index 780359b..81c8966 100644 --- a/lua/absolute/after/mason.lua +++ b/lua/absolute/after/mason.lua @@ -10,7 +10,7 @@ require("mason-lspconfig").setup({ "tailwindcss", "svelte", "cssls", - "pyright" + "jedi_language_server", }, automatic_installation = true, }) diff --git a/lua/absolute/after/poet-v.lua b/lua/absolute/after/poet-v.lua index e0a0317..6614442 100644 --- a/lua/absolute/after/poet-v.lua +++ b/lua/absolute/after/poet-v.lua @@ -15,3 +15,8 @@ vim.keymap.set("n", "pva", "PoetvActivate", opts) -- Poetv: Deactivate Virtualenv opts.desc = "Poetv: Deactivate virtualenv" vim.keymap.set("n", "pvd", "PoetvDeactivate", opts) + +-- Setup Autocommands + +vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, + { pattern = { "*/.venv/*", "*.py" }, callback = function() vim.cmd([[ PoetvActivate]]) end })