Commit Graph
99 Commits
Author SHA1 Message Date
Christoph Brandau 757b885f28 feat(server): index PSC scripts and provide cross-file TclOO navigation/completions
Add PSC (.psc) indexing and share TclOO class metadata across files so class
definitions discovered via PSC layers can be used for completions, signature
help, inlay hints, and "go to definition". Key behavior changes:

- Client file watcher now includes *.psc and .vscode launch paths/tests updated
  to use the postprocessor test folder; .gitignore updated to ignore that folder.
- Server watches .psc changes and refreshes a PSC script index; new
  tools/tcloo_navigation.py exposes tcloo_definition used by the language server
  to resolve cross-file class/constructor/method definitions.
- Language server uses class_snapshot(document.path) when producing TclOO
  completions, signature help, and inlay hints so resolved class metadata is
  available across files.

Also includes related docs/changelog updates, minor code formatting cleanups,
and added tests for PSC/TclOO behavior.
2026-09-21 20:47:51 +02:00
Christoph Brandau f88a50d4ab feat(tcloo): add document-local TclOO completions, signature help and hints
Add conservative, document-local TclOO type inference and tooling so the server
can offer method completions, signature help, and inlay parameter hints for
statically resolvable TclOO receivers (including `new`/`create`, `my`, and
simple return-chains). Also surface class names as completion items and emit
semantic tokens for class declarations/references.

Notable changes:
- New tcloo_* tools: completion, symbols, and argument parsing; integrated into
  on_completion, signature_help, inlay hint generation and semantic token
  highlighting. Completions are returned early when an OO receiver context is
  detected.
- Use a completion-friendly parser fallback when the main AST fails (TclSyntaxError)
  so editing-in-progress code still yields useful completions.
- Add CompletionItemKind.Class to command kinds, exclude class items from the
  poco completion name cache, and include new unit tests for the TclOO helpers.
2026-09-11 23:38:42 +02:00
Christoph Brandau d8611d7aea feat(tcl): add static variable name extraction and array key completion
This adds tooling to statically extract Tcl variable names from syntax
trees without evaluating substitutions, enabling better completions
for array elements and plain variables. The new helpers are wired
into the completion and navigation flows and are supported by tests
covering array keys and substitutions.

- Introduce variable_names.py with variable_name() and array_key_parts()
- Wire static name extraction into completion and symbol indexing
- Add tests for array key completion with substitutions
2026-09-10 09:07:18 +02:00
Christoph Brandau 7e9a4359cd feat(cdl): include args in generated event handler snippet
The generated event handler snippet now declares the proc with an args block.
This enables parameters to be referenced within the handler body.
The change makes the snippet compatible with events that pass arguments.

- Include an args block in the proc declaration for event handlers.
2026-09-10 08:45:25 +02:00
Christoph Brandau 26225eb8ed feat(syntax): add escaped-quoted-strings token to def syntax
Introduces an escaped-quoted-strings pattern for the def syntax.
It enables proper highlighting of strings with escapes and vars.
The change adds the new pattern to the syntax and fixes the EOF newline.

- Adds escaped-quoted-strings for escapes and embedded vars
- Registers new pattern in repository for proper highlighting
- Ensures trailing newline in the file
2026-09-04 08:39:46 +02:00
Christoph Brandau af5acfc946 feat(tcl): add dynamic argument completion and snippets
The changes add dynamic, semantic argument completion for Tcl
commands and snippet support.

- Introduces DynamicCompletionKind, TclArgumentCompletion, and dynamic rules
  for Tcl to provide variable, procedure, namespace, and path suggestions.
- Adds snippet-backed commands and arguments for Tcl blocks and paths.
- Refactors tcl_argument_completion and updates the LSP to use dynamic path,
  variable, and namespace completions with snippet kinds.
2026-09-03 10:35:39 +02:00
Christoph Brandau 20f76b6a20 feat(lsp): add Tcl command-aware completion and integration
- Introduced a Tcl command-aware completion engine and wired to LSP.
- Added a new module with Tcl commands, options, and contextual matching.
- Updated completion to favor command-aware items and args.
2026-09-03 10:17:16 +02:00
Christoph Brandau 89add18273 feat(lsp): add context-aware completion ranking and document highlights
Adds context-aware completion ranking and document highlights for Tcl.
Adds completion_context to distinguish variables and commands.
Wires per-file completion snapshots and ranking into the flow.
Adds document_highlight provider support and tests for highlights.

- Context-aware ranking of completion items using per-file snapshots
- Document highlight provider wired into initialization and tests
- Tests for completion context, ranking, and document highlights
2026-09-03 09:19:50 +02:00
Christoph Brandau 41d117fe2c feat(lsp): add call hierarchy support for TCL and MOM
Adds LSP call hierarchy support for TCL procedures and MOM events.
A symbol index and identity logic underpin incoming and outgoing calls.
LSP call hierarchy features are wired and changelog/README updated.

- Implement data encoding for call hierarchy items and identity restoration
- Wire LSP server to expose prepare_call_hierarchy, incoming_calls, and outgoing_calls
- Add tests for cross-file calls and edge cases
2026-09-03 08:52:03 +02:00
Christoph Brandau 53ebc5d055 chore(lsprotocol): migrate to 2025.0.0 and cleanup artifacts
The changes align the project with the 2025.0.0 lsprotocol
release, removing the old backport and updating type hints
in the protocol hooks to use Sequence where appropriate. The
dist-info and packaging metadata for older lsprotocol
versions are replaced with the new 2025.0.0 artifacts.

- Remove exceptiongroup backport used on Python <3.11
- Use Sequence instead of List in LS protocol hooks
- Replace old dist-info with 2025.0.0 metadata
2026-09-03 08:39:12 +02:00
Christoph Brandau a0a0d38fe5 docs(readme): remove development/debugging section and license note
This change removes outdated development and debugging guidance
from the README and streamlines the licensing note. It also deletes
the embedded debugger license file and relies on the main LICENSE
file for terms.

- Remove outdated debugging guidance from README
- Delete embedded debugger license file and rely on LICENSE
2026-09-03 07:49:10 +02:00
Christoph Brandau c3d5116885 feat(debugger): integrate NX Tcl Remote Debugger into NX Postprocessor
build_and_puplish.yml / build_and_publish (release) Successful in 35s
Embed the NX Tcl Remote Debugger into the NX Postprocessor extension.
Add a new debugging client, protocol, and adapter logic to
drive attach/launch, breakpoints, stepping, and evaluation
via the runtime adapter.

- Introduced a client debugger with a new adapter and protocol
- Wired attach/launch, breakpoints, stepping, and evaluation
- Updated docs and licensing to reflect the embedded debugger
2026-08-28 22:36:18 +02:00
Christoph Brandau af195a577b refactor(lsp): cache analysis results and debounce diagnostics
build_and_puplish.yml / build_and_publish (release) Successful in 29s
This change adds cached and incremental analysis for the LSP
server to improve responsiveness. The client now debounces
diagnostic updates to avoid excessive recomputation. The
server introduces per-document line caches and various
caches for completions, inlay hints, and metadata to
support faster, incremental updates.

- Debounce diagnostics on text changes to reduce noise.
- Add caches for completions, inlay hints, and metadata.
- Introduce incremental analysis with per-document line caches.
2026-08-19 13:41:53 +02:00
Christoph Brandau ecb50be2b8 feat(inlay-hints): add configurable parameter name hints
Adds configurable inlay hints for TCL procedures and merges signatures from built-ins and workspace files. The feature supports parameterNames and suppressWhenArgumentMatchesName and respects an optional range filter and current-file priority.

- Introduces built-in and custom inlay hint builders
- Honors inlayHints parameterNames and suppression options
- Adds tests validating hints, ranges, and priority rules
2026-08-19 12:59:51 +02:00
Christoph Brandau 541704f45a feat(cdl): add CDL event handler parsing and snippet support
build_and_puplish.yml / build_and_publish (release) Successful in 36s
This adds a small DSL-aware helper to extract CDL event
declarations and generate a ready-to-use snippet. It also
extends hover support to show the snippet and parameter
hints for CDL events, improving developer productivity.

- Generate a MOM event handler scaffold and local vars
- Hover shows the generated snippet and mom_ parameter hints
2026-08-19 09:45:57 +02:00
Christoph Brandau 33cf282b0a feat(debug): enable Python debug workflow and debug server integration
Adds an end-to-end Python debug workflow for the extension.
Includes a new prepare-debug.ps1 script and a VS Code task.
Extends the Python server and extension to coordinate a debug session and safe startup.

- Add prepare-debug.ps1 and a VS Code task to build the debug bundle
- Enable Python debug wiring in the server and tests
- Ensure a single stable Python debug session during startup
2026-08-17 11:02:22 +02:00
Christoph Brandau 35a4357551 feat(navigation): add symbol index and LSP navigation features
The changes introduce a Tcl symbol index powering LSP navigation
features across the workspace. A navigation API exposes
snapshots and update hooks, enabling goto-definition,
references, and rename using the index. Background indexing
now watches Tcl files and rebuilds the index to stay in sync.

- Add Tcl symbol index and navigation snapshot API
- Wire go-to-definition, references, and rename using the index
- Watch Tcl files and refresh the index in the background
2026-08-17 09:24:45 +02:00
Christoph Brandau f5bd79f067 feat(lsp): add incremental indexing and file ops support
Adds a thread-safe incremental index and snapshot API for LSP.
Introduces cache invalidation and file operation hooks for delete
and rename. This keeps indices in sync with disk changes.
Supports reindexing TCL files from disk when needed.

- Adds workspace file change handlers to sync indices on delete/rename.
- Introduces locking and snapshot helpers to safely access shared state.
- Refactors to invalidate caches on edits and reindex TCL files.
2026-08-17 08:45:09 +02:00
Christoph Brandau a39aee1b9d feat(server): add TCL signature help support
Adds a signature help system for TCL commands.
The LSP server now exposes signature help for custom and
built-in MOM procedures, enabling parameter hints while editing.
Tests and documentation were added to cover common usage.

- Adds signature_help module to parse and present signatures
- Integrates with LSP server to provide signature help on the client
- Adds tests for custom and built-in procedures
2026-08-17 08:31:15 +02:00
Christoph Brandau dfe15dd3db Fix single-line brace formatting to preserve internal whitespace
The formatter now calculates and passes explicit leading and trailing whitespace around expression content to the `_brace` method. This ensures correct rendering of single-line expressions that include braces.
2026-06-22 08:49:22 +02:00
Christoph Brandau 3b233389c8 Fix Tcl formatting bug by adjusting formatter options 2026-06-22 08:29:48 +02:00
Christoph Brandau f60c4563e4 Delegate TCL folding to server, fix bugs, and enhance stability
- Move TCL folding range computation from client to language server, avoiding duplicate regions.
- Serialize language server restarts to prevent multiple server instances running concurrently.
- Pin server-side Python dependencies to specific minor versions for improved stability and predictability.
- Make debug server connection non-fatal, allowing the language server to start even if the debugger isn't attached.
- Optimize semantic token generation by caching Tclint plugin commands.
2026-06-18 20:38:47 +02:00
Christoph Brandau 3ad3847045 add new features and fix bugs 2026-06-18 17:31:51 +02:00
Christoph Brandau 41f331d4c4 add updates libs 2026-06-18 17:21:58 +02:00
Christoph Brandau af8cd58fda Merge branch 'main' of https://git.cbsk-tech.de/Christoph/nx_post_support 2025-08-15 13:13:15 +02:00
Christoph Brandau df0f3d7a61 add description 2025-08-15 13:12:41 +02:00
Christoph Brandau bd4b17825c add: Outline support for DEF and CDL files 2025-08-15 07:29:01 +02:00
Christoph Brandau 5d6182e91f double value MOM_add_to_block_buffer rename to MOM_add_to_line_buffer 2025-08-15 07:18:38 +02:00
Christoph Brandau 63e9c429bd update ReadMe 2025-08-14 07:57:40 +02:00
Christoph Brandau 5cba6763f1 Merge branch 'new_features'
/ build_and_publish (release) Successful in 36s
2025-08-12 13:21:27 +02:00
Christoph Brandau e20bb85ac6 fix: wrong highligthing 2025-08-12 13:18:08 +02:00
Christoph Brandau 579847b56d fix formatter
/ build_and_publish (release) Successful in 33s
2025-08-12 11:35:54 +02:00
Christoph Brandau 618d6b478b fix: formatter when \ was deleting 2025-08-12 11:28:10 +02:00
Christoph Brandau 480978d6bb Merge branch 'new_features' of https://git.cbsk-tech.de/Christoph/nx_post_support into new_features
/ build_and_publish (release) Failing after 31s
2025-08-12 11:27:20 +02:00
Christoph Brandau 04798328bd fix: formatter 2025-08-12 11:27:14 +02:00
Christoph Brandau ae835089b6 fix: formatter when \ was deleting 2025-08-12 11:26:52 +02:00
Christoph Brandau 12b7b62aa5 add variable indexing keep track of postion
/ build_and_publish (release) Successful in 39s
2025-08-12 09:07:04 +02:00
Christoph Brandau 7263b6f530 optimze Server 2025-08-12 07:48:05 +02:00
Christoph Brandau c0635e48ea Merge branch 'new_features' of https://git.cbsk-tech.de/Christoph/nx_post_support into new_features 2025-08-12 07:15:21 +02:00
Christoph Brandau 8fb98d2f40 refacxtor the code 2025-08-12 07:15:18 +02:00
Christoph Brandau 72f894b05d add goto
/ build_and_publish (release) Successful in 31s
2025-08-11 18:40:06 +02:00
Christoph Brandau 0a26cb5c0f add outline to lsp 2025-08-11 18:28:23 +02:00
Christoph Brandau ef558c3aa3 update pipline
/ build_and_publish (release) Successful in 28s
2025-08-11 17:19:47 +02:00
Christoph Brandau 9d5ef23162 update pipline
/ build_and_publish (release) Failing after 26s
2025-08-11 17:16:27 +02:00
Christoph Brandau c25bf79427 update pipline
/ build_and_publish (release) Failing after 32s
2025-08-11 17:00:14 +02:00
Christoph Brandau 2c2579319d update hover feature
/ build_and_publish (release) Failing after 27s
2025-08-11 16:20:14 +02:00
Christoph Brandau b38fab1428 Merge branch 'new_features' of https://git.cbsk-tech.de/Christoph/nx_post_support into new_features 2025-08-11 16:05:58 +02:00
Christoph Brandau bc745622b9 add first proc doc 2025-08-11 15:59:09 +02:00
Christoph Brandau 0bb4ef731e add first proc doc 2025-08-11 10:15:58 +02:00
Christoph Brandau 31ccae9a40 update 2025-08-08 09:18:22 +02:00
Christoph Brandau 793b35f39f Merge branch 'tcl_language_support' of https://git.cbsk-tech.de/Christoph/nx_post_support into tcl_language_support 2025-08-07 07:27:09 +02:00
Christoph Brandau 3780fc27dc mod Readme 2025-08-07 07:27:08 +02:00
Christoph Brandau 6bded783a1 add functions to completion 2025-08-06 15:26:53 +02:00
Christoph Brandau b680c01989 update file sourcing 2025-08-05 18:18:17 +02:00
Christoph Brandau 6a051a6dee del test file 2025-08-04 16:06:50 +02:00
Christoph Brandau 72be83c282 fix wired namspace call in poco 2025-08-04 14:51:07 +02:00
Christoph Brandau fa5ea00384 add test cases 2025-08-04 14:11:55 +02:00
Christoph Brandau 3613391c23 fix semantics with var in array 2025-08-04 12:57:01 +02:00
Christoph Brandau 894a5b8b52 add more test cases 2025-08-04 12:48:21 +02:00
Christoph Brandau c644ac9bd3 add changes from tclint 2025-08-04 12:48:02 +02:00
Christoph Brandau fd5b1f2e71 add poco replace plugin 2025-08-04 12:47:49 +02:00
Christoph Brandau 57c65221d3 add LIB_GE_command_buffer_edit_replace to plugins 2025-08-04 09:17:30 +02:00
Christoph Brandau 5e2e85830b update 2025-08-01 13:35:02 +02:00
Christoph Brandau 98e2d104a8 update lsp_server 2025-07-31 16:19:09 +02:00
Christoph Brandau 44fd772151 Merge branch 'tcl_language_support' of https://git.cbsk-tech.de/Christoph/nx_post_support into tcl_language_support 2025-07-31 09:38:10 +02:00
Christoph Brandau d90f9b5425 adjsut completion Items 2025-07-31 09:38:02 +02:00
Christoph Brandau ed045aa459 update completion items 2025-07-30 17:28:18 +02:00
Christoph Brandau 8da61abfce Merge branch 'main' into tcl_language_support 2025-07-28 22:23:08 +02:00
Christoph Brandau 0ea2cbec87 add noxfile.py 2025-07-28 22:21:49 +02:00
Christoph Brandau 9a56aca6ef modify linter / checks 2025-07-28 22:15:19 +02:00
Christoph Brandau c34dac847a update parser 2025-07-25 16:02:39 +02:00
Christoph Brandau 94181497bd fix item list 2025-07-25 12:19:38 +02:00
Christoph Brandau d391b5dd79 add more items 2025-07-25 11:40:09 +02:00
Christoph Brandau e842d9d74e update completion list 2025-07-24 17:16:38 +02:00
Christoph Brandau c9a07ae1b9 use tclint 2025-07-23 17:12:24 +02:00
Christoph Brandau 64fa802cd6 update parser 2025-07-22 18:41:20 +02:00
Christoph Brandau 16608cb994 add more items 2025-07-22 07:21:47 +02:00
Christoph Brandau b264f20baf update settings 2025-07-21 16:20:16 +02:00
Christoph Brandau 52a2b2f774 fix formatter 2025-07-21 09:12:36 +02:00
Christoph Brandau ee5240c861 add formatter settings 2025-07-21 09:08:53 +02:00
Christoph Brandau a6f616a89d fix buffer @ in formatter 2025-07-21 07:37:31 +02:00
Christoph Brandau 1b6b25c137 fix formatter for buffers 2025-07-21 07:15:27 +02:00
Christoph Brandau b17a4f8ba0 fix the formatter 2025-07-21 06:52:20 +02:00
Christoph Brandau 18f635df92 fix formatting 2025-07-21 06:28:58 +02:00
Christoph Brandau c38fedd897 add lark 2025-07-18 18:03:12 +02:00
Christoph Brandau f482c8db87 update tcl standard 2025-07-17 15:01:02 +02:00
Christoph Brandau 9390ad4569 add vars and function for completion 2025-07-17 14:36:33 +02:00
Christoph Brandau 99718eb856 python lsp 2025-07-16 17:14:09 +02:00
Christoph Brandau 12ed7ff2bc update to lsp for TCL 2025-07-15 16:37:40 +02:00
Christoph Brandau d76cd7559a add outline funton for tcl
/ build_and_publish (push) Successful in 33s
2025-07-01 15:39:49 +02:00
Christoph Brandau 40f6f41667 update cdl/def diagnostic 2025-01-13 13:05:10 +01:00
Christoph Brandau 5c41b8fa0a implement tcl 2025-01-10 16:44:50 +01:00
Christoph Brandau 3ce2ad902b first try 2025-01-10 08:06:42 +01:00
Christoph Brandau 11af66a267 handle def file formatter 2025-01-10 07:44:48 +01:00
Christoph Brandau a318cf6e46 add Hover feature
/ build_and_publish (push) Failing after 19s
2025-01-08 15:53:19 +01:00
Christoph Brandau 793effd85d update workflow
/ build_and_publish (push) Successful in 17s
2025-01-08 11:35:45 +01:00
Christoph Brandau 202c401062 update workflow
/ build_and_publish (push) Failing after 18s
2025-01-08 11:23:59 +01:00
Christoph Brandau 8c1b614d20 change for release 2025-01-07 18:16:05 +01:00
Christoph Brandau 09d1685aa9 init project 2025-01-07 10:22:59 +01:00