-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathconfig.lua
More file actions
32 lines (31 loc) · 754 Bytes
/
config.lua
File metadata and controls
32 lines (31 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
local function get_python_path()
if vim.env.VIRTUAL_ENV then
if vim.fn.has("nvim-0.10") == 1 then
return vim.fs.joinpath(vim.env.VIRTUAL_ENV, "bin", "python")
end
return vim.env.VIRTUAL_ENV .. "/bin" .. "/python"
end
if vim.env.PY_BIN then
return vim.env.PY_BIN
end
local python = vim.fn.exepath("python3")
if python == nil or python == "" then
python = vim.fn.exepath("python")
end
return python
end
local M = {
env = {
py_bin = get_python_path(),
rime_ls_bin = vim.env["RIME_LS_BIN"],
},
plugin = {
copilot = {
enable = vim.env["COPILOT_ENABLE"] == "Y" and true or false,
},
codeium = {
enable = vim.env["CODEIUM_ENABLE"] == "Y" and true or false,
},
},
}
return M