diff --git a/.commandcode/taste/taste.md b/.commandcode/taste/taste.md deleted file mode 100644 index 54e4488..0000000 --- a/.commandcode/taste/taste.md +++ /dev/null @@ -1,9 +0,0 @@ -# nix -- For R.nvim in the Nix wrapper, both RNVIM_COMPLDIR (C server compilation) and a writable R_LIBS_USER directory (nvimcom R package installation) must be configured — fixing only one leaves permission errors in the other. Confidence: 0.65 -- For R.nvim writable directories (RNVIM_COMPLDIR, R_LIBS_USER, TMPDIR), prefer project-local paths (e.g., $PWD/.Rlibs) over global cache paths — the cache approach may let the build succeed but still fail at runtime. Confidence: 0.70 -- Do not use lib.mkDefault on values consumed by lib.optionals or other boolean-checking functions — mkDefault wraps values in a priority set that fails "expected a Boolean" at evaluation time. Use plain booleans for inline conditionals, reserving mkDefault for module options resolved by the merge system. Confidence: 0.70 - -# Taste (Continuously Learned by [CommandCode][cmd]) - -[cmd]: https://commandcode.ai/ - diff --git a/.gitignore b/.gitignore index 8474af7..e402ff0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ *.R .Rlibs .nvimcom +.commandcode +.commandcode/ diff --git a/flake.nix b/flake.nix index 2780328..a19f7dc 100644 --- a/flake.nix +++ b/flake.nix @@ -1,4 +1,4 @@ -# Copyright (c) 2026 Daniel +# Copyright (c) 2026 BirdeeHub & Daniel # Licensed under the MIT license { description = "Daniel's NixCats"; @@ -39,6 +39,25 @@ wrappers, ... } @ inputs: let + langPackages = pkgs: { + python = with pkgs.python3Packages; [ + duckdb + polars + ]; + r = (with pkgs.rpkgs.rPackages; [ + arrow + broom + data_table + janitor + styler + pkgs.nvimcom + ]) ++ [ pkgs.nvimcom ]; + julia = [ + "DataFramesMeta" + "QuackIO" + ]; + }; + mkWrapperConfig = pkgs: { cats = { clickhouse = false; @@ -52,11 +71,7 @@ r = true; }; settings = { - lang_packages = { - python = []; - r = []; - julia = []; - }; + lang_packages = langPackages pkgs; }; binName = "vv"; }; @@ -125,27 +140,13 @@ pkgs = mkPkgs system; nvimPkg = wrapperSettings pkgs; - pythonPkgs = with pkgs.python3Packages; [ - duckdb - polars - ]; - - rPkgs = (with pkgs.rpkgs.rPackages; [ - arrow - broom - data_table - janitor - languageserver - styler - ]) ++ [ pkgs.nvimcom ]; - - juliaPkgs = ["DataFramesMeta" "QuackIO"]; + langPkgs = langPackages pkgs; pythonPackages = let python_packages_fn = if pkgs ? basePythonPackages - then ps: pkgs.basePythonPackages ps ++ pythonPkgs - else _: pythonPkgs; + then ps: pkgs.basePythonPackages ps ++ langPkgs.python + else _: langPkgs.python; in with pkgs; [ (python3.withPackages python_packages_fn) @@ -156,7 +157,7 @@ ]; rPackages = let - r_packages = (pkgs.baseRPackages or []) ++ rPkgs; + r_packages = (pkgs.baseRPackages or []) ++ langPkgs.r; in with pkgs; [ (rWrapper.override {packages = r_packages;}) @@ -164,13 +165,12 @@ (quarto.override {extraRPackages = r_packages;}) air-formatter yaml-language-server - updateR nvimcom rnvimserver ]; juliaPackages = let - julia_with_packages = pkgs.julia-bin.withPackages juliaPkgs; + julia_with_packages = pkgs.julia-bin.withPackages langPkgs.julia; in [julia_with_packages]; markdownPackages = with pkgs; [ diff --git a/plugin/10_keymap.lua b/plugin/10_keymap.lua index ebbebf0..5682b93 100644 --- a/plugin/10_keymap.lua +++ b/plugin/10_keymap.lua @@ -37,7 +37,7 @@ _G.Config.leader_group_clues = { { mode = 'x', keys = 'l', desc = '+LSP' }, { mode = 'x', keys = 'r', desc = '+R' }, { mode = 'n', keys = 'z', desc = '+ZK' }, - { mode = 'n', keys = 'zr', desc = '+Reviews' }, + { mode = 'n', keys = 'zr', desc = '+Reviews' }, { mode = 'x', keys = 'a', desc = '+AI' }, } @@ -144,7 +144,7 @@ nmap_leader('gc', 'Git commit', 'Commit') nmap_leader('gC', 'Git commit --amend', 'Commit amend') nmap_leader('gd', 'Git diff', 'Diff') nmap_leader('gD', 'Git diff -- %', 'Diff buffer') -nmap_leader('gg', 'lua require("neogit").open()', 'Git tab') +nmap_leader("gg", "Neogit", "Open Neogit UI") nmap_leader('gl', '' .. git_log_cmd .. '', 'Log') nmap_leader('gL', '' .. git_log_cmd .. ' --follow -- %', 'Log buffer') nmap_leader('go', 'lua MiniDiff.toggle_overlay()', 'Toggle overlay')