Commit graph

107 commits

Author SHA1 Message Date
b630932348 Fixed dooing keymap 2026-08-11 12:33:59 +10:00
c7543c978a OMP neovim server bridge 2026-08-08 14:18:36 +10:00
25a88599c1 bloocky config and fixes 2026-08-07 14:35:17 +10:00
92729cff56 added bloocky and dooing 2026-08-07 14:35:17 +10:00
b8f72cb150 Small fixes 2026-07-30 13:46:58 +10:00
6b6f5b3e57 vimtex is not lua 2026-07-27 11:25:49 +10:00
475a914ad2
Merge pull request #13 from dwinkler1/refactor/quant-eco-workflow-improvements
refactor: quant econ workflow improvements
2026-07-27 11:19:15 +10:00
Daniel
180c3e4f55 feat: add Harper grammar checker LSP 2026-07-27 01:09:25 +00:00
d9a8c31bc6 always add vimtex 2026-07-27 10:40:14 +10:00
5f6b1248dd
Merge pull request #12 from dwinkler1/refactor/quant-eco-workflow-improvements
refactor: improve Neovim/Nix config for quant econ workflow
2026-07-27 10:34:11 +10:00
f60ba80756
Merge pull request #10 from dwinkler1/dependabot/github_actions/actions/checkout-7
Bump actions/checkout from 4 to 7
2026-07-27 10:33:31 +10:00
931dfc1691
Merge pull request #11 from dwinkler1/dependabot/github_actions/cachix/cachix-action-17
Bump cachix/cachix-action from 14 to 17
2026-07-27 10:33:19 +10:00
Daniel
92bd53feea fix: add ripgrep to always category and revert shellHook to use rg 2026-07-27 00:30:10 +00:00
Daniel
ad26b17b8c fix: avoid ripgrep dependency in devShell R_LIBS_SITE hook 2026-07-27 00:28:43 +00:00
Daniel
5c35787c68 fix: remove broken luaPackages.magick from markdown cat packages 2026-07-27 00:24:33 +00:00
Daniel
2dc7227a0e fix: remove vscDebugger from default R packages (not in CRAN/rPackages) 2026-07-27 00:21:18 +00:00
Daniel
c85925b4f7 Merge remote-tracking branch 'origin/refactor/quant-eco-workflow-improvements' into refactor/quant-eco-workflow-improvements 2026-07-27 00:18:06 +00:00
Daniel
d45d85e5bc chore: remove Stata tree-sitter parser from default parser list 2026-07-27 00:16:50 +00:00
copilot-swe-agent[bot]
f4b960c604
docs: clarify Nix laziness comment 2026-07-27 00:11:43 +00:00
copilot-swe-agent[bot]
259b3d65b8
fix: use valid Nix comment syntax in modules 2026-07-27 00:10:59 +00:00
Daniel
6142f7d55e fix: harden REPL/terminal code-sending paths
- lua/keymap/repl.lua
  - Replace non-existent `:SlimeSendCurrentLine` with synchronous
    `vim.fn["slime#send"](line .. "\n")` fallback.
  - Support both modern `r.send` and older `r.run` R.nvim Lua APIs,
    falling back to `<Plug>` mappings if neither module is available.

- lua/nix_smart_send.lua
  - Refactor `send_repl()` to extract Tree-sitter node text and send it
    directly via `slime#send`, eliminating the `feedkeys(..., "x", true)`
    race between visual selection and cursor movement.
  - Replace internal `slime#send_op` call in `slime_send_region()` with the
    public `<Plug>SlimeRegionSend` mapping.
  - Improve `move_to_next_non_empty_line()` to walk up the AST when a
    node has no next sibling, so the cursor escapes nested blocks.

- plugin/03_terminal.lua
  - Set `vim.g.slime_target = "neovim"` at the top of the module so the
    target is guaranteed before any slime send.

- plugin/21_datascience.lua
  - Remove duplicate `vim.g.slime_target = "neovim"` now that the
    terminal module owns the setting.
2026-07-26 06:57:57 +00:00
Daniel
137ec6d576 style: tidy visual clue groups + fix casing
Two cosmetic cleanups from the post-fix consistency pass on 3f2ab6e:

* lua/keymap/core.lua: changed the visual ``<leader>a`` entry to
  ``<Leader>a`` on line 46 so the casing is consistent with every
  other key in ``Config.leader_group_clues``. mini.clue's trigger
  matching is case-insensitive, so this is purely cosmetic.

* lua/keymap/leader.lua: added an ``xmap_leader('rr', ...)`` mapping
  that sends the visual selection through the filetype-aware
  dispatcher in ``lua/keymap/repl.lua``. Previously the visual
  ``<Leader>r`` (+R) clue group was empty (no ``xmap_leader("r", ...)``
  existed); visual users now have the same send-selection affordance
  that normal-mode users already get from the dispatcher.

No normal-mode behavior changes. No regressions. The existing
visual ``<leader>rx`` reprex mapping is preserved verbatim, just
with a clarifying comment above it.

Files: 2 modified. +9 / -1.
2026-07-26 06:49:12 +00:00
Daniel
3f2ab6ef96 fix: address R1 (image.nvim backend) + C4 (cat-gate consistency)
Tackles the two outstanding items from the post-fix consistency
pass on top of `df2f776`.

* R1 -- plugin/27_image.lua: removed the explicit `backend = "auto"`
  line. image.nvim's setup() does not accept "auto" / "none" as
  literal values; the practical default is to leave `backend` unset,
  letting image.nvim auto-detect the right graphics protocol
  (kitty / wezterm / iterm / sixel) at runtime and falling back to
  no rendering on unsupported terminals. Inline comment explains the
  omission so a future reader doesn't "fix" it back.

* C4 -- modules/module/specs/plugins.nix:
  - Removed `nvim-dap`, `nvim-dap-ui`, `nvim-dap-virtual-text`,
    and `image-nvim` from `config.specs.utils-lazy`. They are R- and
    Markdown-specific, not general utility plugins, so they should
    not depend on `utils=true`.
  - Added a new `config.specs.r-lazy` spec carrying those same four
    plugins, gated by `cats.r`. Users with `r=true` and `utils=false`
    now get a working R debugger (via vscDebugger) and in-buffer
    image rendering for plots.
  - Added `image-nvim` to the existing `config.specs.markdown-lazy`
    so users with `markdown=true` and no other cats still see inline
    plots in Quarto / Markdown documents. nixCats dedups packages
    by pname, so `image-nvim` appears once on the runtime path even
    when both `r` and `markdown` are on.

These two changes close the real correctness bugs surfaced by the
consistency review: `plugin/26_dap.lua` and `plugin/27_image.lua`'s
cat-gated `Config.add(...)` calls previously depended on
`utils=true` resolving the four packages, leaving `r=true` (or
`markdown=true`) only users without DAP / image-nvim even though the
Lua gate let the setup function proceed.

Files: 2 modified. Local verification (`nix flake check --no-build`)
still required before merging PR #12.
2026-07-26 06:47:58 +00:00
Daniel
df2f776d3f fix: address review findings (C1/C3/H1/H2/H5 + M1)
Tackles the critical and high-impact findings from the in-PR review
of commit 7f01be5, plus one consistency fix (M1). All changes are
scoped to the same review branch (PR #12); no behavior changes
elsewhere.

Critical fixes
* C1 -- plugin/22_languages.lua: now does `local Config = require('config')`
  at the top, matching every other `plugin/*.lua` file. Previously the
  file referenced `Config` as a global, depending on `_G.Config` having
  been initialized by `init.lua` before this file loaded. Fragile.
* C2 -- plugin/04_treesitter.lua: removed the hard `<CR>` ->
  `smart_send.send_repl` mapping. Override `<CR>` from a per-buffer
  `ftplugin/<lang>.lua` if you want enter-to-send behavior. R.nvim's
  `<Plug>RDSendLine` (wired by `ftplugin/r.lua`) remains the default
  for R files and is no longer silently clobbered.

High-impact fixes
* C3 -- plugin/27_image.lua: `image.setup({ backend = "kitty" })` ->
  `backend = "auto"`. The previous value silently failed on every
  terminal that is not Kitty. `"auto"` delegates detection to image.nvim.
* H1 -- plugin/10_keymap.lua: `_G.Config = Config` removed from this
  file; `init.lua:2` remains the single source. Avoids drift between
  two aliasing sites.
* H2 -- plugin/25_lsp.lua: `texlab = { single_file_support = true }`,
  so single-file `.tex` buffers attach the LSP without lspconfig's
  sometimes-brittle root_dir heuristic.
* H5 -- plugin/04_treesitter.lua: also drops `<S-CR>` from
  `M.setup_keybindings` on the same principle as C2. `<S-CR>` was a
  hard implicit override in both normal and insert mode, where it
  collided with snippet and transient-state plugins.

Consistency fixes
* M1 -- plugin/01_lib.lua: `print(line)` in `Config.execute_lua_line`
  switched to `vim.notify(line, vim.log.levels.INFO)`, matching the
  print->notify cleanup in `plugin/04_treesitter.lua` from 7f01be5.

Files: 6 modified. +21 / -11.

Local verification
1. `luac -p plugin/{22_languages,27_image,10_keymap,25_lsp,04_treesitter,01_lib}.lua`
2. `nvim --headless -u NONE -l tests/init.lua`
3. Open a R / quarto / tex buffer; verify `<CR>` is no longer hijacked
   by `smart_send` and behaves like the filetype default.

For reviewers
* The text-object configuration in plugin/04_treesitter.lua's
  textobjects block is unchanged. H4 (`@assignment.*` queries may not be
  defined for R) is left for a follow-up with verification.
* yamlls GitHub-rawURL schema dependency (H3) is left intentionally --
  vendoring the schemas is a separate decision.
* Tests (T1-T6 from the review) are deferred; no test infrastructure
  exists beyond `tests/init.lua`.
2026-07-26 06:43:35 +00:00
Daniel
7f01be59d7 refactor: improve Neovim/Nix config for quant econ workflow
Consolidates a multi-pass refactor and a set of workflow integrations
tailored to a quantitative economics research workflow (R / Python /
Quarto / LaTeX heavy, reproducibility-conscious). The existing terminal
setup is preserved (snacks.nvim was deliberately not adopted).

=== Structural refactors ===
* Replace the `_G.Config` global with a proper `require('config')` Lua
  module. `_G.Config` is kept only as a backward-compatible alias.
* Split the monolithic `plugin/10_keymap.lua` into domain-specific
  files under `lua/keymap/` (core, helpers, leader, terminal, repl).
* Harden `lua/nix_smart_send.lua` `send_repl`: only skip forward on
  comment nodes, and return cleanly when there is no next sibling.
* Add a filetype-aware REPL dispatcher in `lua/keymap/repl.lua`:
  pure R scripts -> R.nvim, .qmd/.Rmd chunks -> quarto.runner,
  everything else -> vim-slime. Prefer `quarto.runner.run_line()`
  when available and fall back to `run_cell()`.
* Add R Treesitter text objects (function / call / assignment) for
  faster motion when sending code to the REPL.
* Add `+Send` and `+Debug` leader-clue groups for the new prefixes.

=== LSP and tooling ===
* Register `yamlls` for Quarto YAML frontmatter (`plugin/25_lsp.lua`).
* Register `texlab` and add `vimtex` for a real `.tex` workflow
  (`plugin/25_lsp.lua` + new `plugin/28_latex.lua`).
* Wire `nvim-dap` with an R adapter backed by `vscDebugger`
  (new `plugin/26_dap.lua`, gated to the `r` cat).
* Add `image-nvim` for in-editor plots, gated to the `r`/`markdown`
  cats (new `plugin/27_image.lua`).
* Wire `lintr` into `nvim-lint` for R / Quarto (`plugin/22_languages.lua`).
* Add Treesitter parsers for `stata`, `matlab`, `bibtex` for completeness.

=== Nix updates ===
* Pin `python313Packages.pylatexenc` -> `python3Packages.pylatexenc`
  so the markdown cat survives nixpkgs Python default shifts.
* Add `texlab`, `imagemagick`, `luaPackages.magick` to the markdown
  cat so `image.nvim` has a working backend.
* Add `vscDebugger` and `lintr` to the R package list.

=== Misc ===
* Prefer the R.nvim v1.0 Lua API (`require('r.run').send_line()` /
  `send_selection()`); keep `<Plug>` mappings as a fallback so older
  downstream builds don't regress.
* Use `alejandra` (already installed) as the nixd / nil_ls formatter.

Files: 14 modified, 5 added (953 insertions, 490 deletions).

Local verification before merge:
1. `nix flake check --no-build`
2. `nvim --headless -u NONE -l tests/init.lua`
3. Open a `.qmd` -> confirm `yamlls` attaches and `image.nvim` renders.
4. Open an `.R` -> `<leader>db`, `<leader>dc` confirm DAP loads.
5. Open a `.tex` -> confirm `texlab` + `vimtex` are active.
2026-07-26 06:35:52 +00:00
0ea9b249ed Fixed syntax highlighting 2026-07-24 16:28:07 +10:00
cd1e524eb8 testing 2026-07-24 15:35:40 +10:00
509442f0b4 testing 2026-07-24 15:27:32 +10:00
6542de2212 updates 2026-07-24 15:08:08 +10:00
dependabot[bot]
60b23e42d0
Bump cachix/cachix-action from 14 to 17
Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action) from 14 to 17.
- [Release notes](https://github.com/cachix/cachix-action/releases)
- [Changelog](https://github.com/cachix/cachix-action/blob/master/RELEASE.md)
- [Commits](https://github.com/cachix/cachix-action/compare/v14...v17)

---
updated-dependencies:
- dependency-name: cachix/cachix-action
  dependency-version: '17'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-24 05:04:58 +00:00
dependabot[bot]
6db6d131be
Bump actions/checkout from 4 to 7
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-24 05:04:54 +00:00
5269e76608 updates 2026-07-24 15:04:12 +10:00
3ba96f380c Corrected Rnvim setup 2026-06-29 09:59:40 +02:00
3cf282e4f8 new font for gui 2026-06-08 11:03:05 +01:00
83b70216a9 fixed treesitter 2026-06-08 11:02:45 +01:00
aec9110e70 hopefully R fix 2026-05-24 00:01:12 +10:00
62f456ed46 hopefully R fix 2026-05-23 23:54:07 +10:00
458332a141 hopefully R fix 2026-05-23 23:44:56 +10:00
740f86ad7b hopefully R fix 2026-05-23 23:41:48 +10:00
d218b05d48 hopefully R fix 2026-05-23 23:38:18 +10:00
1c5619312d simplified 2026-05-23 23:07:54 +10:00
ed7abad63c Expose shellhooks via API 2026-05-23 22:53:52 +10:00
db610620b3 large refactor 2026-05-23 21:59:54 +10:00
a0ba90c4d2 refactor package installation 2026-05-23 20:15:23 +10:00
10254b11c7 Corrected langpackage installation 2026-05-23 18:41:22 +10:00
af6d975129 make quarto load optional on r or markdown cat 2026-05-21 21:15:50 +10:00
6226a1c9b1 make lua package loading conditional on cat 2026-05-21 21:10:30 +10:00
d23c7f6f51 load packages only if installed 2026-05-21 20:04:45 +10:00
74600519a5 Simplified codebase 2026-05-21 18:45:36 +10:00
ad9473a916 different ls 2026-05-19 13:28:40 +10:00