Add diagnostics that warn when a literal NX command argument names a block template or address that no loaded .def file declares (diagnostic codes unknown-block-template and unknown-address). Names computed at runtime (e.g. $var or "CYCLE_$x") are not checked, and kinds whose .def file is not loaded are skipped. The server now recomputes and refreshes diagnostics when .def documents change (clears cached diagnostics and requests a workspace diagnostic refresh if the client supports it). Tests cover positive, negative and invalidated-cache cases.
9.3 KiB
9.3 KiB
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 theBLOCK_TEMPLATE/ADDRESSdeclaration in the PSC.deffiles - 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
.deffiles, including addresses used inside block templates - Go to Definition, hover, references, and rename also work inside
.deffiles - 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 asLIB_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 - Warning for block template and address names in NX commands (
MOM_do_template stedy_rest) that no loaded.deffile declares; names built at runtime ($var,"CYCLE_$x") are not checked, and the warnings update when a.deffile changes - 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_LISTandADDR_LISTcompletion 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
#(#Commentbecomes# Comment);##separators,#!, and comments that already start with whitespace stay unchanged
[2026.9.600] - 2026-09-24
Added
- Read
BLOCK_TEMPLATEandADDRESSnames from the.deffiles listed under<DefinedEvents>in PSC layers; changes to PSC and DEF files are picked up automatically - Suggest block templates for
MOM_do_templateand addresses forMOM_ask_address_value,MOM_force, andMOM_suppress, each followed by variables - Suggest
Always,Once, andOfffor the first argument ofMOM_forceandMOM_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
uplevelbodies 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
lappendarguments
[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>_definedglobal for parameters markedTOGGLE Off - Allow
INVALIDin the CDLCATEGORYgrammar
[2026.9.400] - 2026-09-11
Added
- Document-local TclOO method completion for
new/createinstances,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, anddict 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-debugextension is no longer needed nx-tclattach 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
incron variables that already exist andforeachloop variables
[2025.8.400] - 2025-08-15
Added
- Outline for DEF and CDL files
Fixed
- Duplicate
MOM_add_to_block_bufferentry renamed toMOM_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