move building to default

This commit is contained in:
Dmitriy Pleshevskiy 2022-09-15 01:29:25 +03:00
parent c0e15868ee
commit 3fcc13077d
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
2 changed files with 40 additions and 38 deletions

39
default.nix Normal file
View file

@ -0,0 +1,39 @@
{ wrapNeovim, neovim-unwrapped, vimPlugins, ... }:
wrapNeovim 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 vimPlugins; [
(nvim-treesitter.withPlugins
(ts: [
ts.tree-sitter-nix
]))
];
};
};
}

View file

@ -9,44 +9,7 @@
let let
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
neovim = pkgs.wrapNeovim pkgs.neovim-unwrapped neovim = pkgs.callPackage ./. { };
{
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 in
{ {
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {