Add an nvim
package
Now I can run `nix run .#nvim` to run Neovim with any configuration changes without having to rebuild my whole NixOS configuration.
This commit is contained in:
parent
e65f3e42a5
commit
a068e0481f
3 changed files with 71 additions and 59 deletions
|
@ -42,6 +42,12 @@
|
|||
};
|
||||
|
||||
inherit (pkgs) mkShell;
|
||||
|
||||
neovimWithConfig = inputs.nixvim.legacyPackages.${system}.makeNixvimWithModule {
|
||||
inherit pkgs;
|
||||
|
||||
module = import ./modules/home-manager/coding/neovim/nixvim.nix;
|
||||
};
|
||||
in
|
||||
{
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
|
@ -55,6 +61,8 @@
|
|||
|
||||
packages.${system} = {
|
||||
default = mkShell { buildInputs = with pkgs; [ just ]; };
|
||||
|
||||
nvim = neovimWithConfig;
|
||||
};
|
||||
|
||||
formatter.${system} = pkgs.nixfmt-rfc-style;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
|
@ -22,67 +21,10 @@ in
|
|||
programs.nixvim = {
|
||||
enable = true;
|
||||
|
||||
# TODO: re-add DAP.
|
||||
# TODO: re-add snippets.
|
||||
# TODO: re-configure spell.
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
imports = [
|
||||
./keymaps.nix
|
||||
./options.nix
|
||||
./plugins/cmp.nix
|
||||
./plugins/conform.nix
|
||||
./plugins/fidget.nix
|
||||
./plugins/fugitive.nix
|
||||
./plugins/gitsigns.nix
|
||||
./plugins/harpoon.nix
|
||||
./plugins/lint.nix
|
||||
./plugins/lsp.nix
|
||||
./plugins/lualine.nix
|
||||
./plugins/luasnip.nix
|
||||
./plugins/mini.nix
|
||||
./plugins/nvim-autopairs.nix
|
||||
./plugins/oil.nix
|
||||
./plugins/phpactor.nix
|
||||
./plugins/refactoring.nix
|
||||
./plugins/telescope.nix
|
||||
./plugins/treesitter.nix
|
||||
./plugins/undotree.nix
|
||||
./plugins/vim-dadbod.nix
|
||||
./plugins/vim-highlightedyank.nix
|
||||
./plugins/vim-test.nix
|
||||
./plugins/web-devicons.nix
|
||||
];
|
||||
|
||||
colorschemes.catppuccin = {
|
||||
enable = true;
|
||||
settings.flavour = "mocha";
|
||||
};
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
nixfmt-rfc-style
|
||||
stylua
|
||||
];
|
||||
|
||||
filetype = {
|
||||
extension = {
|
||||
"neon.dist" = "yaml";
|
||||
inc = "php";
|
||||
install = "php";
|
||||
module = "php";
|
||||
neon = "yaml";
|
||||
pcss = "scss";
|
||||
theme = "php";
|
||||
};
|
||||
|
||||
filename = {
|
||||
"composer.lock" = "json";
|
||||
};
|
||||
};
|
||||
|
||||
globals.mapleader = " ";
|
||||
imports = [ ./nixvim.nix ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
62
modules/home-manager/coding/neovim/nixvim.nix
Normal file
62
modules/home-manager/coding/neovim/nixvim.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# TODO: re-add DAP.
|
||||
# TODO: re-add snippets.
|
||||
# TODO: re-configure spell.
|
||||
|
||||
imports = [
|
||||
./keymaps.nix
|
||||
./options.nix
|
||||
./plugins/cmp.nix
|
||||
./plugins/conform.nix
|
||||
./plugins/fidget.nix
|
||||
./plugins/fugitive.nix
|
||||
./plugins/gitsigns.nix
|
||||
./plugins/harpoon.nix
|
||||
./plugins/lint.nix
|
||||
./plugins/lsp.nix
|
||||
./plugins/lualine.nix
|
||||
./plugins/luasnip.nix
|
||||
./plugins/mini.nix
|
||||
./plugins/nvim-autopairs.nix
|
||||
./plugins/oil.nix
|
||||
./plugins/phpactor.nix
|
||||
./plugins/refactoring.nix
|
||||
./plugins/telescope.nix
|
||||
./plugins/treesitter.nix
|
||||
./plugins/undotree.nix
|
||||
./plugins/vim-dadbod.nix
|
||||
./plugins/vim-highlightedyank.nix
|
||||
./plugins/vim-test.nix
|
||||
./plugins/web-devicons.nix
|
||||
];
|
||||
|
||||
colorschemes.catppuccin = {
|
||||
enable = true;
|
||||
settings.flavour = "mocha";
|
||||
};
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
nixfmt-rfc-style
|
||||
stylua
|
||||
];
|
||||
|
||||
filetype = {
|
||||
extension = {
|
||||
"neon.dist" = "yaml";
|
||||
inc = "php";
|
||||
install = "php";
|
||||
module = "php";
|
||||
neon = "yaml";
|
||||
pcss = "scss";
|
||||
theme = "php";
|
||||
};
|
||||
|
||||
filename = {
|
||||
"composer.lock" = "json";
|
||||
};
|
||||
};
|
||||
|
||||
globals.mapleader = " ";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue