Skip to content

v1.8.0 - clangd code actions, rename, references, range formatting

Choose a tag to compare

@chenmoulaile chenmoulaile released this 25 Oct 01:35
· 33 commits to main since this release

Highlights

  • Code Actions (CppAssistant: Code Actions): quick fixes, #include suggestions, and refactors from clangd. Supports immediate edits, codeAction/resolve, and refactor tweaks through workspace/executeCommand + workspace/applyEdit.
  • Rename Symbol (CppAssistant: Rename Symbol): semantic rename across the project, including headers that are not open.
  • Find References (CppAssistant: Find References): list references in a quick panel and jump to the selected location.
  • Format Selection (CppAssistant: Format Selection): format only the selected lines using clangd textDocument/rangeFormatting, clang-format --lines, or the built-in range formatter.

Fixes

  • Parse textDocument/publishDiagnostics from the top-level uri field, so clangd diagnostics are stored and quick fixes receive their diagnostic context.
  • Reply to workspace/applyEdit with {"applied": bool} so clangd refactor tweaks complete correctly.
  • Skip redundant didChange notifications to keep diagnostic versions aligned.

Notes

  • New optional key bindings: Ctrl+. (code actions), Ctrl+Alt+R (rename), Shift+F12 (references), Ctrl+Alt+F (format selection).
  • Command palette entries and an optional CppAssistant menu were added.
  • Code actions, rename, and references require clangd; range formatting falls back to clang-format or the built-in formatter.