Add a new def_flow analysis module that follows .def block template and address names through local variables and proc parameters, and a wrapper-table builder to resolve proc arguments that forward .def names. Derived names are resolved only for hover/definition (not for rename). Integrate this into the LSP: - lsp_server: add _word_at and _tcl_def_symbol helpers; fallback to derived_def_symbol when direct NX-argument navigation fails for hover, goto-definition and references; return proper ranges for hover. - lsp_tclserver: cache and expose a def_wrapper_table built from index def_flows (with cache invalidation on index generation). Also add unit tests for def_flow and update CHANGELOG to note hover/ definition and completion preview improvements for derived names.
316 lines
9.1 KiB
Markdown
316 lines
9.1 KiB
Markdown
# Changelog
|
|
|
|
All notable changes to NX Postprocessor Support are listed here, newest release first.
|
|
Versions correspond to the Git tags of this repository.
|
|
|
|
## Unreleased
|
|
|
|
### Added
|
|
|
|
- Go to Definition from block template and address arguments in Tcl (`MOM_do_template`, `MOM_force`, `MOM_suppress`, `MOM_ask_address_value`, ...) to the `BLOCK_TEMPLATE`/`ADDRESS` declaration in the PSC `.def` files
|
|
- Hover over block templates shows the template body; hover over addresses shows format, leader, trailer, min/max, and modality
|
|
- Find References and Rename for block templates and addresses across Tcl and `.def` files, including addresses used inside block templates
|
|
- Go to Definition, hover, references, and rename also work inside `.def` files
|
|
- Hover and Go to Definition also recognize block template and address names that reach an NX command through a local variable (`set`, `lappend`, `list`, `foreach`) or through the parameter of a custom proc such as `LIB_SPF_call_cycle "absolute_mode"`, including nested wrapper procs; same-named strings without such a path are not recognized, and these derived names are not renamed
|
|
- Completion items for block templates and addresses (`BLOCK_LIST`, `ADDR_LIST`, `MOM_do_template`, ...) show the same preview as the hover
|
|
|
|
### Documentation
|
|
|
|
- Document DEF block templates, addresses, `BLOCK_LIST`/`ADDR_LIST`, and the formatting changes in the README
|
|
|
|
## [2026.9.700] - 2026-09-24
|
|
|
|
### Added
|
|
|
|
- `BLOCK_LIST` and `ADDR_LIST` completion keywords that list all loaded block templates or addresses; the keyword is replaced by the selected quoted name
|
|
|
|
### Changed
|
|
|
|
- Format comments with a space after `#` (`#Comment` becomes `# Comment`); `##` separators, `#!`, and comments that already start with whitespace stay unchanged
|
|
|
|
## [2026.9.600] - 2026-09-24
|
|
|
|
### Added
|
|
|
|
- Read `BLOCK_TEMPLATE` and `ADDRESS` names from the `.def` files listed under `<DefinedEvents>` in PSC layers; changes to PSC and DEF files are picked up automatically
|
|
- Suggest block templates for `MOM_do_template` and addresses for `MOM_ask_address_value`, `MOM_force`, and `MOM_suppress`, each followed by variables
|
|
- Suggest `Always`, `Once`, and `Off` for the first argument of `MOM_force` and `MOM_suppress`
|
|
- Insert block templates, addresses, and modes in quotes without doubling typed or auto-closed quotes; insert variables with a leading `$`
|
|
- Persistent workspace index in the extension storage, so restarts skip reparsing unchanged files; the cache is discarded automatically when the server or bundled tclint changes
|
|
|
|
### Changed
|
|
|
|
- Reparse only the top-level Tcl commands touched by an edit instead of the whole file
|
|
- Speed up TclOO completion, signature help, inlay hints, and Go to Definition by reusing the cached syntax tree and skipping files without classes
|
|
- Speed up references, document highlights, and call hierarchy with cached definition lookups
|
|
- Keep background indexing from blocking requests that need a fresh syntax tree
|
|
|
|
### Fixed
|
|
|
|
- Format and lint `uplevel` bodies as Tcl scripts instead of leaving them untouched
|
|
- Stop the Python debug bootstrap with a clear error instead of hanging when no debugpy listener or only a stale one is available
|
|
|
|
## [2026.9.501] - 2026-09-21
|
|
|
|
### Fixed
|
|
|
|
- Highlight braced stored-procedure names in `lappend` arguments
|
|
|
|
## [2026.9.500] - 2026-09-21
|
|
|
|
### Added
|
|
|
|
- Index Tcl scripts referenced by PSC layers, including external folders, environment-variable folders, and legacy Windows encoding
|
|
- Share TclOO class metadata across files for completion, signature help, inlay hints, and highlighting
|
|
- Go to Definition for TclOO classes, constructors, and resolved methods, including PSC library definitions
|
|
- CDL event handler snippets declare an extra `<var>_defined` global for parameters marked `TOGGLE Off`
|
|
- Allow `INVALID` in the CDL `CATEGORY` grammar
|
|
|
|
## [2026.9.400] - 2026-09-11
|
|
|
|
### Added
|
|
|
|
- Document-local TclOO method completion for `new`/`create` instances, `my`, and statically inferred return chains
|
|
- Signature help and parameter inlay hints for resolved TclOO methods and constructors, including optional and variadic arguments
|
|
- Suggest TclOO class names as classes and semantically highlight their declarations and calls
|
|
- Keep completion working while the file has syntax errors
|
|
|
|
## [2026.9.300] - 2026-09-10
|
|
|
|
### Added
|
|
|
|
- Array key completion, including keys built with substitutions
|
|
- Generated CDL event handler snippets declare `args`
|
|
|
|
## [2026.9.220] - 2026-09-08
|
|
|
|
### Fixed
|
|
|
|
- Completion inside unfinished braced arguments now recognizes nested commands
|
|
|
|
## [2026.9.210] - 2026-09-04
|
|
|
|
### Added
|
|
|
|
- Highlight escaped quoted strings and embedded variables in DEF files
|
|
|
|
## [2026.9.200] - 2026-09-03
|
|
|
|
### Added
|
|
|
|
- Command-aware completion for Tcl subcommands, fixed argument values, and options such as `string compare -nocase`
|
|
- Semantic argument completion for variables, procedures, namespaces, and local file paths
|
|
- Placeholder-based snippets for `if`, `foreach`, `proc`, `switch`, `try`, and `dict for`
|
|
|
|
## [2026.9.100] - 2026-09-03
|
|
|
|
### Added
|
|
|
|
- Incoming and outgoing call hierarchy for custom Tcl procedures and MOM event handlers
|
|
- Document highlights for procedure and variable occurrences
|
|
- Context-aware completion that ranks local, current-file, workspace, and built-in symbols in that order
|
|
|
|
### Changed
|
|
|
|
- Update lsprotocol to 2025.0.0
|
|
|
|
## [2026.8.300] - 2026-08-28
|
|
|
|
### Added
|
|
|
|
- Integrate the NX Tcl Remote Debugger; the separate `local-nx.nx-tcl-debug` extension is no longer needed
|
|
- `nx-tcl` attach configurations and breakpoints in Tcl and DEF files
|
|
- Stepping, call stack, scopes, variables, watches, evaluation, logpoints, hit conditions, and Tcl error stops
|
|
- Breakpoints in `LIB_GE_command_buffer_edit_*` bodies, mapped back to their source and owning procedure
|
|
|
|
## [2026.8.200] - 2026-08-19
|
|
|
|
### Added
|
|
|
|
- Configurable parameter-name inlay hints (`inlayHints.parameterNames`, `inlayHints.suppressWhenArgumentMatchesName`) for custom and built-in NX procedures, including variadic arguments
|
|
- Unlimited inlay hint length for Tcl files, so later parameter names are not truncated
|
|
|
|
### Changed
|
|
|
|
- Cache semantic tokens, inlay hints, hover, completion, and variable indexes and debounce edits and diagnostics for faster responses
|
|
|
|
## [2026.8.100] - 2026-08-19
|
|
|
|
### Added
|
|
|
|
- Workspace symbol index with Go to Definition, references, and rename
|
|
- Signature help for custom Tcl procedures and built-in NX/MOM procedures
|
|
- CDL event handler snippets and hover with generated handler and `mom_` parameter hints
|
|
- Keep indexes in sync when Tcl files are changed, deleted, or renamed on disk
|
|
|
|
## [2026.6.201] - 2026-06-22
|
|
|
|
### Fixed
|
|
|
|
- Preserve whitespace inside single-line braced expressions when formatting
|
|
|
|
## [2026.6.200] - 2026-06-22
|
|
|
|
### Fixed
|
|
|
|
- Tcl formatting bug caused by the formatter options
|
|
|
|
## [2026.6.100] - 2026-06-18
|
|
|
|
### Changed
|
|
|
|
- Folding ranges for Tcl are computed by the language server, avoiding duplicate regions
|
|
- Language server restarts are serialized so only one server runs at a time
|
|
- Pin the Python dependencies of the server and update the bundled libraries
|
|
|
|
### Fixed
|
|
|
|
- Several stability fixes
|
|
|
|
## [2025.9.200] - 2025-09-01
|
|
|
|
### Changed
|
|
|
|
- Install server dependencies with uv instead of pip
|
|
- Relicense to AGPL-3.0-or-later
|
|
|
|
## [2025.9.101] - 2025-08-16
|
|
|
|
### Added
|
|
|
|
- Signature help
|
|
- Variable checks and additional semantic tokens
|
|
|
|
### Fixed
|
|
|
|
- `incr` on variables that already exist and `foreach` loop variables
|
|
|
|
## [2025.8.400] - 2025-08-15
|
|
|
|
### Added
|
|
|
|
- Outline for DEF and CDL files
|
|
|
|
### Fixed
|
|
|
|
- Duplicate `MOM_add_to_block_buffer` entry renamed to `MOM_add_to_line_buffer`
|
|
|
|
## [2025.8.300] - 2025-08-12
|
|
|
|
### Added
|
|
|
|
- Go to Definition and document outline for Tcl
|
|
- Variable index with positions
|
|
- Procedure documentation in hover
|
|
|
|
### Fixed
|
|
|
|
- Formatter deleting line continuations (`\`)
|
|
- Wrong semantic highlighting in several cases
|
|
|
|
## [2025.8.202] - 2025-08-12
|
|
|
|
### Fixed
|
|
|
|
- Formatter deleting line continuations (`\`)
|
|
|
|
## [2025.8.201] - 2025-08-11
|
|
|
|
### Fixed
|
|
|
|
- Highlighting errors
|
|
|
|
## [2025.8.200] - 2025-08-09
|
|
|
|
- Version change only
|
|
|
|
## [2025.8.2] - 2025-08-09
|
|
|
|
- Version change only
|
|
|
|
## [2025.08.1] - 2025-08-09
|
|
|
|
### Added
|
|
|
|
- Load procedures from all workspace files and PSC-referenced scripts for completion
|
|
- Extension icon
|
|
|
|
## [0.4.14] - 2025-08-04
|
|
|
|
### Added
|
|
|
|
- `LIB_GE_command_buffer_edit_*` support in the parser
|
|
|
|
### Fixed
|
|
|
|
- Namespace calls in POCO code
|
|
- Semantic highlighting of variables in arrays
|
|
|
|
## [0.4.12] - 2025-08-03
|
|
|
|
### Added
|
|
|
|
- More semantic tokens and completion items
|
|
|
|
## [0.4.10] - 2025-07-28
|
|
|
|
### Added
|
|
|
|
- Linter based on tclint
|
|
|
|
### Changed
|
|
|
|
- Use tclint as parser and formatter
|
|
|
|
## [0.4.9] - 2025-07-22
|
|
|
|
### Added
|
|
|
|
- More completion items
|
|
|
|
## [0.4.8] - 2025-07-21
|
|
|
|
### Added
|
|
|
|
- More NX functions and hover documentation
|
|
|
|
## [0.4.7] - 2025-07-21
|
|
|
|
### Added
|
|
|
|
- Formatter settings
|
|
|
|
### Fixed
|
|
|
|
- Formatter fixes
|
|
|
|
## [0.4.6] - 2025-07-21
|
|
|
|
### Fixed
|
|
|
|
- `@` in buffers when formatting
|
|
|
|
## [0.4.5] - 2025-07-21
|
|
|
|
### Fixed
|
|
|
|
- Formatting of buffers
|
|
|
|
## [0.4.4] - 2025-07-21
|
|
|
|
### Fixed
|
|
|
|
- Formatter fixes
|
|
|
|
## [0.4.3] - 2025-07-21
|
|
|
|
### Fixed
|
|
|
|
- Formatting fixes
|
|
|
|
## [0.4.2] - 2025-07-20
|
|
|
|
### Added
|
|
|
|
- Initial release with syntax highlighting, formatting, auto-completion (including `TYPE`), hover, and DEF file support
|