mirror of
https://github.com/dwinkler1/nvimConfig.git
synced 2026-05-22 20:13:32 -04:00
Simplified codebase
This commit is contained in:
parent
ad9473a916
commit
74600519a5
15 changed files with 83 additions and 280 deletions
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
Available categories:
|
||||
- clickhouse: Clickhouse client and tools
|
||||
- customPlugins: local plugin specs
|
||||
- external: external tools and integrations
|
||||
- general: core Neovim plugins/features
|
||||
- gitPlugins: git-related plugins
|
||||
|
|
@ -25,7 +24,6 @@
|
|||
- optional: optional tools and utilities
|
||||
- python: Python tooling and plugins
|
||||
- r: R tooling and plugins
|
||||
- test: test-only tooling (disabled by default)
|
||||
- treesitterParsers: Treesitter parsers
|
||||
- utils: general utilities
|
||||
'';
|
||||
|
|
@ -33,18 +31,16 @@
|
|||
|
||||
config.cats = {
|
||||
clickhouse = lib.mkDefault false;
|
||||
customPlugins = lib.mkDefault true;
|
||||
external = lib.mkDefault true;
|
||||
general = lib.mkDefault true;
|
||||
gitPlugins = lib.mkDefault true;
|
||||
julia = lib.mkDefault false;
|
||||
lua = lib.mkDefault true;
|
||||
markdown = lib.mkDefault false;
|
||||
markdown = lib.mkDefault true;
|
||||
nix = lib.mkDefault true;
|
||||
optional = lib.mkDefault false;
|
||||
python = lib.mkDefault false;
|
||||
r = lib.mkDefault true;
|
||||
test = lib.mkDefault false;
|
||||
treesitterParsers = lib.mkDefault true;
|
||||
utils = lib.mkDefault true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
# Lua packages available to neovim (for :lua require())
|
||||
config.settings.nvim_lua_env = lp:
|
||||
lib.optionals (config.cats.general or false) [ lp.tiktoken_core ];
|
||||
lib.optionals (config.cats.general or true) [ lp.tiktoken_core ];
|
||||
|
||||
# Binary name for the wrapper
|
||||
config.binName = lib.mkDefault "vv";
|
||||
|
|
@ -25,10 +25,10 @@
|
|||
config.settings.block_normal_config = true;
|
||||
|
||||
# Don't symlink the config (we wrap it instead)
|
||||
config.settings.dont_link = false;
|
||||
config.settings.dont_link = lib.mkDefault false;
|
||||
|
||||
# Create additional aliases for the binary
|
||||
config.settings.aliases = [ "vvim" ];
|
||||
config.settings.aliases = lib.mkDefault [ "vvim" ];
|
||||
|
||||
# Enable wrapper handling of spec runtimeDeps (template pattern).
|
||||
config.settings.autowrapRuntimeDeps = true;
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@
|
|||
# Environment variables set for the wrapper.
|
||||
# These are available when running neovim.
|
||||
config.env = lib.mkMerge [
|
||||
(lib.mkIf (config.cats.python or false) {
|
||||
(lib.mkIf (config.cats.python or true) {
|
||||
UV_PYTHON_DOWNLOADS = "never";
|
||||
UV_PYTHON = pkgs.python.interpreter;
|
||||
})
|
||||
(lib.mkIf (config.cats.r or false) {
|
||||
(lib.mkIf (config.cats.r or true) {
|
||||
RNVIM_COMPLDIR = "$PWD/.r-compl";
|
||||
R_LIBS_USER = "${pkgs.nvimcom}/library:$PWD/.Rlibs";
|
||||
TMPDIR = "$PWD/.r-tmp";
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
# Environment variables with defaults (can be overridden by user)
|
||||
config.envDefault = lib.mkMerge [
|
||||
(lib.mkIf (config.cats.r or false) {
|
||||
(lib.mkIf (config.cats.r or true) {
|
||||
R_LIBS_USER = "${pkgs.nvimcom}/library:$PWD/.Rlibs";
|
||||
})
|
||||
];
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
nvim-host.enable = true;
|
||||
nvim-host.package = "${pkgs.neovide}/bin/neovide";
|
||||
nvim-host.argv0 = "neovide";
|
||||
nvim-host.flags."--neovim-bin" = "${placeholder "out"}/bin/${config.binName}";
|
||||
nvim-host.flags."--neovim-bin" = "${builtins.placeholder "out"}/bin/${config.binName}";
|
||||
};
|
||||
|
||||
m = {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
};
|
||||
default = { };
|
||||
description = ''
|
||||
Language-specific package overrides appended to each language spec's extraPackages.
|
||||
Language-specific package overrides appended to each language spec's runtimePackages.
|
||||
Intended for flake.nix overrides via wrapper.config.wrap.
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,14 +10,13 @@ let
|
|||
let
|
||||
is_enabled = if spec ? enable then spec.enable else true;
|
||||
has_runtime_deps = (spec.runtimeDeps or false) == runtime_deps_type;
|
||||
packages = spec.extraPackages or [ ];
|
||||
packages = spec.runtimePackages or [ ];
|
||||
in
|
||||
acc ++ lib.optionals (is_enabled && has_runtime_deps) packages
|
||||
)
|
||||
[ ];
|
||||
|
||||
prefix_packages = collect_runtime_packages "prefix";
|
||||
suffix_packages = collect_runtime_packages "suffix";
|
||||
|
||||
to_path_specs = packages: [
|
||||
{
|
||||
|
|
@ -31,5 +30,4 @@ let
|
|||
in
|
||||
{
|
||||
config.prefixVar = lib.optionals (prefix_packages != [ ]) (to_path_specs prefix_packages);
|
||||
config.suffixVar = lib.optionals (suffix_packages != [ ]) (to_path_specs suffix_packages);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue