57 lines
1.5 KiB
Nix
57 lines
1.5 KiB
Nix
|
{
|
||
|
inputs = {
|
||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||
|
utils.url = "github:numtide/flake-utils";
|
||
|
};
|
||
|
|
||
|
outputs = { self, nixpkgs, utils }:
|
||
|
utils.lib.eachDefaultSystem (system:
|
||
|
let
|
||
|
pkgs = import nixpkgs { inherit system; };
|
||
|
|
||
|
neovim = pkgs.wrapNeovim pkgs.neovim-unwrapped
|
||
|
{
|
||
|
withPython3 = false;
|
||
|
withNodeJs = false;
|
||
|
withRuby = false;
|
||
|
|
||
|
configure = {
|
||
|
customRC = ''
|
||
|
lua << EOF
|
||
|
require("nvim-treesitter.configs").setup({
|
||
|
-- A list of parser names, or "all"
|
||
|
ensure_installed = {},
|
||
|
|
||
|
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||
|
sync_install = false,
|
||
|
|
||
|
highlight = {
|
||
|
enable = true,
|
||
|
},
|
||
|
|
||
|
indent = {
|
||
|
enable = true,
|
||
|
},
|
||
|
})
|
||
|
EOF
|
||
|
'';
|
||
|
|
||
|
packages.myVimPackages =
|
||
|
{
|
||
|
start = with pkgs.vimPlugins; [
|
||
|
(nvim-treesitter.withPlugins
|
||
|
(ts: [
|
||
|
ts.tree-sitter-nix
|
||
|
]))
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
in
|
||
|
{
|
||
|
devShells.default = pkgs.mkShell {
|
||
|
packages = [ neovim ];
|
||
|
};
|
||
|
});
|
||
|
}
|