add python variant
This commit is contained in:
13
python/nvim/init/python.lua
Normal file
13
python/nvim/init/python.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user