Compare commits

...

1 Commits

Author SHA1 Message Date
68a7427e80 changed flake.nix 2026-03-05 11:11:10 +00:00

View File

@@ -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"