feat(def-navigation): surface last-loaded .def declaration for hover/GoTo
When a block template or address is declared in multiple PSC layers, hover and Go to Definition now resolve to the effective declaration (the one from the last-loaded .def file). Find References and Rename still include all declarations. - add effective_def_locations(documents, target, uris) helper (returns the last declaration) - use effective_def_locations in lsp_server for goto/definition endpoints - change def_hover_markdown to show the effective declaration and append a short "_Overrides ..._" note listing overridden declarations - update changelog and add a test that verifies hover/GoTo reference the last loaded declaration while references include all declarations
This commit is contained in:
@@ -16,6 +16,10 @@ Versions correspond to the Git tags of this repository.
|
||||
- Warning for block template and address names in NX commands (`MOM_do_template stedy_rest`) that no loaded `.def` file declares; names built at runtime (`$var`, `"CYCLE_$x"`) are not checked, and the warnings update when a `.def` file changes
|
||||
- Completion items for block templates and addresses (`BLOCK_LIST`, `ADDR_LIST`, `MOM_do_template`, ...) show the same preview as the hover
|
||||
|
||||
### Changed
|
||||
|
||||
- When a block template or address is declared in several PSC layers, hover and Go to Definition show only the effective one, the declaration of the last loaded `.def` file, and name the declarations it overrides; Find References and Rename still include all declarations
|
||||
|
||||
### Documentation
|
||||
|
||||
- Document DEF block templates, addresses, `BLOCK_LIST`/`ADDR_LIST`, and the formatting changes in the README
|
||||
|
||||
Reference in New Issue
Block a user