Sanchayan Maity
9a26ef9c10
Use the new vim.lsp.start API and LspAttach/Detach auto commands. Drop nvim-lspconfig in the process. LSP server specific configuration has been taken from nvim-lspconfig.
24 lines
573 B
Lua
24 lines
573 B
Lua
local root_files = { 'pyproject.toml', 'setup.py', 'setup.cfg', 'requirements.txt', 'Pipfile' }
|
|
local path = vim.fs.find(root_files, { type = "file" })
|
|
local root = vim.fs.dirname(path[1])
|
|
|
|
vim.lsp.start({
|
|
name = "jedi-language-server",
|
|
cmd = { "jedi-language-server" },
|
|
filetypes = { 'python' },
|
|
root_dir = root,
|
|
init_options = {
|
|
completion = {
|
|
resolveEagerly = true,
|
|
},
|
|
jediSettings = {
|
|
caseInsensitiveCompletion = false,
|
|
},
|
|
workspace = {
|
|
symbols = {
|
|
maxSymbols = 50
|
|
},
|
|
},
|
|
},
|
|
})
|