Compare commits
1 Commits
7a05a15b29
...
68a7427e80
| Author | SHA1 | Date | |
|---|---|---|---|
| 68a7427e80 |
34
flake.nix
34
flake.nix
@@ -5,17 +5,12 @@
|
|||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs }:
|
outputs =
|
||||||
|
{ self, nixpkgs }:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux"; # change if needed
|
system = "x86_64-linux"; # change if needed
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
in
|
pkgList = with pkgs; [
|
||||||
{
|
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
|
||||||
|
|
||||||
packages = with pkgs; [
|
|
||||||
# neovim
|
|
||||||
neovim
|
|
||||||
|
|
||||||
# LSPs
|
# LSPs
|
||||||
lua-language-server
|
lua-language-server
|
||||||
@@ -59,10 +54,31 @@
|
|||||||
amsmath
|
amsmath
|
||||||
ulem
|
ulem
|
||||||
hyperref
|
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 = ''
|
shellHook = ''
|
||||||
export TREE_SITTER_LIB_PATH="${pkgs.tree-sitter}/lib"
|
export TREE_SITTER_LIB_PATH="${pkgs.tree-sitter}/lib"
|
||||||
echo "Neovim LSP environment loaded"
|
echo "Neovim LSP environment loaded"
|
||||||
|
|||||||
Reference in New Issue
Block a user