Compare commits

..
31 changed files with 772 additions and 845 deletions

View file

@ -29,7 +29,7 @@ jobs:
matrix: matrix:
os: [ubuntu-latest, macos-latest] os: [ubuntu-latest, macos-latest]
steps: steps:
- uses: actions/checkout@v7 - uses: actions/checkout@v4
- uses: wimpysworld/nothing-but-nix@main - uses: wimpysworld/nothing-but-nix@main
if: runner.os == 'Linux' if: runner.os == 'Linux'
with: with:
@ -37,7 +37,7 @@ jobs:
- uses: cachix/install-nix-action@v31 - uses: cachix/install-nix-action@v31
with: with:
github_access_token: ${{ secrets.GH_TOKEN }} github_access_token: ${{ secrets.GH_TOKEN }}
- uses: cachix/cachix-action@v17 - uses: cachix/cachix-action@v14
with: with:
name: rde name: rde
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

View file

@ -10,7 +10,7 @@ jobs:
id-token: "write" id-token: "write"
contents: "read" contents: "read"
steps: steps:
- uses: "actions/checkout@v7" - uses: "actions/checkout@v5"
with: with:
persist-credentials: false persist-credentials: false
- uses: "DeterminateSystems/determinate-nix-action@v3" - uses: "DeterminateSystems/determinate-nix-action@v3"

View file

@ -10,13 +10,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v7 uses: actions/checkout@v4
- uses: wimpysworld/nothing-but-nix@main - uses: wimpysworld/nothing-but-nix@main
with: with:
hatchet-protocol: 'carve' hatchet-protocol: 'carve'
- name: Install Determinate Nix - name: Install Determinate Nix
uses: DeterminateSystems/determinate-nix-action@v3 uses: DeterminateSystems/determinate-nix-action@v3
- uses: cachix/cachix-action@v17 - uses: cachix/cachix-action@v14
with: with:
name: rde name: rde
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

View file

@ -0,0 +1,85 @@
# CodeCompanion Revamp Plan
## Context
- Current: CodeCompanion **19.18.0** via nixpkgs `vimPlugins.codecompanion-nvim` (nixpkgs input lastModified ~2026-05-15).
- Latest: **19.20.0**. Key changes since 19.18.0:
- v19.19.0: `claude-sonnet-5` support, async/dynamic model fetching, copilot `top_p` fixes, inline orphaned-keymap fix, background command deregistration.
- v19.20.0: `gemini_interactions` adapter, PDF support for http adapters (`/file` on Anthropic/Copilot/OpenAI/OpenRouter), env vars from files, prompt-library items auto-receive default rule groups, copilot schema options removed.
- **Bug in current setup:** config sets `model = "claude-sonnet-5"` but 19.18.0 predates its support; the model name may not resolve. The nixpkgs bump fixes this.
- Files involved:
- `plugin/24_completion.lua` — `get_codecompanion_config()`, setup, blink integration.
- `plugin/10_keymap.lua` — `<leader>a*` keymaps (lines 69–84, contains duplicates/commented cruft).
- `overlays/plugins.nix` — codecompanion overlay (nvimSkipModules); likely unchanged.
- `modules/module/specs/plugins.nix` — plugin spec; unchanged.
## Decisions (confirmed with user)
1. **Version bump:** `nix flake update nixpkgs` (accepts wider plugin bump; do NOT override src).
2. **Adopt:** agent-mode keymaps, one workflow prompt, minor slash-command config (`/share` token). **No MCP.**
3. **Models:** `claude-sonnet-5` (copilot) for **chat only**; cheaper copilot model for **inline** and **background** (title generation) — use `gpt-5-mini` as placeholder; verify exact model id via `ga` model picker in a chat buffer after the bump and adjust.
4. **Codex (ChatGPT Edu) = heavy agent lane.** Copilot stays the default chat adapter; Codex ACP is launched explicitly for heavy autonomous tasks. Auth via ChatGPT login only (no API key) — user's existing `auth_method = "chatgpt"` is correct per the v19.20.0 adapter source (`"openai-api-key"|"codex-api-key"|"chatgpt"`; the docs page comment `"chat-gpt"` is stale).
## Tasks
1. **Bump nixpkgs**
- Run `nix flake update nixpkgs`.
- Verify: `nix eval --raw nixpkgs#vimPlugins.codecompanion-nvim.version` reports ≥ 19.20.0.
- Rebuild the wrapped Neovim per this repo's normal build (`nix build` / the repo's usual package target) and smoke-test that the editor starts.
2. **`plugin/24_completion.lua` — `get_codecompanion_config()`**
- Keep `interactions.chat.adapter = { name = "copilot", model = "claude-sonnet-5" }`.
- Change `interactions.inline.adapter` to `{ name = "copilot", model = "gpt-5-mini" }` (cheap/fast).
- Add a background adapter so title generation doesn't use Sonnet: set the background chat adapter to copilot/`gpt-5-mini` (config lives under `interactions.background.chat`; confirm exact key against `:h codecompanion` / `:checkhealth codecompanion` after the bump — the docs page "Generating Titles" says an adapter must be configured for background interactions).
- Keep existing context_management, rules, display, shared keymaps unchanged.
- Add `interactions.chat.slash_commands["share"].opts.token = os.getenv("GITHUB_GIST_TOKEN")`.
- **Prompt library additions** (keep `expert`, `fixer`, `suggest`):
- `["agent"]`: interaction "chat", alias `agent`, first user prompt starts with `@{agent}` plus selected code block, so Copilot/Claude gets the file-editing tool group (read_file, insert_edit_into_file, grep_search, run_command, etc., with approvals).
- `["tdd"]` (name flexible): interaction "chat", `opts = { is_workflow = true, alias = "tdd" }` — 3-stage workflow: (1) plan/understand `#buffer`, (2) `@{agent}` implement, (3) `@{run_command}` run the test suite (leverages run_command's test-flag for agentic workflows).
3. **`plugin/10_keymap.lua` — clean up + add**
- Remove duplicated/commented lines (70–71, 77, 81).
- Add:
- `nmap_leader("aa", "<cmd>CodeCompanionChat<CR>", "Agent chat (use @{agent})")` or directly `<cmd>CodeCompanion /agent<CR>`.
- `xmap_leader("aa", "<cmd>CodeCompanion /agent<CR>", "Agent on selection")`.
- `nmap_leader("aw", "<cmd>CodeCompanion /tdd<CR>", "Workflow: plan→implement→test")`.
- `nmap_leader("aC", "<cmd>CodeCompanion /compact<CR>", "Compact chat")` (verify `<leader>aC` doesn't clash).
- Keep existing mappings unchanged.
4. **No changes** to `overlays/plugins.nix` or `modules/module/specs/plugins.nix` unless the new version introduces new lazy-module load failures (re-run the build's check phase; `doCheck = false` is already set on the spec entry).
5. **Codex ACP lane (ChatGPT Edu)**
- **Resolved prerequisite:** user has installed `codex-acp` at `~/.nix-profile/bin/codex-acp` (verified on PATH 2026-07-24). The preset adapter's default command (`codex-acp`) now works as-is — **no `commands` override in the Lua config**. Fallback only if the binary misbehaves: override with `commands = { default = { "codex", "acp" } }` (requires the codex CLI's built-in `acp` subcommand; verify with `codex acp --help`).
- **Config change (small):** none strictly required — the existing `extend("codex", { defaults = { auth_method = "chatgpt" } })` block in `plugin/24_completion.lua` is correct. Keep it.
- Auth: prereq is an active `codex login` session with the ChatGPT Edu account (`~/.codex/auth.json` exists — user confirms validity; if expired, re-run `codex login`, browser/ChatGPT-app flow, no API key).
- Keep codex on-demand (do NOT make it the default chat adapter):
- Keep `<leader>ak` (`:CodeCompanionChat adapter=codex`).
- Add comment documenting ACP-only slash commands for this lane: `/resume` (restore past codex session, fresh chat only), `/mode` (switch agent mode), `/command`, `/acp_session_options`, plus `\`-triggered ACP command completion in the chat buffer.
- Do not set a default codex model in config; pick per-session via `ga` / `/acp_session_options` (avoids hardcoding model ids that change with the Edu plan).
- PATH note: Neovim must inherit a PATH containing `~/.nix-profile/bin` so the spawned `codex-acp` resolves — true when nvim is launched from the user's normal shell; call it out if validation fails with "command not found".
6. **Docs/habit notes** (add as comment block above the codecompanion setup, no separate docs file): `/compact`, `/fork`, `/symbols`, `/share`, `/resume`+`/mode` (codex ACP), `gm` (btw), `gty` (YOLO), `gba`/`gbd` (buffer sync), `gd` (debug window).
## Validation
- `nix flake update nixpkgs` then repo build succeeds.
- In Neovim: `:checkhealth codecompanion` clean.
- `:CodeCompanionChat`, press `ga` → copilot adapter lists `claude-sonnet-5`; send a trivial message and confirm response + auto title generation.
- In chat: type `@` → completion shows `agent`, `files`, `memory`, etc.; run `@{agent}` task on a scratch repo and confirm the approval prompt flow works.
- `:CodeCompanion /tdd` starts the workflow stages in order.
- Inline: visual-select code, `:CodeCompanion` prompt → confirm diff shows and `ga`/`gr` accept/reject still work on the cheap model.
- `:CodeCompanion /share` prompts/errors sensibly if `GITHUB_GIST_TOKEN` unset.
- **Codex lane:** `<leader>ak` opens a chat with the codex ACP adapter; the spawned `codex-acp` process initializes without auth errors (ChatGPT method), a trivial prompt gets a response, and `/mode` lists codex session modes. If it fails with command-not-found, check that Neovim inherited `~/.nix-profile/bin` in PATH (`:echo $PATH` inside nvim).
## Risks
- `nix flake update nixpkgs` bumps **all** vimPlugins and Neovim itself; other plugins may break. If the blast radius is too large, fall back to overriding codecompanion `src` to tag `v19.20.0` in `overlays/plugins.nix` (fetchFromGitHub, `doCheck = false`).
- Model ids (`claude-sonnet-5`, `gpt-5-mini`) must match the copilot adapter's choices post-bump; verify via `ga` picker and adjust literals.
- `gpt-5-mini` may not support tool use on copilot — fine, since inline/background don't use tools.
- `codex-acp` lives in the user's nix profile (outside this flake). If the profile is rebuilt/removed, the codex lane breaks — long-term consider adding `codex-acp` to this flake's runtime deps so it's pinned with the rest of the setup (optional follow-up, not required now).
- ChatGPT Edu accounts authenticate codex via browser/ChatGPT-app login; token expiry will surface as ACP auth errors → re-run `codex login`.
## Out of scope
- MCP server integration.
- Custom rules parsers, custom tools, extensions (mcphub/history/vectorcode).

View file

@ -0,0 +1,191 @@
# Neovim + Nix setup review
Scope: `flake.nix`, `overlays/`, `modules/`, `plugin/*.lua`, `lua/*`, `ftplugin/*`, CI/workflows, and cross-check against the pinned versions in `flake.lock` (nixpkgs weekly `241313f4`).
## Pinned package versions (from current lock)
- neovim `0.12.2`
- blink-cmp `1.10.2`
- codecompanion-nvim `19.13.0`
- nvim-treesitter `0.10.0-unstable-2026-04-03` (main-branch rewrite)
- nvim-treesitter-textobjects `0-unstable-2026-04-07` (main-branch rewrite)
- copilot-lua `2.0.3`
- render-markdown-nvim `8.12.0-unstable-2026-05-07`
- zk-nvim `0.4.7-unstable-2026-03-13`
- mini.nvim `0.17.0-unstable-2026-05-12`
- quarto-nvim `2.1.0`
- otter-nvim `2.14.5`
- lspconfig `2.9.0`
---
## CRITICAL: Treesitter is currently non-functional
### Finding
The nixpkgs `nvim-treesitter` package is the **main-branch rewrite** — there is no `lua/nvim-treesitter/configs.lua`. The whole module in `plugin/20_startup.lua` lines 212-294 is dead code:
```lua
local ok_configs, configs = pcall(require, "nvim-treesitter.configs") -- fails
```
The working tree already removed the fallback `vim.treesitter.start()` FileType autocmd (the "fixed treesitter" commit deleted it). Net result: **no treesitter highlighting, indentexpr, foldexpr, or textobjects are configured**.
### Impact
- Syntax highlighting falls back to Neovim's regex-only engine.
- All textobject keymaps (`]a`, `[a`, `]f`, `[f`, `]e`/`[e`, `<leader>x`/`X`, lsp_interop `<leader>lm`) are inert.
- `foldexpr`/`indentexpr` based folding does nothing.
### Fix direction
Rewrite `plugin/20_startup.lua` for main-branch API:
1. FileType autocmd → `vim.treesitter.start()` (and optionally `indentexpr`/`foldexpr`).
2. `require("nvim-treesitter-textobjects").setup({ move = { set_jumps = true } })` + explicit keymaps using `move.goto_next_start(query, "textobjects")` and `swap.swap_next(...)`.
3. The non-Nix `ensure_installed` block should set `opts.ensure_installed` BEFORE the filter (line 278 reads it before line 286 defines it).
Also remove duplicate `vim.treesitter.language.register("markdown", ...)` between `plugin/20_startup.lua` and `plugin/21_datascience.lua`.
---
## CodeCompanion version mismatch
### Finding
Config targets features absent in `19.13.0` (present only in `≥19.19.0`/main):
| Config usage | Present in 19.13? | Present in main (`v19.20.0`) |
|---|---|---|
| `interactions.chat.opts.context_management.editing` | No (flat `trigger`/`enabled` only) | Yes |
| `interactions.chat.opts.context_management.compaction` | No | Yes |
| `<leader>aC` requiring `codecompanion.interactions.chat.context_management.compaction` | **RUNTIME ERROR** | Works |
| `slash_commands.share` (`opts.token = ...`) | No (absent from defaults) | Yes |
| `adapters.acp.codex.defaults.auth_method = "chatgpt"` | Yes | Yes |
| `interactions.chat.adapter = { name = ..., model = ... }` table form | Yes | Yes |
### Risk
On today's lock (`19.13.0`): `/share` is inert, compaction-only keymap throws module-not-found, and `editing`/`compaction` tuning is silently ignored. On `≥19.19.0`/main: everything works.
### Decision needed (BLOCKING)
Choose **exactly one**:
- **A — Upgrade the plugin pin** (`overlays/plugins.nix` fetch to `v19.20.0` or `main`, bump the lock, and keep the current config). Riskiest change but matches what the config is written for.
- **B — Downgrade config call sites** to match `19.13.0`: remove `slash_commands.share`, remove `editing`/`compaction` keys (or collapse to flat `trigger: 0.75`), remove or gate `<leader>aC` on "newer" version.
- **C — Version-gate the config**: keep current code, read the installed version at startup and skip the new features when < 19.19.
I recommend A (the config clearly intends to track upstream main-ish behavior; `nix flake update` already bumped it to `19.18.0` in a prior session and you only reverted because the nightly was still too old — `v19.20.0` is now available).
---
## DEAD / DUPLICATE code
- `plugin/20_startup.lua` — the entire `configs.setup(opts)` block is dead (see Treesitter finding above).
- `plugin/10_keymap.lua`:
- `nmap_leader('od', '<Cmd>Neogen<CR>', ...)` — `neogen` plugin is **not shipped** in `specs/plugins.nix`. Mapping errors on press.
- `nmap_leader('fp', '<Cmd>Pick projects<CR>', ...)` — `MiniExtra.pickers.projects` doesn't exist in mini.extra; would error.
- `nmap_leader('oS', '<Cmd>lua Config.insert_section()<CR>', ...)` — `Config.insert_section` is never defined.
- `vim.lsp.buf.definition()` is bound to `grd`; Neovim 0.11+ defaults include `gr` aliases. Cosmetic, but `]d`/`[d` exist on modern LSP config and would be more idiomatic.
- `plugin/23_editor.lua`:
- `my_styler` formatter (calls `R -s -e styler::...`) is defined but never referenced — dead.
- `plugin/24_completion.lua`:
- `providers.cmp_r` is defined in the blink source list but never enabled in `default` or `per_filetype`; inert.
- `BLINK_VERSION = "v1.4.1"` — only consulted in the non-Nix install path; nixpkgs is `1.10.2`. Pin it to current or drop.
- `get_blink_fuzzy_setting().prebuilt_binary = { force_version = BLINK_VERSION }` — singular key is wrong; blink option is `fuzzy.prebuilt_binaries` (plural). Being skipped in-Nix anyway, but still wrong key.
- `modules/module/specs/plugins.nix` — `specs.utils-lazy` ships `nvim-dap*` and `nvim-lint` but there is zero config/tooling that references them in this repo.
- `ftplugin/quarto.lua`:
- Second top-level `require('quarto').setup()` with **no args** runs _after_ `21_datascience.lua`'s setup and **resets** it to defaults (no `lspFeatures`, no `codeRunner`).
- Top-level `require('quarto')` at FileType load also crashes if the quarto plugin isn't installed (e.g. cats off and a `.qmd`/`.quarto` file is opened): Neovim detects `quarto` ft natively in 0.10+.
- `plugin/00_options.lua`:
- Lines 146-163: two back-to-back FileType autocmds that both remove `r`/`o` from `formatoptions`. The second references an undefined `augroup` variable (nil → autocmd is global, happens to still work).
---
## STALE / WRONG options
- `plugin/10_keymap.lua` line 174:
```lua
require("conform").format({ lsp_fallback = true })
```
`lsp_fallback` is the **deprecated** boolean form of `conform.nvim`; should be `lsp_format = "fallback"` (the form already used in `plugin/23_editor.lua` and `ftplugin/python.lua`). In newer conform this may warn or error.
- `ftplugin/quarto.lua`:
- Sets `<Plug>RDSendLine` and R-style keymaps on _all_ quarto buffers, including Python/Julia chunks. This collides with quarto-runner mappings set in `21_datascience.lua`. Should gate on `vim.bo.filetype == "r"` (the ftplugin already imports quarto.runner for python, but the R keys leak).
- `.github/dependapot.yml` — filename typo. GitHub expects `dependabot.yml`; Dependabot won't run.
- `.github/workflows/check.yml`:
- `nix develop` without a `-c` command just launches an interactive shell. In CI it does nothing useful (or hangs). Replace with `nix develop -c echo ok` or drop.
- Path filter `'modules'` only matches the root directory itself; should be `modules/**` (or `'modules/**'`).
- Changing `plugin/`, `lua/`, `overlays/`, `ftplugin/`, etc. does **not** trigger CI.
- `flake.nix` / `.envrc` shellHook:
```sh
export R_LIBS_SITE=$(strings "$(command -v R)" | grep -oP '/nix/store/[^:]+/library' ...)
```
`grep -oP` (PCRE) is **not available in macOS BSD grep**. On `aarch64-darwin` this silently fails → `R_LIBS_SITE` is empty. Either depend on `ripgrep` regex (`strings ... | rg -o '...'`) or use `gsed` (GNU sed).
- `overlays/plugins.nix` — `zk-nvim` skip list contains `zk.pickers.fzf_lua`; current zk-nvim package likely doesn't load that regardless, but harmless.
- `modules/module/settings/core.nix` — `config.settings.nvim_lua_env` references `lp.tiktoken_core` but `tiktoken_core` is **not in `catPkgs.general` or anywhere else** in these files. If there's an extra Lua/tiktoken module, fine; otherwise this option is placeholder dead code.
- `modules/module/settings/hosts.nix` — host `m` (marimo) is defined with `enable = false` but also configured with `package`, `argv0`, `addFlag`. Dead block.
---
## PORTABILITY / DARWIN issues
- Shell hook `grep -oP` (above) fails on macOS.
- `mkdir -p "$R_LIBS_USER"` fine; but `command -v R` on macOS returns the wrapper; the wrapper path injection still works.
---
## DEAD WEIGHT (shipped but unused)
- `catPkgs.r` includes `pkgs.rnvimserver` — `rnvimserver` is needed by R.nvim only when using the _socket_ transport; `21_datascience.lua` only uses vim-slime. Acceptable, but `rnvimserver` adds to build time. Include if you actually use it? Currently not used.
- `specs.utils-lazy` ships `nvim-dap`, `nvim-dap-ui`, `nvim-dap-virtual-text`, `nvim-lint` — none of these are referenced anywhere in `plugin/` or `lua/`. Consider moving them to a devShell-only cat, or drop them.
- `.gitignore` `*.R` — prevents tracking any new `.R` files. `tests/test.R` is already committed so it isn't actively harmful, but it's surprising for a repo whose default cats include R.
- `.commandcode/` dir is listed in `.gitignore` but is in the worktree; fine, but worth cleaning up if it's an artifact.
---
## IMPROVEMENTS given updated packages
- `catPkgs.markdown` — add `marksman` (it's the LSP used by `render-markdown.nvim` wiki links and configured in LSP). Same binary is needed by `render-markdown` for wiki link ISP.
- `vim.lsp.enable` servers configured but binaries missing in PATH:
- `marksman` (LSP + render-markdown wiki integration).
- `r_ls` (new R language server — package name in nixpkgs is likely `r-languageserver` or `r_ls`; current `catPkgs.r` doesn't ship either).
- `clangd` — not required for this data-science setup; either drop or add to `external`.
- `julials` — require `LanguageServer.jl` in `settings.lang_packages.julia` for it to be useful.
- `blink.cmp` is `1.10.2` but config pins `BLINK_VERSION = "v1.4.1"` for the non-Nix path. Either drop the `BLINK_VERSION` constant (let MiniDeps track HEAD or the tag pinned in flake) or update it to `v1.10.2`.
- `conform.nvim` already uses `lsp_format = "fallback"` in `23_editor.lua` and `ftplugin/python.lua`, but `10_keymap.lua` still calls the deprecated `lsp_fallback = true`. Align to `lsp_format = "fallback"`.
- `.github/workflows/check.yml` — add path filters for `plugin/**`, `lua/**`, `overlays/**`, `ftplugin/**`, `modules/**`.
- `tests/init.lua` smoke-test and `tests/test.R` are present but **not wired into `nix flake check`**. Add a trivial check that runs `lua tests/init.lua` via `nix-shell -A ...`.
---
## CONFLICTS
- `<leader>up` (terminal bracketed paste toggle in `10_keymap.lua`) conflicts with `mini.basics.mappings.option_toggle_prefix = "<leader>u"` (paste toggle), which is set up later in `20_startup.lua` via `now()`. Result: the user's `<leader>up` mapping gets overwritten. Portable workaround: remap to `<leader>tp` (terminal namespace) and keep `<leader>tb` as alternative — both already mapped in 10_keymap.
- `ftplugin/quarto.lua` resets quarto-nvim config (kills `lspFeatures`/`codeRunner` set in `21_datascience.lua`) and injects R plug mappings into non-R quarto chunks.
---
## CLEAN summary for implementer
### Immediate (not version-dependent)
1. Restore treesitter highlighting + textobjects in `plugin/20_startup.lua` using main-branch API.
2. Remove duplicate `vim.treesitter.language.register` in `21_datascience.lua`.
3. Fix `plugin/10_keymap.lua`: remove/resolve `Neogen`, `Pick projects`, `Config.insert_section` dangling mappings.
4. Replace deprecated `lsp_fallback = true` with `lsp_format = "fallback"` in `plugin/10_keymap.lua`.
5. Gate `ftplugin/quarto.lua` to not reset config and to not leak R keys into non-R chunks; guard against missing `quarto` plugin.
6. Remove duplicate `formatoptions` autocmds (or at least dedupe).
7. Dedupe `RNVIM_COMPLDIR` / `TMPDIR` setup (do it in one place).
8. Rename `.github/dependapot.yml` to `.github/dependabot.yml`.
9. Remove or gate dead host `m` in `hosts.nix`.
10. Remove unused `rsplit`? no, irrelevant.
11. Add `marksman` to `catPkgs.markdown` and remove orphan LSP entries or ship the binaries.
12. Remove dead `conform` formatter `my_styler` and dead blink `cmp_r` provider, or wire them up.
### Version-dependent (BLOCKED)
- **Reset the CodeCompanion version decision**: either pin to `v19.20.0` (keep config, fix `slash_commands.share`, drop the `<leader>aC` compatibility shim, keep `editing`/`compaction`) OR downgrade config to match `19.13.0` (remove `share`, collapse `context_management`).
### CI / packaging
- Fix `nix develop` usage and path filters in `.github/workflows/check.yml`.
- Replace `grep -oP` in `flake.nix` shellHook with portable `rg -o` or add `gnused` to `catPkgs.always` and use `gsed`.
- Wire `tests/init.lua` into `flake check`.
### Verification
- `nix flake check` on both `aarch64-darwin` and `x86_64-linux`.
- `nix build .#packages.<system>.default` succeeds (already does).
- Start nvim, verify :TSContext works, treesitter highlighting is on, and `]f`/`[f` textobjects move.
- Open a `.qmd` file with cats off → no ftplugin crash.
- Confirm `<leader>up` still toggles bracketed paste.
- Confirm `:Pick projects` and `:Neogen` and `Config.insert_section` no longer error (or are mapped to valid handlers).

View file

@ -198,8 +198,7 @@ projectSettings = {
### Language packages (module defaults) ### Language packages (module defaults)
Add Python/R/Julia libraries. These are appended to the built-in defaults, which Add Python/R/Julia libraries that get appended to the module defaults. The built-in defaults are:
always apply (see `settings.langPackageDefaults` in `modules/module/settings/lang-packages.nix`):
- Python: `duckdb`, `polars` - Python: `duckdb`, `polars`
- R: `arrow`, `broom`, `data_table`, `janitor`, `styler` - R: `arrow`, `broom`, `data_table`, `janitor`, `styler`
@ -215,8 +214,7 @@ projectSettings = {
}; };
``` ```
Use `lib.mkForce` to replace other `lang_packages` assignments; the built-in defaults still apply. Use `lib.mkForce` to replace rather than append:
To exclude defaults, override `catPkgs.<cat>` instead:
```nix ```nix
projectSettings = { projectSettings = {
@ -339,5 +337,5 @@ cats.nix ───────────────► config.cats │
- **Overlays** (`overlays/`) inject dependency package sets into nixpkgs (`rpkgs`, `baseRPackages`, `basePythonPackages`, plugins). Top-level `rWrapper` and `quarto` are compatibility conveniences, but `pkgs.rpkgs` is the canonical R surface for downstream configuration. - **Overlays** (`overlays/`) inject dependency package sets into nixpkgs (`rpkgs`, `baseRPackages`, `basePythonPackages`, plugins). Top-level `rWrapper` and `quarto` are compatibility conveniences, but `pkgs.rpkgs` is the canonical R surface for downstream configuration.
- **cat-packages.nix** is the single source of truth for per-category packages. Each list is gated by its cat toggle. - **cat-packages.nix** is the single source of truth for per-category packages. Each list is gated by its cat toggle.
- **deps.nix** wires `catPkgs` into the wrapper's runtime PATH. - **deps.nix** wires `catPkgs` into the wrapper's runtime PATH.
- **settings.lang_packages** holds project-specific language libraries appended to the built-in `settings.langPackageDefaults`, used by local outputs and downstream module consumers. - **settings.lang_packages** holds the shared defaults used by local outputs and downstream module consumers.
- **flake.nix** exports `lib.eval`, `lib.mkWrapper`, `lib.devShellPackages`, and `lib.shellHook` as the canonical downstream helpers, and builds `packages.default` and `devShells.default` from the same module config. - **flake.nix** exports `lib.eval`, `lib.mkWrapper`, `lib.devShellPackages`, and `lib.shellHook` as the canonical downstream helpers, and builds `packages.default` and `devShells.default` from the same module config.

24
flake.lock generated
View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1787729487, "lastModified": 1781337902,
"narHash": "sha256-3A5rKxnceQ+inWqeQDUrxoVPXr67JMrdIIfbLStx06s=", "narHash": "sha256-QjXxUvpOBbnlpSskBOZJ9nUbpYyFRD4cBo4s1aHniGs=",
"owner": "dwinkler1", "owner": "dwinkler1",
"repo": "fran", "repo": "fran",
"rev": "b77635aeb1e70fffd09e5823dde5b76abb3df991", "rev": "30ab141871ede23b245a90afea58e076ef83b515",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -22,11 +22,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1788179007, "lastModified": 1784796856,
"narHash": "sha256-hn1oU2rue2SYK8dAr8+WNZWtbsz1S2W5mnHlSEuh3bo=", "narHash": "sha256-wWFrV5/Qbm+lyt5x20E/bSbfJiGKMo4RCxZV8cl/WZI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "34ab99075ac4f7e40cf037eef32cb1c360bb85e9", "rev": "e2587caef70cea85dd97d7daab492899902dbf5d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -76,11 +76,11 @@
}, },
"rixpkgs": { "rixpkgs": {
"locked": { "locked": {
"lastModified": 1788208780, "lastModified": 1782576256,
"narHash": "sha256-ouq3GjmTOXtWVufLOhMqLAEJXxrlkhDYtZJt3YfN5oU=", "narHash": "sha256-KOvpL9DJJmShb64mX9QTjhxHaxE8MizQIqNUAniuJ2E=",
"owner": "dwinkler1", "owner": "dwinkler1",
"repo": "rixpkgs", "repo": "rixpkgs",
"rev": "f3d00cb8f39262e6ca15c2046bd29ca8a52aae31", "rev": "815afc01bc0cc9a2eba80906645bd08f976a4401",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -124,11 +124,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1787722691, "lastModified": 1782135443,
"narHash": "sha256-bWBt7v2FhgG6WTLgSi8nYGi1zXaTdA+vTdCRdvR2vcw=", "narHash": "sha256-vAmbArdCyjqpVW+37aCy/PMBOLIqukUXLQuEKLwUhA4=",
"owner": "BirdeeHub", "owner": "BirdeeHub",
"repo": "nix-wrapper-modules", "repo": "nix-wrapper-modules",
"rev": "04ef216559b18214853879df862f493a9e6bb8cf", "rev": "6e7f66fa2cdf4d63162580b438f7fcf87c28a46f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -161,11 +161,11 @@
modules = [ modules = [
{ {
cats = { cats = {
r = true; r = false;
python = true; python = true;
}; };
settings.lang_packages.python = nixpkgs.lib.mkForce (with pkgs.python3Packages; [ settings.lang_packages.python = nixpkgs.lib.mkForce (with pkgs.python3Packages; [
polars pandas
]); ]);
catPkgs.nix = nixpkgs.lib.mkForce [ catPkgs.nix = nixpkgs.lib.mkForce [
pkgs.alejandra pkgs.alejandra
@ -206,10 +206,10 @@
(builtins.length (self.lib.devShellPackages defaultConfig) > 0) (builtins.length (self.lib.devShellPackages defaultConfig) > 0)
]; ];
overrideAssertions = [ overrideAssertions = [
(overrideConfig.cats.r or false) (!(overrideConfig.cats.r or false))
(builtins.length overrideNix == 1) (builtins.length overrideNix == 1)
((builtins.head overrideNix) == "alejandra") ((builtins.head overrideNix) == "alejandra")
(builtins.match ".*R RHOME.*" overrideShellHook != null) (builtins.match ".*R RHOME.*" overrideShellHook == null)
]; ];
in in
pkgs.runCommand "check-downstream-overrides" { pkgs.runCommand "check-downstream-overrides" {
@ -230,48 +230,6 @@
nvim --headless -u NONE -c "set runtimepath+=${./.}" -l ${./tests/init.lua} nvim --headless -u NONE -c "set runtimepath+=${./.}" -l ${./tests/init.lua}
touch $out touch $out
''; '';
# Downstream modules assign settings.lang_packages.<lang> plainly. The
# module system replaces same-option defaults, so built-in defaults must
# live in langPackageDefaults and be composed at the consumption sites.
# This check fails if someone moves defaults back into lang_packages:
# then a downstream assignment would silently drop lintr etc.
append-semantics = let
downstreamCfg = (self.lib.eval {
inherit pkgs;
modules = [
{
cats.r = true;
settings.lang_packages.r = [ pkgs.rpkgs.rPackages.fixest ];
}
];
}).config;
rWrapperPkg = builtins.head downstreamCfg.catPkgs.r;
in
pkgs.runCommand "check-lang-packages-append" { } ''
script=$(readlink -f "${rWrapperPkg}/bin/R")
grep -q "r-lintr-" "$script" || {
echo "default R packages were dropped by a downstream lang_packages assignment" >&2
exit 1
}
grep -q "r-fixest-" "$script" || {
echo "downstream lang_packages.r additions were not appended" >&2
exit 1
}
echo "lang_packages append semantics OK" > $out
'';
smoke-test = pkgs.runCommand "smoke-test" {} ''
# The Nix build sandbox has a read-only HOME; point XDG dirs at a
# writable location so vim.lsp/shaDa can write state headlessly.
export XDG_CONFIG_HOME=$TMPDIR/xdg-config
export XDG_STATE_HOME=$TMPDIR/xdg-state
export XDG_CACHE_HOME=$TMPDIR/xdg-cache
export XDG_DATA_HOME=$TMPDIR/xdg-data
BINARY_PATH="${defaultNvimPkg}/bin/vv"
"$BINARY_PATH" --headless -c "luafile ${./tests/smoke.lua}" -c "qa!"
touch $out
'';
} }
); );

View file

@ -11,39 +11,28 @@ nmap_leader('<Tab>', '<Cmd>bnext<CR>', 'Next buffer')
nmap_leader('<S-Tab>', '<Cmd>bprev<CR>', 'Prev buffer') nmap_leader('<S-Tab>', '<Cmd>bprev<CR>', 'Prev buffer')
-- a is for 'AI' -- a is for 'AI'
nmap_leader("aa", function() nmap_leader("aa", "<cmd>CodeCompanion /agent<CR>", "Agent chat (@{agent} tools)")
require("opencode").ask("@this: ") nmap_leader("ac", "<cmd>CodeCompanionChat Toggle<CR>", "Chat Toggle")
end, "Ask OpenCode about this") nmap_leader("aC", function()
nmap_leader("ab", function() local chat = require("codecompanion").last_chat()
require("opencode").prompt("Analyse @buffer") if not chat then
end, "Analyse buffer") return vim.notify("No CodeCompanion chat to compact", vim.log.levels.WARN)
nmap_leader("aB", function() end
require("opencode").prompt("Analyse @buffers") require("codecompanion.interactions.chat.context_management.compaction").compact(chat, { min_token_savings = 0 })
end, "Analyse open buffers") end, "Compact chat")
nmap_leader("ad", function() nmap_leader("ag", "<cmd>CodeCompanion /commit<CR>", "Generate commit message")
require("opencode").prompt("Explain @diagnostics and fix the underlying issue") nmap_leader("ai", "<cmd>CodeCompanionActions<CR>", "Chat Action")
end, "Explain/fix diagnostics") nmap_leader("al", "<cmd>CodeCompanion /lsp<CR>", "Explain LSP Diagnostics")
nmap_leader("an", function() nmap_leader("an", "<cmd>CodeCompanionChat Add<CR>", "Chat New")
require("opencode").command("session.new") nmap_leader("as", "<cmd>CodeCompanion /suggest<CR>", "Suggest Improvements")
end, "New OpenCode session") nmap_leader("aw", "<cmd>CodeCompanion /tdd<CR>", "Workflow: plan, implement, test")
nmap_leader("ap", function() nmap_leader("ax", "<cmd>CodeCompanion /fixer<CR>", "Code Fixer")
require("opencode").ask("@") xmap_leader("aa", "<cmd>CodeCompanion /agent<CR>", "Agent on selection")
end, "Ask OpenCode with context") xmap_leader("ae", "<cmd>CodeCompanion /explain<CR>", "Explain Code")
nmap_leader("as", function() xmap_leader("af", "<cmd>CodeCompanion /fix<CR>", "Fix Code")
require("opencode").select() xmap_leader("ap", "<cmd>CodeCompanion /expert<CR>", "Code Expert")
end, "Select OpenCode action") xmap_leader("as", "<cmd>CodeCompanion /suggest<CR>", "Suggest Improvements")
xmap_leader("aa", function() nmap_leader("ak", "<cmd>CodeCompanionChat adapter=codex<CR>", "Chat with Codex")
require("opencode").ask("@this: ")
end, "Ask OpenCode about selection")
xmap_leader("af", function()
require("opencode").prompt("Fix the selected code and preserve its surrounding API:\n@this")
end, "Fix selection")
xmap_leader("ap", function()
require("opencode").ask("@")
end, "Ask OpenCode with context")
xmap_leader("as", function()
require("opencode").select()
end, "Select OpenCode action")
-- b is for 'buffer' -- b is for 'buffer'
nmap_leader('bb', '<Cmd>b#<CR>', 'Alternate') nmap_leader('bb', '<Cmd>b#<CR>', 'Alternate')
@ -148,8 +137,7 @@ nmap_leader('LL', '<Cmd>luafile %<CR><Cmd>echo "Sourced lua"<CR>', 'Source buffe
nmap_leader('Ls', '<Cmd>lua Config.log_print()<CR>', 'Show log') nmap_leader('Ls', '<Cmd>lua Config.log_print()<CR>', 'Show log')
nmap_leader('Lx', '<Cmd>lua Config.execute_lua_line()<CR>', 'Execute `lua` line') nmap_leader('Lx', '<Cmd>lua Config.execute_lua_line()<CR>', 'Execute `lua` line')
-- m is for 'mark' (checkbox toggling) -- m is free
nmap_leader('mc', '<Cmd>ToggleCheckbox<CR>', 'Toggle checkbox')
-- o is for 'other' -- o is for 'other'
local trailspace_toggle_command = '<Cmd>lua vim.b.minitrailspace_disable = not vim.b.minitrailspace_disable<CR>' local trailspace_toggle_command = '<Cmd>lua vim.b.minitrailspace_disable = not vim.b.minitrailspace_disable<CR>'
@ -226,24 +214,6 @@ nmap_leader("wh", "<C-w>h", "Go to Left Window", { remap = true })
nmap_leader("wj", "<C-w>j", "Go to Lower Window", { remap = true }) nmap_leader("wj", "<C-w>j", "Go to Lower Window", { remap = true })
nmap_leader("wk", "<C-w>k", "Go to Upper Window", { remap = true }) nmap_leader("wk", "<C-w>k", "Go to Upper Window", { remap = true })
nmap_leader("wl", "<C-w>l", "Go to Right Window", { remap = true }) nmap_leader("wl", "<C-w>l", "Go to Right Window", { remap = true })
nmap_leader("w>", "<Cmd>vertical resize +5<CR>", "Increase Window Width")
nmap_leader("w<lt>", "<Cmd>vertical resize -5<CR>", "Decrease Window Width")
local function set_window_width_percent(percent)
return function()
local target_width = math.max(1, math.floor(vim.o.columns * percent / 100 + 0.5))
vim.api.nvim_win_set_width(0, target_width)
end
end
for i = 1, 9 do
local percent = i * 10
nmap_leader(
"w" .. i,
set_window_width_percent(percent),
string.format("Set Window Width to %d%%", percent)
)
end
nmap_leader("_", "<C-W>s", "Split Window Below", { remap = true }) nmap_leader("_", "<C-W>s", "Split Window Below", { remap = true })
nmap_leader("|", "<C-W>v", "Split Window Right", { remap = true }) nmap_leader("|", "<C-W>v", "Split Window Right", { remap = true })

View file

@ -1,55 +0,0 @@
-- omp bridge: expose an RPC socket so the omp harness can read this Neovim
-- instance's buffers on demand. Read-only on the agent side; this module only
-- owns the socket lifecycle.
--
-- Contract
-- * Socket path: $NVIM_OMP_SOCKET if set, else <stdpath('state')>/omp.sock
-- (~/.local/state/nvim/omp.sock on macOS, ~/.local/state/nvim/omp.sock
-- elsewhere). The omp-side tool in .omp/tools/nvim_buffers.mjs resolves the
-- *same* path, so the two sides agree without configuration.
-- * The agent reads buffers by evaluating read-only nvim API expressions over
-- the socket with `nvim --server <path> --remote-expr 'json_encode(...)'`.
-- Nothing here writes buffers or executes model-supplied commands.
local M = {}
local SOCKET_NAME = "omp.sock"
-- Resolve the deterministic socket path. Copies the rule on the omp side; keep
-- the two files in sync when changing the fallback or env override.
function M.socket_path()
local env = vim.env.NVIM_OMP_SOCKET
if env and env ~= "" then
return env
end
return vim.fn.stdpath("state") .. "/" .. SOCKET_NAME
end
-- Start the RPC listener. Returns the live socket path, or nil.
-- A second instance cannot bind the same address. This function deliberately
-- never removes an existing socket file: a failed liveness probe must not
-- disconnect another live Neovim instance.
-- If a crash leaves a stale socket, remove it manually only after confirming
-- that no Neovim process owns the path, then restart vv.
function M.start()
if vim.v.headless == 1 then
-- Headless runs (tests, CI) get no socket; nothing should depend on one.
return nil
end
local path = M.socket_path()
local ok, res = pcall(vim.fn.serverstart, path)
if ok and type(res) == "string" and res ~= "" then
-- serverstart returns the bound address string (e.g. "/tmp/omp.sock").
vim.notify("nvim_omp: RPC socket ready at " .. path, vim.log.levels.INFO)
return path
end
vim.notify(
"nvim_omp: could not bind RPC socket at " .. path
.. "; another instance may own it or a stale socket needs manual cleanup.",
vim.log.levels.WARN
)
return nil
end
return M

View file

@ -9,17 +9,14 @@ let
# NOTE: Package list expressions are lazily evaluated, and derivations are # NOTE: Package list expressions are lazily evaluated, and derivations are
# not built until needed, so keep side-effecting expressions out of these # not built until needed, so keep side-effecting expressions out of these
# lists. # lists.
maybe = cat: pkgsList: lib.optionals (config.cats.${cat} or false) pkgsList; maybe = cat: pkgsList:
rPackages = lib.optionals (config.cats.${cat} or false) pkgsList;
(pkgs.baseRPackages or [ ]) rPackages = (pkgs.baseRPackages or [ ]) ++ config.settings.lang_packages.r;
++ config.settings.langPackageDefaults.r
++ config.settings.lang_packages.r;
rWrapperPackages = rPackages; rWrapperPackages = rPackages;
quartoPkg = quartoPkg =
if config.cats.r or false then if config.cats.r or false
pkgs.rpkgs.quarto.override { extraRPackages = rPackages; } then pkgs.rpkgs.quarto.override { extraRPackages = rPackages; }
else else pkgs.quarto;
pkgs.quarto;
in in
{ {
options.catPkgs = lib.mkOption { options.catPkgs = lib.mkOption {
@ -28,38 +25,28 @@ in
}; };
config.catPkgs = { config.catPkgs = {
always = maybe "always" ( always = maybe "always" (with pkgs; [
with pkgs;
[
ripgrep ripgrep
] ]);
);
clickhouse = maybe "clickhouse" (with pkgs; [ clickhouse-lts ]); clickhouse = maybe "clickhouse" (with pkgs; [ clickhouse-lts ]);
external = maybe "external" ( external = maybe "external" (with pkgs; [
with pkgs;
[
nodejs nodejs
perl perl
ruby ruby
shfmt shfmt
sqlfluff sqlfluff
tree-sitter tree-sitter
] ]);
);
julia = maybe "julia" [ julia = maybe "julia" [
(pkgs.julia-bin.withPackages ( (pkgs.julia-bin.withPackages config.settings.lang_packages.julia)
config.settings.langPackageDefaults.julia ++ config.settings.lang_packages.julia
))
]; ];
lua = maybe "lua" (with pkgs; [ lua-language-server ]); lua = maybe "lua" (with pkgs; [ lua-language-server ]);
markdown = maybe "markdown" ( markdown = maybe "markdown" (with pkgs; [
with pkgs;
[
python3Packages.pylatexenc python3Packages.pylatexenc
quartoPkg quartoPkg
zk zk
@ -67,21 +54,15 @@ in
texlab texlab
imagemagick imagemagick
harper harper
] ]);
);
nix = maybe "nix" ( nix = maybe "nix" (with pkgs; [
with pkgs;
[
alejandra alejandra
nix-doc nix-doc
nixd nixd
] ]);
);
optional = maybe "optional" ( optional = maybe "optional" (with pkgs; [
with pkgs;
[
bat bat
broot broot
devenv devenv
@ -106,29 +87,21 @@ in
tokei tokei
wget wget
yq yq
] ]);
);
python = maybe "python" ( python = maybe "python" (let
let
python_packages_fn = python_packages_fn =
if pkgs ? basePythonPackages then if pkgs ? basePythonPackages
ps: then ps: pkgs.basePythonPackages ps ++ config.settings.lang_packages.python
pkgs.basePythonPackages ps else _: config.settings.lang_packages.python;
++ config.settings.langPackageDefaults.python
++ config.settings.lang_packages.python
else
_: config.settings.langPackageDefaults.python ++ config.settings.lang_packages.python;
python_with_packages = pkgs.python3.withPackages python_packages_fn; python_with_packages = pkgs.python3.withPackages python_packages_fn;
in in
with pkgs; with pkgs; [
[
python_with_packages python_with_packages
ruff ruff
basedpyright basedpyright
uv uv
] ]);
);
r = maybe "r" [ r = maybe "r" [
(pkgs.rpkgs.rWrapper.override { packages = rWrapperPackages; }) (pkgs.rpkgs.rWrapper.override { packages = rWrapperPackages; })

View file

@ -8,7 +8,7 @@
config.settings.config_directory = ../../..; config.settings.config_directory = ../../..;
# Default colorscheme and background # Default colorscheme and background
config.settings.colorscheme = lib.mkDefault "kanagawa"; config.settings.colorscheme = lib.mkDefault "cyberdream";
config.settings.background = lib.mkDefault "dark"; config.settings.background = lib.mkDefault "dark";
# Enable RC wrapping (allows neovim to find the config) # Enable RC wrapping (allows neovim to find the config)

View file

@ -14,15 +14,6 @@
# R.nvim v1.x owns its cache and temporary directories and exports # R.nvim v1.x owns its cache and temporary directories and exports
# RNVIM_COMPLDIR/RNVIM_TMPDIR during setup. Do not inject literal `$PWD` # RNVIM_COMPLDIR/RNVIM_TMPDIR during setup. Do not inject literal `$PWD`
# values into the wrapper environment. # values into the wrapper environment.
#
# ponytail: with R_LIBS_USER unset-or-empty, loading compiled namespaces
# (S7 via btw) segfaults on macOS for bare-terminal launches outside the
# devShell hook. Any non-empty value avoids it; this store path exists,
# contains no libraries, and stays inert. The devShell hook overrides it
# with $PWD/.r-libs. Upgrade path: teach wlib to emit expandable defaults.
(lib.mkIf (config.cats.r or false) {
R_LIBS_USER = "${pkgs.rpkgs.rWrapper}";
})
]; ];
# Environment variables with defaults (can be overridden by user) # Environment variables with defaults (can be overridden by user)

View file

@ -5,10 +5,7 @@
... ...
}: }:
let let
rPackages = rPackages = (pkgs.baseRPackages or [ ]) ++ config.settings.lang_packages.r;
(pkgs.baseRPackages or [ ])
++ config.settings.langPackageDefaults.r
++ config.settings.lang_packages.r;
rWrapperPkg = pkgs.rpkgs.rWrapper.override { packages = rPackages ++ [pkgs.nvimcom]; }; rWrapperPkg = pkgs.rpkgs.rWrapper.override { packages = rPackages ++ [pkgs.nvimcom]; };
in in
{ {

View file

@ -5,30 +5,7 @@
... ...
}: }:
{ {
options.settings = { options.settings.lang_packages = lib.mkOption {
# Built-in language libraries composed into every language spec.
# Consumers extend via settings.lang_packages, which is APPENDED to these.
langPackageDefaults = lib.mkOption {
type = lib.types.submodule {
options = {
python = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [ ];
};
r = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [ ];
};
julia = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
};
};
};
default = { };
};
lang_packages = lib.mkOption {
type = lib.types.submodule { type = lib.types.submodule {
options = { options = {
python = lib.mkOption { python = lib.mkOption {
@ -50,18 +27,18 @@
}; };
default = { }; default = { };
description = '' description = ''
Project-specific language libraries. Appended to settings.langPackageDefaults Language-specific package defaults and downstream overrides appended to each
in each language spec's runtime packages. language spec's runtime packages.
''; '';
}; };
};
config.settings.langPackageDefaults = { config.settings.lang_packages = {
python = with pkgs.python3Packages; [ python = lib.mkDefault (with pkgs.python3Packages; [
duckdb duckdb
polars polars
]; ]);
r = with pkgs.rpkgs.rPackages; [ r = lib.mkDefault (
(with pkgs.rpkgs.rPackages; [
arrow arrow
broom broom
data_table data_table
@ -72,8 +49,9 @@
# want to use the nvim-dap R adapter (see plugin/26_dap.lua). # want to use the nvim-dap R adapter (see plugin/26_dap.lua).
# vscDebugger # vscDebugger
lintr lintr
]; ])
julia = [ );
julia = lib.mkDefault [
"DataFramesMeta" "DataFramesMeta"
"QuackIO" "QuackIO"
]; ];

View file

@ -78,7 +78,6 @@ in {
lze lze
lzextras lzextras
plenary-nvim plenary-nvim
vimtex
neogit neogit
{ {
data = mini-nvim; data = mini-nvim;
@ -141,6 +140,7 @@ in {
data = with pkgs.vimPlugins; [ data = with pkgs.vimPlugins; [
quarto-nvim quarto-nvim
render-markdown-nvim render-markdown-nvim
vimtex
{ {
data = otter-nvim; data = otter-nvim;
pname = "otter"; pname = "otter";
@ -163,8 +163,10 @@ in {
pname = "nvim-treesitter"; pname = "nvim-treesitter";
} }
{ {
data = pkgs.vimPlugins.opencode-nvim; data = pkgs.codecompanion-nvim.overrideAttrs (old: {
pname = "opencode.nvim"; doCheck = false;
});
pname = "codecompanion";
} }
] ++ builtins.attrValues pkgs.vimPlugins.nvim-treesitter.queries; ] ++ builtins.attrValues pkgs.vimPlugins.nvim-treesitter.queries;
}; };

View file

@ -1,13 +0,0 @@
WRN 2026-07-31T16:36:01.037 ?.50508 server_start:197: Failed to start server: operation not permitted: /tmp/nvim.daniel/TN25Kv/nvim.50508.0
WRN 2026-07-31T16:36:38.634 ?.50644 server_start:197: Failed to start server: operation not permitted: /tmp/nvim.daniel/6jT8As/nvim.50644.0
WRN 2026-07-31T16:46:12.752 ?.54395 server_start:197: Failed to start server: operation not permitted: /tmp/nvim.daniel/zY36Oi/nvim.54395.0
WRN 2026-07-31T17:01:43.138 ?.58656 server_start:197: Failed to start server: operation not permitted: /tmp/nvim.daniel/nDisRA/nvim.58656.0
WRN 2026-07-31T17:01:50.641 ?.58696 server_start:197: Failed to start server: operation not permitted: /tmp/nvim.daniel/okDyqb/nvim.58696.0
WRN 2026-07-31T17:02:04.773 ?.58741 server_start:197: Failed to start server: operation not permitted: /tmp/nvim.daniel/5wxfRu/nvim.58741.0
WRN 2026-07-31T17:02:29.644 ?.58854 server_start:197: Failed to start server: operation not permitted: /tmp/nvim.daniel/OMTfpB/nvim.58854.0
WRN 2026-07-31T17:02:29.644 ?.58852 server_start:197: Failed to start server: operation not permitted: /tmp/nvim.daniel/QZvLy2/nvim.58852.0
WRN 2026-07-31T17:14:31.289 ?.64329 server_start:197: Failed to start server: operation not permitted: /tmp/nvim.daniel/zh9tLm/nvim.64329.0
WRN 2026-07-31T17:14:40.017 ?.64399 server_start:197: Failed to start server: operation not permitted: /tmp/nvim.daniel/pGaDez/nvim.64399.0
WRN 2026-07-31T17:17:48.228 ?.64921 server_start:197: Failed to start server: operation not permitted: /tmp/nvim.daniel/ryMpX0/nvim.64921.0
WRN 2026-07-31T17:17:52.664 ?.64953 server_start:197: Failed to start server: operation not permitted: /tmp/nvim.daniel/X7RmXh/nvim.64953.0
WRN 2026-07-31T17:18:00.691 ?.64989 server_start:197: Failed to start server: operation not permitted: /tmp/nvim.daniel/C6njjq/nvim.64989.0

View file

@ -1,6 +1,22 @@
{ ... }: { ... }:
final: prev: final: prev:
{ {
codecompanion-nvim = prev.vimPlugins.codecompanion-nvim.overrideAttrs {
checkInputs = with prev.vimPlugins; [
blink-cmp
mini-nvim
];
dependencies = [ prev.vimPlugins.plenary-nvim ];
nvimSkipModules = [
"codecompanion.actions.static"
"codecompanion.actions.init"
"minimal"
"codecompanion.providers.actions.fzf_lua"
"codecompanion.providers.completion.cmp.setup"
"codecompanion.providers.actions.telescope"
"codecompanion.providers.actions.snacks"
];
};
zk-nvim = prev.vimPlugins.zk-nvim.overrideAttrs { zk-nvim = prev.vimPlugins.zk-nvim.overrideAttrs {
nvimSkipModules = [ nvimSkipModules = [
"zk.pickers.fzf_lua" "zk.pickers.fzf_lua"

View file

@ -9,14 +9,4 @@ in
{ {
basePythonPackages = reqPkgs; basePythonPackages = reqPkgs;
python = prev.python3.withPackages reqPkgs; python = prev.python3.withPackages reqPkgs;
# pyarrow's test_timezone_absent reads /usr/share/zoneinfo, which is
# blocked by the build sandbox (PermissionError: Operation not permitted).
python3Packages = prev.python3Packages // {
pyarrow = prev.python3Packages.pyarrow.overridePythonAttrs (old: {
disabledTests = (old.disabledTests or [ ]) ++ [
"pyarrow/tests/test_orc.py::test_timezone_absent"
];
});
};
} }

View file

@ -5,7 +5,7 @@
}; };
in { in {
inherit rpkgs; inherit rpkgs;
baseRPackages = [rpkgs.nvimcom rpkgs.rPackages.btw]; baseRPackages = [rpkgs.nvimcom];
rWrapper = rpkgs.rWrapper.override {packages = [];}; rWrapper = rpkgs.rWrapper.override {packages = [];};
quarto = rpkgs.quarto.override {extraRPackages = [];}; quarto = rpkgs.quarto.override {extraRPackages = [];};
} }

Some files were not shown because too many files have changed in this diff Show more