Files
lux/modules/capabilities/neovim/default.nix
T
2026-07-08 15:04:16 +02:00

176 lines
4.1 KiB
Nix

{ config, ... }:
let
account = config.facts.account;
theme = config.facts.theme.kanagawa;
in
{
flake.modules.homeManager.default-editor-neovim =
{ pkgs, ... }:
{
xdg.mimeApps.defaultApplicationPackages = [ pkgs.neovim ];
};
flake.modules.homeManager.neovim =
{
pkgs,
config,
inputs,
osConfig,
...
}:
{
home.sessionVariables = {
EDITOR = "nvim";
VISUAL = "nvim";
};
imports = [
(inputs.nix-wrapper-modules.lib.getInstallModule {
name = "neovim";
value = inputs.nix-wrapper-modules.lib.wrapperModules.neovim;
})
];
wrappers.neovim = {
enable = true;
settings.config_directory = ./lua-config;
runtimePkgs = with pkgs; [
universal-ctags
ripgrep
fd
tree-sitter
wl-clipboard
stylua
taplo
yamlfmt
lua-language-server
nixd
nix-doc
nixfmt
dafny
typescript
typescript-language-server
prettier
prettierd
eslint
eslint_d
vscode-langservers-extracted
emmet-language-server
tailwindcss-language-server
rustc
rust-analyzer
rustfmt
astro-language-server
tinymist
typstyle
websocat
ty
ruff
];
specs = {
lz-n = {
data = pkgs.vimPlugins.lz-n;
};
support = {
data = with pkgs.vimPlugins; [
plenary-nvim
kanagawa-nvim
nvim-treesitter.withAllGrammars
nvim-treesitter-textobjects
rainbow-delimiters-nvim
];
};
completion = {
lazy = true;
data = with pkgs.vimPlugins; [
blink-cmp
luasnip
friendly-snippets
colorful-menu-nvim
];
};
lsp = {
lazy = true;
data = with pkgs.vimPlugins; [
nvim-lspconfig
lazydev-nvim
nvim-navic
trouble-nvim
typst-preview-nvim
];
};
formatting = {
lazy = true;
data = with pkgs.vimPlugins; [
conform-nvim
];
};
core = {
lazy = true;
data = with pkgs.vimPlugins; [
mini-nvim
guess-indent-nvim
direnv-vim
];
};
ui = {
lazy = true;
data = with pkgs.vimPlugins; [
lualine-nvim
gitsigns-nvim
zen-mode-nvim
which-key-nvim
kulala-nvim
];
};
project = {
lazy = true;
data = with pkgs.vimPlugins; [
project-nvim
];
};
telescope = {
lazy = true;
data = with pkgs.vimPlugins; [
telescope-nvim
telescope-fzf-native-nvim
telescope-ui-select-nvim
];
};
};
settings = {
nixdExtras = {
nixpkgs = "import ${pkgs.path} {}";
nixos_options = ''(builtins.getFlake "path://${account.nixosConfigurationPath}").nixosConfigurations.${osConfig.facts.machine.name}.options'';
home_manager_options = ''(builtins.getFlake "path://${account.nixosConfigurationPath}").nixosConfigurations.${osConfig.facts.machine.name}.options.home-manager.users.type.getSubOptions []'';
};
themeSetup = import ./_kanagawa-theme.nix {
themeName = theme.name;
};
typstPreviewDependencies = {
tinymist = "${pkgs.tinymist}/bin/tinymist";
websocat = "${pkgs.websocat}/bin/websocat";
};
};
hosts.python3.nvim-host.enable = true;
hosts.node.nvim-host.enable = true;
binName = "nvim";
};
};
}