neovim: slice 4 — treesitter, C++ stack, UI polish + telescope extensions (#19) #48
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-19-nixvim-slice-4-cpp-ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Slice 4 — the explicit list from comment 977, plus the two recommended telescope extensions from 929. Alloy is out everywhere (telescope and treesitter), per the same comments.
treesitter (
plugins/treesitter.nix, import uncommented inplugins/default.nix)The stub file was literally empty — which is why the import was commented out (an empty .nix is a valid but empty module). Rewritten against the nixvim rev pinned in
flake.lock(453dc9c5): this rev targets the nvim-treesitter main branch via Neovim's native APIs — parsers come from Nix (all grammars by default;grammarPackagesto trim), highlighting/indent are plain module options.indentis disabled fornix(nixd owns nix formatting; the indent queries only get in the way). Folding deliberately NOT enabled — nvim-ufo (slice 2) keepsfoldexpr, and its provider selector automatically picks up treesitter fold ranges now that the parsers are installed.ts-comments + ts-context-commentstring (
plugins/treesitter.nix)gccomments the right syntactic node, and the comment token follows the context (e.g.//inside C++ that itself sits in a block comment,--for nix). ts-context-commentstring feeds ts-comments; the nixvim module wants treesitter enabled for it, which the file above now does.UI polish (
plugins/ui.nix):input/:select(LSP rename, gitsigns, neogen prompts).<leader>aotoggle,<leader>aOtoggle+focus,Esccloses.code_action_fnwired to fastaction so the action pops as one-key letters.<leader>castays the plain native picker.C++ stack (
plugins/cpp.nix)--background-index --clang-tidy --header-insertion=iwyu), binary from Nix. Formatting stays manual —<leader>cfformats via clangd; no format-on-save, per standing rule..h↔.cppswitching, richer inlay hints.:CMakeCommands.c/cpplaunch configs prompt for the executable and break atmain. The slice-3 F5/F6/F7/F8 +<leader>du/<leader>drkeys drive it unchanged.cmake+gdbadded toextraPackages.Telescope extensions (
plugins/telescope.nix)fzf-native(compiled sorter — the big speed win on live_grep/find_files) andui-select(telescope UI forvim.ui.select, with thecodeactionsspecific-opt) — the two extensions telescope's README recommends, which were sitting commented-out in the file exactly as you left them. Nothing alloy-related anywhere in the config.Overlap note: dressing and telescope-ui-select both style
vim.ui.select. Both are self-contained blocks — if the LSP rename picker ends up not your taste, delete one of the two enable blocks and nothing else depends on it.Verification
Verified against the nixvim rev pinned in
flake.lock(453dc9c5) with realnixthis time: fullnix buildofprograms.nixvim.build.packagefor thesausageconfig (the home-manager nixvim module end-to-end — vim-pack-dir, wrapped neovim, generated init) exits 0, and the built package contains aerial.nvim, dressing.nvim, fastaction.nvim, nvim-lightbulb, ts-comments.nvim, nvim-ts-context-commentstring, clangd_extensions.nvim, cmake-tools.nvim, telescope-fzf-native.nvim, telescope-ui-select.nvim, with the clangd flags and gdb adapter in the generated init. One eval-caught fix included: clangd'scmdbelongs undersettingsin the nixvim server modules (commit 2).Closes #19