Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@uenoku
Copy link
Member

@uenoku uenoku commented Feb 27, 2025

This commit adds "Go to Definition" and "Find References" functionality to the CIRCT Verilog LSP server. These features allow users to navigate between symbol definitions and usages within Verilog source files. Besides it provides cross references for source location comments.

  • Added VerilogIndex class to track symbol definitions and references
  • Implemented source location parsing for external file references
  • Added support for LSP definition and reference requests

Following PDLL's LSP implementation, the implementation uses an IntervalMap to efficiently map source positions
to symbols, allowing quick lookups when users request definitions or references. It also supports source location annotations in comments that can link to external source files, enabling cross-language navigation.

@uenoku uenoku changed the base branch from dev/hidetou/lsp to main February 28, 2025 00:37
@uenoku uenoku force-pushed the dev/hidetou/lsp-features/def branch from bbf0fca to 47e6e38 Compare February 28, 2025 00:38
This commit adds "Go to Definition" and "Find References" functionality to
the CIRCT Verilog LSP server. These features allow users to navigate between
symbol definitions and usages within Verilog source files.

- Added VerilogIndex class to track symbol definitions and references
- Implemented source location parsing for external file references
- Added support for LSP definition and reference requests
- Extended server capabilities to advertise the new functionality
- Added test cases to verify the new features

Following PDLL's LSP implemetation, the implementation uses an
IntervalMap to efficiently map source positions
to symbols, allowing quick lookups when users request definitions or
references. It also supports source location annotations in comments that
can link to external MLIR files, enabling cross-language navigation.
@uenoku uenoku force-pushed the dev/hidetou/lsp-features/def branch from 18ac786 to 2d8ceeb Compare September 23, 2025 17:55
Copy link
Contributor

@fabianschuiki fabianschuiki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I'm not too familiar with the details of LLVM's LSP implementation, but the code looks good from what I can tell.

@uenoku uenoku merged commit ca6f8e2 into main Sep 24, 2025
7 checks passed
@uenoku uenoku deleted the dev/hidetou/lsp-features/def branch September 24, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants