Skip to content

Commit ad997f9

Browse files
committed
set up python provider
1 parent 652e95b commit ad997f9

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

lua/globals.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
local utils = require("utils")
22

3+
local config_path = vim.fn.stdpath("config")
4+
local python3_path = vim.fs.joinpath(config_path, ".venv/bin/python3")
5+
if not vim.uv.fs_stat(python3_path) then
6+
local msg = string.format(
7+
"Python provider missing:\n create a virtual env under nvim config and install pynvim!"
8+
)
9+
vim.api.nvim_echo({ { msg } }, true, { err = true })
10+
else
11+
vim.g.python3_host_prog = python3_path
12+
end
13+
314
------------------------------------------------------------------------
415
-- custom variables --
516
------------------------------------------------------------------------

0 commit comments

Comments
 (0)