Idea detail
references_in_functional_code_comments
reqlan rq/extension/language/comment-references/functional-code-comment-references.rq:4
Summary
Comments in functional code should be able to reference reqlan ideas using the an `rq:` prefixed to an idea: `rq:idea` as demonstrated in python, but actually applicable to any language's comment context:
Editor hosts are every language except comment_reference_language_blocklist.
With the rust language server, a resolved `rq:…` site is Ctrl + click navigable via go-to-definition.
File document links stay out of the editor ( editor_reference_activation ).
Comment `rq:…` sites use TextMate `meta.link.reqlan markup.underline` so the resting editor shows they are link-shaped ( comment_reference_resting_underline ).
After that goto, Alt + Left restores the comment-host caret ( comment_reference_navigate_back ).
Missing ideas keep the error underline and have no definition target.
Relates to comment_reference_refactor_support, comment_reference_import_root_alias,
language_server_rust,
editor_reference_activation.
Navigation
Attributes
| Key | Value |
|---|---|
| demos | features-code-comment.text.js, features-code-comment.text.py |
| implementation | session.rs, main.ts, register-comment-reference-links.ts, reqlan-comment.injection.json |
| status | done |
| tests | linking.test.ts:comment references in source files resolve to rq ideas, references.test.ts:finds rq: references in feature demo source files, references.test.ts:finds rq: comment references in python triple-quoted comments, session.rs:comment_links_share_one_resolution, session.rs:comment_definition_follows_a_resolved_rq_reference, editor-link-activation.test.ts:comment injection link scope includes markup.underline, editor-link-activation.test.ts:package.json contributes comment.rq.injection |
Ancestor context
No ancestor chain recorded.
Outbound references
Inbound references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| references | code_comment_syntax_errors | reqlan rq/core_analysis/check.rq | ["../extension/language/comment-references/functional-code-comment-references.rq".references_in_functional_code_comments |
| references | language_surface | reqlan rq/extension/extension.rq | references_in_functional_code_comments |
| references | code_actions_ignore_error | reqlan rq/extension/host/features-commands.rq | references_in_functional_code_comments |
| references | comment_reference_resting_underline | reqlan rq/extension/language/comment-references/functional-code-comment-references.rq | references_in_functional_code_comments |
| references | comment_reference_navigate_back | reqlan rq/extension/language/comment-references/functional-code-comment-references.rq | references_in_functional_code_comments |
| references | comment_reference_language_blocklist | reqlan rq/extension/language/comment-references/functional-code-comment-references.rq | references_in_functional_code_comments |
| references | comment_reference_import_root_alias | reqlan rq/extension/language/comment-references/functional-code-comment-references.rq | references_in_functional_code_comments |
| references | editor_reference_activation | reqlan rq/extension/language/syntax/features-syntax-highlighting.rq | references_in_functional_code_comments |
| references | any_file_scope | reqlan rq/extension/local-context/context-scope.rq | references_in_functional_code_comments |
| references | comment_reference_refactor_support | reqlan rq/extension/mutation/refactor_support.rq | references_in_functional_code_comments |
| references | comment_reference_resolution_error | reqlan rq/language/syntax.rq | ["../extension/language/comment-references/functional-code-comment-references.rq".references_in_functional_code_comments |
| references | referenced_files | reqlan rq/ontology.rq | references_in_functional_code_comments |
| references | comment_reference | reqlan rq/reference_types.rq | references_in_functional_code_comments |
Unresolved references
| Kind | Idea | Path | Snippet |
|---|---|---|---|
| None | |||
Local graph
Initialising graph…