Code reference detail
mod.rs
crates/reqlan-parse/src/refactor/mod.rs
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| lsp_migration_remainder | in-progress | The default language server is [language_server_rust]. The Rust process serves the editor methods the product uses: sync, diagnostics, definition, highlight, links, hover, semantic tokens, inlay hints, code lens, completion, code actions, rename, references, document symbols, folding, and workspace symbols. Custom requests are file reference, wildcard reference, and reference-search site. The host pushes the inbound snapshot, settings, attribute catalog, name catalog, and bases. Import and file-path completion run in the Rust server ( [import_code_completion], [import_code_completion_rendering], [import_code_completion_auto_file_import] ). Triggers are `[`, `@`, `.`, `/`, and `"`. Import strings complete `.rq` files and directories. Anonymous bracket paths complete every file and directory, with the same ranking and alias rules. A cross-file idea shows its relative import path and inserts a from-import on accept when that name is not already imported. Move and delete text plans are native ( [refactor_symbol_move], [refactor_symbol_delete] ). The host passes open texts and index referencers. It does not build a Langium document. Barrel page planning is native. Document symbols and folding are flat idea lists. Semantic tokens include `keyword` ( `import`, `from`, `as` ) and file-symbol `method` spans. The theme maps `decorator`, `operator`, `keyword`, and `method` onto TextMate scopes. [lsp_file_watch] is the node document manager. The Rust server keeps no closed syntax tree. A neighbor read checks the file stamp. The index host watches `**/*.rq`. Do not port the Langium watch rebuild. `textDocument/selectionRange` grows with the parse ( ["../vsc-primitives.rq".selection_range] ). The activity bar ' s `selectionRange` is the editor selection. A definition link ' s `originSelectionRange` is the token under the caret. Rust text sync is incremental ( [lsp_incremental_sync] ). The node server keeps Langium incremental sync. Rust cancellation and work-done progress are [lsp_work_progress]. The node connection already accepts cancel tokens. Index and search progress stay on the extension host. The Rust parser applies relative body indent. The node process ( `packages/extension/src/language/main.ts` and the Langium providers ) is the fallback when the setting is `node` or the binary is missing. The extension host stays in TypeScript: the language client, command UI, index, webviews, and TextMate. Comment rename in non- `.rq` files is a host rename provider. It reads the comment text. It does not build a Langium document. | 0.140 | |
| refactor_support | syntactic symbols should be available for renaming, moving, and deleting. the extension should watch for the change. Detailed behaviour lives in ["../../mutation/refactor_support.rq"]. Implemented by ["../../../../packages/language/src/reqlan-rename-provider.ts"], ["../../../../crates/reqlan-parse/src/refactor/mod.rs"], ["../../../../packages/extension/src/mutation_module/refactor/idea-extract-flow.ts"], and ["../../../../packages/extension/src/mutation_module/refactor/index.ts"]. | 0.078 | ||
| refactor_native_planner | done | Move and delete edit plans are pure text in the parse crate. The host supplies source text, destination text, and extra file texts. It applies the returned edits and reindexes. The planner does not read the disk, the index, or a Langium document. [refactor_symbol_move] [refactor_symbol_delete] | 0.108 | |
| comment_reference_refactor_support | done | File and symbol refactors must update [comment_reference] tokens in code files and in `.rq` comments. When a file or folder moves or is renamed, rewrite `rq:["path".idea]` paths relative to the referencing file: outbound paths inside the moved file, and inbound paths in other files that pointed at it. Aliased paths such as `rq:["@/old/file.rq".idea]` keep the alias and update the remainder. When an idea is renamed, update matching comment idea tokens. When an idea moves to another `.rq` file, rewrite qualified comment paths that targeted the old file for that idea. Pathless `rq:[idea]` tokens stay as name-only links. When an idea is deleted, remove comment references that targeted it. Relates to [refactor_file_moves], [refactor_symbol_rename], [refactor_symbol_move], [refactor_symbol_delete], [refactor_changes], ["./mutation-hooks.rq".move_file], ["./mutation-hooks.rq".rename_file], ["../language/comment-references/functional-code-comment-references.rq".references_in_functional_code_comments]. | 0.194 | |
| refactor_symbol_delete | An idea declaration should offer a code action to delete it and update references. Deleting should remove the declaration, clear or rewrite AST and comment references that targeted it ( [comment_reference_refactor_support] ), and reindex affected files. [refactor_support] [refactor_changes] Implemented by ["../../../crates/reqlan-parse/src/refactor/mod.rs"], ["../../../packages/language/src/reqlan-code-action-provider.ts"], ["../../../crates/reqlan-lsp/src/code_actions.rs"], and ["../../../packages/extension/src/mutation_module/refactor/register-idea-refactor-commands.ts"]. | 0.128 | ||
| refactor_symbol_move | done | An idea can move to another existing `.rq` file from a code action or the [command_palette]. Palette commands use the idea under the cursor, or a pick list when the cursor is not on an idea. 1. Move idea ( `reqlan.refactor.moveIdea` ) - Cut the declaration from the source file. - Insert it into the destination file. - Remove source imports that the move makes unused. - Add the imports that the moved idea needs to the destination. - If the source file still refers to the idea, import it from the destination. - Rewrite comment references per [comment_reference_refactor_support]. - Reindex without duplicate idea rows for the old hosting file. 2. Move idea content ( `reqlan.refactor.moveIdeaContent` ) - Do the same as ( 1 ). - Always import the destination file in the source. - Leave a one-liner stub in the source: `idea_name [alias.idea_name]`. Do not overlap [decompose]: decompose writes a new file. Move and decompose share the resolve-plan-apply sequence in ["../../../packages/extension/src/mutation_module/refactor/idea-extract-flow.ts"]. [refactor_support] [refactor_changes] | 0.128 |
Reference labels
"../../../../crates/reqlan-parse/src/refactor/mod.rs", "../../../crates/reqlan-parse/src/refactor/mod.rs"