Enable completion item resolution so selecting a completion can populate
documentation with a preview of the corresponding .def declaration.
- Turn on resolve_provider in the completion options.
- Implement on_completion_resolve to attach Markdown documentation
computed by def_hover_markdown when the completion item's data
contains a ("def" -> [kind, name]) payload.
- Include that "def" payload when generating def-related completion items.
- Add tests that verify block-template and address-list items resolve to
Markdown previews.
Before: def-related completion items had no documentation on resolve.
After: selecting such items will return a Markdown preview of the .def entry.
Adjust tests to match current completion item labels and clean up formatting:
- Expect "nocomplain" (no leading dash) for the unset option case instead of {"-nocomplain", "--"}.
- Reflow several multi-line source literals into single-line/f-string forms.
- Normalize various assertions and generator expressions onto single lines.
- Reformat TextDocumentItem construction for readability.
These changes are limited to test code and reflect the updated shape/labels of completion items and stylistic cleanup; no production logic is modified.
Add tools/def_navigation.py providing utilities to locate .def symbols
and occurrences, produce definition/reference locations, build hover
Markdown for addresses (property table with format links and modality
labels), and compute workspace edits for renames (only when a
declaration exists). Helpers include def_symbol_at, def_definition_locations,
def_reference_locations, tcl_def_occurrences, all_def_target_locations,
def_rename_edits and def_hover_markdown, plus small formatting helpers.
Also add server/tests/python_tests/test_def_navigation.py exercising
go-to-definition, hover, references and rename behavior between Tcl and
.def files, including use of unsaved text and ensuring undeclared names
are not renamed. Tests assert address property ordering, modality labels,
and correct edit ordering for workspace edits.
Add client and server support to navigate, inspect, reference, and rename block
template and address symbols declared in PSC .def files:
- Client: register language providers for .def (definition, hover, references,
prepare/provide rename) and send the current document text with each request.
- Server: parse .def files into DefDocument/DefDeclaration/DefReference, expose
def-specific LSP endpoints (definition/hover/references/prepareRename/rename),
and integrate .def lookups into existing Tcl hover/definition/references/rename
flows so Tcl calls jump to .def declarations.
- Tcl server keeps a snapshot API for .def documents (current editor content can
replace file on request); only declared names in loaded .def files can be
renamed. Name validation uses DEF_NAME_RE.
Update README and CHANGELOG to document navigation features.
Add static value suggestions for MOM_do_template's second argument (CREATE, BUFFER)
and a dynamic completion rule marking that position as a VALUE.
Also add dynamic completion rules to provide ADDRESS completions for
MOM_disable_address (positions 1–32) and for repeated address arguments of
MOM_enable_address.
Before: these arguments had no completion assistance.
After: the CLI completion subsystem will offer appropriate VALUE/ADDRESS suggestions.
Populate CHANGELOG with detailed release entries up to 2026.9.700 and tidy historical notes. The new content documents recent features and fixes (notably DEF block template/address handling, the BLOCK_LIST/ADDR_LIST completion keywords, comment spacing/formatting changes, and the persistent workspace index), and cleans up formatting and older release headings for readability.
Update the README and CHANGELOG to describe newly documented language-server behaviors and editor UX details.
- Read BLOCK_TEMPLATE and ADDRESS names from .def files listed under <DefinedEvents> in PSC layers and refresh on PSC/DEF changes; completion suggestions for MOM_do_template, MOM_ask_address_value, MOM_force, and MOM_suppress
- Insert quoted block templates/addresses and Always|Once|Off modes (replace auto-closed/typed quotes instead of doubling) and insert variables with a leading `$`
- Add BLOCK_LIST and ADDR_LIST completion keywords to list all loaded block templates or addresses
- Document formatting/linting of uplevel bodies as Tcl and normalization of comment spacing (#Comment → # Comment) while preserving ##, #!, and already spaced comments
- Note that the Python debug bootstrap now stops with a clear error instead of hanging when no debugpy listener or only a stale one is available
These changes are reflected under "Unreleased" in the changelog and in the README section about DEF block templates and addresses.
Add keyword-driven completions for BLOCK_LIST and ADDR_LIST in the LSP server.
- While typing a prefix of these keywords the server returns the keyword(s)
as incomplete snippet suggestions that trigger a re-request.
- Once the keyword is typed the server replaces it with a full list of the
corresponding loaded block templates or addresses (quoted), and sets each
item's filter_text to include the keyword so further typing narrows results.
- Integrate this flow into on_completion and factor the symbol-list logic
into a helper that returns either incomplete keyword suggestions or the
completed symbol list.
Also implement NxFormatter.format_comment to ensure a single space after a
leading '#' for comments that don't already start with whitespace, while
leaving sequences of '#' (separators), shebangs, and already-spaced comments
unchanged. This affects both standalone and inline comments.
Add/rename tests to cover the new completions and comment-spacing behavior.
Make the completion parser inspect nested command segments when an
unfinished braced argument is the active context, instead of treating the
entire braced body as opaque. This resolves cases where inner commands
(e.g. command substitutions) were ignored and improves suggestion
accuracy. Tests were added to cover nested commands inside braced
conditions and to ensure closed braced arguments do not change context.
Also add Linux-specific launch and task configurations to IDE settings
to simplify local extension development and debugging.
- Recursively scan inner context when a braced body is unfinished
- Add tests for nested commands and closed-brace behavior
- Add Linux launch/task entries for easier development