Skip to content

Commit

Permalink
Fix pixi detection
Browse files Browse the repository at this point in the history
  • Loading branch information
JafarAbdi committed Feb 6, 2025
1 parent 10f8d20 commit dee8905
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions fish/config.fish
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,10 @@ function ros_kill
$(pgrep -af gzclient | cut -d' ' -f1)
end

function reset_cuda
sudo modprobe -r nvidia_uvm && sudo modprobe nvidia_uvm
end

function postexec --on-event fish_postexec
echo -e '\a'
end
9 changes: 6 additions & 3 deletions neovim/.config/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,10 @@ end
local runners = {
python = function(file_path, root_dir, is_test)
local python_executable = "python3"
if vim.uv.fs_stat(vim.fs.joinpath(root_dir, ".pixi")) ~= nil then
python_executable = vim.fs.joinpath(root_dir, ".pixi", "envs", "default", "bin", "python")
local pixi_python_executable =
vim.fs.joinpath(root_dir, ".pixi", "envs", "default", "bin", "python")
if vim.uv.fs_stat(pixi_python_executable) ~= nil then
python_executable = pixi_python_executable
end
if is_test then
if not file_path:match("^test_") and not file_path:match("_test%.py$") then
Expand Down Expand Up @@ -1149,7 +1151,8 @@ local servers = {
type = "directory",
})
if #pixi > 0 then
if vim.fn.isdirectory(vim.fs.joinpath(pixi[1], "envs", "default")) == 1 then
local pixi_python_executable = vim.fs.joinpath(pixi[1], "envs", "default", "bin", "python")
if vim.uv.fs_stat(pixi_python_executable) then
options.workspace.environmentPath = pixi[1] .. "/envs/default"
end
end
Expand Down

0 comments on commit dee8905

Please sign in to comment.