changed flake.nix
This commit is contained in:
34
flake.nix
34
flake.nix
@@ -5,17 +5,12 @@
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
outputs =
|
||||
{ self, nixpkgs }:
|
||||
let
|
||||
system = "x86_64-linux"; # change if needed
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
|
||||
packages = with pkgs; [
|
||||
# neovim
|
||||
neovim
|
||||
pkgList = with pkgs; [
|
||||
|
||||
# LSPs
|
||||
lua-language-server
|
||||
@@ -59,10 +54,31 @@
|
||||
amsmath
|
||||
ulem
|
||||
hyperref
|
||||
capt-of;
|
||||
capt-of
|
||||
;
|
||||
})
|
||||
];
|
||||
|
||||
nvim-wrapped = pkgs.symlinkJoin {
|
||||
name = "nvim-with-lsp";
|
||||
paths = [ pkgs.neovim ];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/nvim \
|
||||
--prefix PATH : ${pkgs.lib.makeBinPath pkgList} \
|
||||
--set TREE_SITTER_LIB_PATH "${pkgs.tree-sitter}/lib"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
packages.${system}.default = nvim-wrapped;
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
|
||||
packages = [
|
||||
nvim-wrapped
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
export TREE_SITTER_LIB_PATH="${pkgs.tree-sitter}/lib"
|
||||
echo "Neovim LSP environment loaded"
|
||||
|
||||
Reference in New Issue
Block a user