Skip to content

Find: whole word and regex; Ctrl+D; Format Selection; workspace symbols - #15

Merged
Tuafo merged 2 commits into
mainfrom
claude/cool-hypatia-ict23g
Oct 14, 2026
Merged

Tuafo merged 2 commits into
mainfrom
claude/cool-hypatia-ict23g

Conversation

@Tuafo

@Tuafo Tuafo commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

This closes the script editor gaps that #14 left open (Far-Beyond-Pulsar/Pulsar-Native#1012). It builds on the view API from Far-Beyond-Pulsar/Mockaco#11, which is merged. Mockaco is pinned to its merge commit, e36ce16.

Changes

  • Find bar
    • Adds Match Whole Word (Alt+W) and Use Regular Expression (Alt+R) next to Match Case, which now also has a key (Alt+C).
    • An invalid expression shows "Invalid expression" instead of a match count.
    • Replace expands $1 and ${name}.
  • Add Next Occurrence (Ctrl+D, in the Selection menu): the first press selects the word under the caret. Each further press adds the next occurrence of the selection, wrapping to the start of the file.
  • Format Selection (Ctrl+K Ctrl+F, in the Edit menu and the context menu).
    • rust-analyzer only supports rangeFormatting with a nightly rustfmt, so this asks for the whole document to be formatted.
    • It then applies only the edits that fall on the selected lines.
    • With no selection, it formats the whole document.
  • Go to Symbol in Workspace (Ctrl+T, in the Go menu).
    • Sends a workspace/symbol request again as you type. The server does the fuzzy matching, so the list isn't filtered again here.
    • The search starts from the selected text, if any.
    • Location requests now carry an id, so an older answer can't overwrite a newer one.

Tests

  • workspace_symbols_take_both_answer_shapes: covers both SymbolInformation[] and WorkspaceSymbol[] answers, including a symbol that names only its file.
  • format_selection_keeps_the_edits_within_its_lines.
  • The panel test now drives the new commands through their keys:
    • Alt+W, then Alt+R with \w\(\) (4 matches), then an invalid expression;
    • Ctrl+D twice, which selects both calls to a;
    • Ctrl+T, which opens the workspace symbol list.
  • cargo test -p script_editor_plugin --lib: 18 passed, run inside a Pulsar-Native checkout.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RXesb588JFPYCDBnK94vn5

The script editor's remaining gaps from Pulsar-Native#1012, on the view API
of Mockaco#11 (pinned to its branch until it merges):

- Find bar: Match Whole Word (Alt+W) and Use Regular Expression (Alt+R)
  beside Match Case (Alt+C); an invalid expression says so instead of a
  count, and Replace expands $1 / ${name}.
- Add Next Occurrence (Ctrl+D, Selection menu): the word under the caret,
  then each next occurrence of the selection.
- Format Selection (Ctrl+K Ctrl+F, Edit and context menus). rust-analyzer
  only range-formats with a nightly rustfmt, so this formats the document
  and applies only the edits within the selected lines.
- Go to Symbol in Workspace (Ctrl+T, Go menu): workspace/symbol, asked
  again as the name is typed (the server matches fuzzily, so the list is
  not filtered again here); location requests now carry an id so an older
  answer never replaces a newer one.

Tests: workspace symbol answers in both shapes, which formatting edits a
selection keeps, and the panel test now drives Alt+W/Alt+R (with an
invalid expression), Ctrl+D and Ctrl+T through the keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RXesb588JFPYCDBnK94vn5
@Tuafo Tuafo self-assigned this Oct 14, 2026
@Tuafo Tuafo moved this from Todo to In Progress in Pulsar Tracker Oct 14, 2026
@Tuafo
Tuafo merged commit de8c477 into main Oct 14, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Pending Release in Pulsar Tracker Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending Release

Development

Successfully merging this pull request may close these issues.

2 participants