new: Make nvim work nicely with python venvs
This commit is contained in:
parent
df5ac44769
commit
f3cdacbe07
1 changed files with 8 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
-- This file defines all the global config
|
||||
local set = vim.opt
|
||||
local g = vim.g
|
||||
local fn = vim.fn
|
||||
|
||||
-- Turn on numbers
|
||||
set.number = true
|
||||
|
@ -29,3 +30,10 @@ set.spelllang = { "en", "programming" }
|
|||
g.loaded_perl_provider = 0
|
||||
g.loaded_node_provider = 0
|
||||
g.loaded_ruby_provider = 0
|
||||
|
||||
-- Make nvim work nicely with venvs
|
||||
if fn.exists("$VIRTUAL_ENV") == 1 then
|
||||
g.python3_host_prog = fn.substitute(fn.system("which -a python3 | head -n2 | tail -n1"), "\n", "", "g")
|
||||
else
|
||||
g.python3_host_prog = fn.substitute(fn.system("which python3"), "\n", "", "g")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue