136 lines
3.6 KiB
Nix
136 lines
3.6 KiB
Nix
{ config, ... }:
|
|
let
|
|
repoTheme = config.repo.theme.kanagawa;
|
|
in
|
|
{
|
|
flake.modules.homeManager.neovim =
|
|
{
|
|
pkgs,
|
|
config,
|
|
inputs,
|
|
...
|
|
}:
|
|
{
|
|
home.sessionVariables = {
|
|
EDITOR = "nvim";
|
|
VISUAL = "nvim";
|
|
};
|
|
|
|
imports = [
|
|
(inputs.nix-wrapper-modules.lib.mkInstallModule {
|
|
name = "neovim";
|
|
value = inputs.nix-wrapper-modules.lib.wrapperModules.neovim;
|
|
loc = [
|
|
"home"
|
|
"packages"
|
|
];
|
|
})
|
|
];
|
|
|
|
wrappers.neovim = {
|
|
enable = true;
|
|
|
|
# 1. Point to your existing Lua config directory
|
|
settings.config_directory = ./lua-config;
|
|
|
|
# 2. Runtime Dependencies (from lspsAndRuntimeDeps)
|
|
# These are added to the PATH of the wrapper
|
|
extraPackages = with pkgs; [
|
|
# Tools
|
|
universal-ctags
|
|
ripgrep
|
|
fd
|
|
tree-sitter
|
|
wl-clipboard
|
|
# LSPs & Formatters
|
|
stylua
|
|
lua-language-server
|
|
nixd
|
|
nix-doc
|
|
nixfmt
|
|
dafny
|
|
typescript
|
|
typescript-language-server
|
|
rustc
|
|
rust-analyzer
|
|
rustfmt
|
|
astro-language-server
|
|
tinymist
|
|
typstyle
|
|
|
|
# ty
|
|
# basedpyright
|
|
ty
|
|
ruff
|
|
];
|
|
|
|
# 3. Plugins (from startupPlugins & optionalPlugins)
|
|
# Since you use lz.n in Lua, we just list them all here.
|
|
# The wrapper will add them to the packpath.
|
|
specs = {
|
|
# Core lazy-loading plugin
|
|
lz-n = {
|
|
data = pkgs.vimPlugins.lz-n;
|
|
};
|
|
plenary = {
|
|
data = pkgs.vimPlugins.plenary-nvim;
|
|
};
|
|
|
|
# All other plugins
|
|
general = {
|
|
data = with pkgs.vimPlugins; [
|
|
nvim-treesitter.withAllGrammars
|
|
nvim-treesitter-textobjects
|
|
trouble-nvim
|
|
guess-indent-nvim
|
|
which-key-nvim
|
|
telescope-nvim
|
|
telescope-fzf-native-nvim
|
|
telescope-ui-select-nvim
|
|
conform-nvim
|
|
blink-cmp
|
|
luasnip
|
|
friendly-snippets
|
|
mini-nvim
|
|
nvim-lspconfig
|
|
lazydev-nvim
|
|
colorful-menu-nvim
|
|
lualine-nvim
|
|
zen-mode-nvim
|
|
kanagawa-nvim
|
|
project-nvim
|
|
typst-preview-nvim
|
|
direnv-vim
|
|
codecompanion-nvim
|
|
copilot-lua
|
|
];
|
|
};
|
|
};
|
|
|
|
# 4. Passing Data to Lua (Replacing nixCats.extra)
|
|
# We put these in `settings` so they appear in require('nix-info').settings
|
|
settings = {
|
|
# Hostname/ConfigDir needed for nixd
|
|
nixdExtras = {
|
|
nixpkgs = "import ${pkgs.path} {}";
|
|
nixos_options = ''(builtins.getFlake "path://${config.meta.user.account.nixosConfigurationPath}").nixosConfigurations.${config.meta.machine.name}.options'';
|
|
home_manager_options = ''(builtins.getFlake "path://${config.meta.user.account.nixosConfigurationPath}").nixosConfigurations.${config.meta.machine.name}.options.home-manager.users.type.getSubOptions []'';
|
|
};
|
|
|
|
themeSetup = import ./_kanagawa-theme.nix {
|
|
themeName = repoTheme.name;
|
|
};
|
|
|
|
};
|
|
|
|
# 5. Wrapper Configuration
|
|
# Enable Python/Node providers
|
|
hosts.python3.nvim-host.enable = true;
|
|
hosts.node.nvim-host.enable = true;
|
|
|
|
# Ensure the bin name matches what you expect
|
|
binName = "nvim";
|
|
};
|
|
};
|
|
}
|