Printable idea sheet
references_in_functional_code_comments
reqlan rq/extension/language/comment-references/functional-code-comment-references.rq:4
Katz 0.300
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.
- 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
Interactive page: references_in_functional_code_comments