Add document link support for "см." references in method and variable descriptions#3692
Add document link support for "см." references in method and variable descriptions#3692
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
…escriptions Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
|
@copilot Вот именно ссылки см и интересовали в первую очередь. А https были не нужны. |
Понял, моя ошибка - я реализовал поддержку HTTP/HTTPS URL вместо "см." ссылок. Для реализации "см." ссылок как documentLink нужно:
Это более сложная задача, требующая интеграции с ReferenceResolver и ServerContext для поиска модулей/методов по имени. Вопросы:
|
|
@copilot Сделай попытку поиска ссылки через reference resolver. Если что-то вернулось, тогда рисуй Document link |
…ferenceResolver Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Готово. Изменил реализацию на использование ReferenceResolver для "см." ссылок:
Коммит: d759aab |
d759aab to
e93b40b
Compare
Test Results2 790 files + 9 2 790 suites +9 50m 21s ⏱️ + 1m 50s Results for commit d759aab. ± Comparison against base commit d80ae40. This pull request removes 8 and adds 7 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
|
|
@nixel2007 |
|
@nixel2007 Посмотри класс hyperlink. вероятно, надо добавить позицию в тексте? |
|
@theshadowco да, мне в любом случае надо на рэнж вешать все это добро |
|
@nixel2007 |




Implements LSP document link provider for "см." (see) references found in method and variable description comments, making them clickable in editors.
Changes
DescriptionDocumentLinkSupplier- Scans method/variable description ranges for "см." references using regex(?:см|См)\.\\s+([А-Яа-яA-Za-z0-9_.()]+)@Component- Works alongside existingDiagnosticDescriptionDocumentLinkSupplierExample
"См." references become clickable links in LSP clients, navigating to the referenced symbol's definition.
How It Works
linkfield)Testing
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.