Skip to content

Commit

Permalink
feat!: use executables on $PATH (ayamir#738)
Browse files Browse the repository at this point in the history
* fix: use commands in environment variables instead of absolute paths

* fixup! fix: use commands in environment variables instead of absolute paths

---------

Co-authored-by: Jint-lzxy <[email protected]>
  • Loading branch information
2 people authored and bleedingfight committed Jun 22, 2023
1 parent 0c8c022 commit e96f98d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions lua/core/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,9 @@ local function load_options()
if not isempty(conda_prefix) then
vim.g.python_host_prog = conda_prefix .. "/bin/python"
vim.g.python3_host_prog = conda_prefix .. "/bin/python"
elseif global.is_mac then
vim.g.python_host_prog = "/usr/bin/python"
vim.g.python3_host_prog = "/usr/local/bin/python3"
else
vim.g.python_host_prog = "/usr/bin/python"
vim.g.python3_host_prog = "/usr/bin/python3"
vim.g.python_host_prog = "python"
vim.g.python3_host_prog = "python3"
end

for name, value in pairs(global_local) do
Expand Down
4 changes: 2 additions & 2 deletions lua/modules/configs/tool/dap/dap-debugpy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dap.configurations.python = {
},
}

-- NOTE: for people using venv
-- NOTE: This setting is for people using venv
-- pythonPath = function()
-- -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself.
-- -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within.
Expand All @@ -41,6 +41,6 @@ dap.configurations.python = {
-- elseif vim.fn.executable(cwd .. "/.venv/bin/python") == 1 then
-- return cwd .. "/.venv/bin/python"
-- else
-- return "/usr/bin/python"
-- return "python3"
-- end
-- end,
2 changes: 1 addition & 1 deletion lua/modules/configs/tool/dap/dap-lldb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local dap = require("dap")

dap.adapters.lldb = {
type = "executable",
command = "/usr/bin/lldb-vscode",
command = "lldb-vscode",
name = "lldb",
}
dap.configurations.cpp = {
Expand Down

0 comments on commit e96f98d

Please sign in to comment.