From c49de8cb6ce15d858e9341b5a733af13ea8f8d48 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@clevo" Date: Sat, 13 Aug 2022 23:55:23 +0200 Subject: [PATCH] Add jedi language server --- roles/neovim/files/lua/lsp/python.lua | 8 ++++++++ roles/neovim/files/lua/plugins/options/lsp.lua | 1 + roles/neovim/tasks/main.yml | 2 ++ 3 files changed, 11 insertions(+) create mode 100644 roles/neovim/files/lua/lsp/python.lua diff --git a/roles/neovim/files/lua/lsp/python.lua b/roles/neovim/files/lua/lsp/python.lua new file mode 100644 index 0000000..27b83f4 --- /dev/null +++ b/roles/neovim/files/lua/lsp/python.lua @@ -0,0 +1,8 @@ +-- LSP Server for Python + +local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) + +require'lspconfig'.jedi_language_server.setup { + capabilities = capabilities, + on_attach = global_attach, +} diff --git a/roles/neovim/files/lua/plugins/options/lsp.lua b/roles/neovim/files/lua/plugins/options/lsp.lua index 87f5eda..680fd55 100644 --- a/roles/neovim/files/lua/plugins/options/lsp.lua +++ b/roles/neovim/files/lua/plugins/options/lsp.lua @@ -17,3 +17,4 @@ require('lsp.bash') require('lsp.latex') require('lsp.lua') require('lsp.markdown') +require('lsp.python') diff --git a/roles/neovim/tasks/main.yml b/roles/neovim/tasks/main.yml index 90e905d..fb68f45 100644 --- a/roles/neovim/tasks/main.yml +++ b/roles/neovim/tasks/main.yml @@ -25,6 +25,7 @@ - python-black - shellcheck - bash-language-server + - jedi-language-server - lua-language-server - texlab - name: Install things with npm (Archlinux) @@ -79,6 +80,7 @@ pip: name: - ansible-lint + - jedi-language-server extra_args: --user - name: Install things with npm (Debian) become: true