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
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
]))
];
};
};
};
neovim = pkgs.callPackage ./. { };
in
{
devShells.default = pkgs.mkShell {