mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-13 16:12:40 +02:00
revert: shell wrapper for neovim's terminal still useless on macOS
This commit is contained in:
@@ -72,14 +72,6 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
"akinsho/toggleterm.nvim",
|
|
||||||
opts = function(_, opts)
|
|
||||||
-- custom shell with all neovim's exra packags accessible
|
|
||||||
opts.shell = "nvim-nushell"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"0x00-ketsu/autosave.nvim",
|
"0x00-ketsu/autosave.nvim",
|
||||||
-- lazy-loading on events
|
-- lazy-loading on events
|
||||||
|
|||||||
@@ -38,8 +38,7 @@
|
|||||||
# ];
|
# ];
|
||||||
|
|
||||||
# Extra packages only available to nvim(won't pollute the global home environment)
|
# Extra packages only available to nvim(won't pollute the global home environment)
|
||||||
extraPackages = with pkgs; let
|
extraPackages = with pkgs;
|
||||||
nvim_extra =
|
|
||||||
[
|
[
|
||||||
#-- c/c++
|
#-- c/c++
|
||||||
cmake
|
cmake
|
||||||
@@ -152,29 +151,6 @@
|
|||||||
verible
|
verible
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
in
|
|
||||||
nvim_extra
|
|
||||||
++ [
|
|
||||||
# NOTE: shells installed by nix-darwin will ignore the `PATH` env passed by parent process,
|
|
||||||
# it's likely a bug of nix-darwin, `PATH` passing on NixOS works fine.
|
|
||||||
#
|
|
||||||
# So to access the packages we installed here in neovim's shell session(`:terminal`),
|
|
||||||
# we have to create a shell wrapper with the packages in `PATH` env.
|
|
||||||
(pkgs.runCommand "nvim-shell" rec {
|
|
||||||
nativeBuildInputs =
|
|
||||||
nvim_extra
|
|
||||||
++ [
|
|
||||||
pkgs.nushell
|
|
||||||
pkgs.bash
|
|
||||||
];
|
|
||||||
PATH = lib.makeBinPath nativeBuildInputs;
|
|
||||||
} ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
|
|
||||||
ln -s ${pkgs.nushell}/bin/nu $out/bin/nvim-nushell
|
|
||||||
ln -s ${pkgs.bash}/bin/bash $out/bin/nvim-bash
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user