Files
code/python/nvim/init/python.lua
2023-06-10 15:25:00 +02:00

14 lines
293 B
Lua

local lspconfig = require('lspconfig')
-- Get python executable from env
local python = vim.fn.globpath(vim.fn.getcwd(), "env/bin/python")
-- Set configuration
local config = {}
if python ~= '' then
config.cmd = { python, '-m', 'pylsp' }
end
-- Set up pylsp
lspconfig.pylsp.setup(config)