Commit Graph
100 Commits
Author SHA1 Message Date
Christoph 3f9091c713 ci: add test workflow to run Python and Node jobs
Add a Gitea workflow that runs on pull requests and pushes to main. It defines two jobs:
- Python: sets up Python 3.12, installs pytest, and runs language-server tests under server/tests/python_tests with PYTHONPATH=libs.
- Node: sets up Node 20, installs npm deps (root and client), runs extension tests (node --test test/) and builds the extension (npm run package).

Workflow file added at .gitea/workflows/tests.yml.
2026-09-25 08:15:30 +02:00
Christoph 5b027a2717 feat(def_flow): recognize .def names propagated via variables and wrapper procs
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.
2026-09-25 08:14:59 +02:00
Christoph 17fb79a346 feat(lsp): support completion item resolve to show .def previews
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.
2026-09-25 07:58:56 +02:00
Christoph 0a8e8a7368 test(completion_context): update test expectations and reflow formatting
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.
2026-09-24 23:05:49 +02:00
Christoph a393ca3aec feat(tools): add .def navigation helpers and tests
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.
2026-09-24 23:01:05 +02:00
Christoph 85a8684254 Update version to 2026.9.800 2026-09-24 20:57:15 +00:00
Christoph 513b1cb340 feat(def): add cross-file navigation and rename for PSC .def block templates and addresses
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.
2026-09-24 22:55:40 +02:00
Christoph 1d36b3bb77 feat(tcl_command_completion): add completions for MOM_do_template and enable/disable address
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.
2026-09-24 22:54:55 +02:00
Christoph 12e6d27331 Update version to 2026.9.701 2026-09-24 13:19:24 +00:00
Christoph e5c1ba1908 docs(changelog): add release notes through 2026.9.700
build_and_puplish.yml / build_and_publish (release) Successful in 30s
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.
2026-09-24 15:17:02 +02:00
Christoph 81fe58e023 docs: document DEF block templates, addresses, and formatting changes
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.
2026-09-24 14:34:23 +02:00
Christoph 4c1837c557 Update version to 2026.9.700 2026-09-24 12:28:41 +00:00
Christoph da9091fa38 feat: complete BLOCK_LIST/ADDR_LIST keywords and space comments
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.
2026-09-24 13:57:19 +02:00
Christoph 439c700226 Update version to 2026.9.600 2026-09-24 05:57:44 +00:00
Christoph 4f11ed7ecf chore(vscode): add Linux debug launch configurations and tasks, update lockfile 2026-09-24 07:53:15 +02:00
Christoph c1355970bf test(server): add tests for .def completions and uplevel formatting 2026-09-24 07:53:15 +02:00
Christoph 3167c18bea fix(server/debug): robust debugpy attach with bounded wait and tests update 2026-09-24 07:53:15 +02:00
Christoph 0666a87d15 feat(client/server): watch .def files in the client file watcher 2026-09-24 07:53:15 +02:00
Christoph ca7c23a0f6 feat(tools/parser): parse uplevel bodies for formatting and linting 2026-09-24 07:53:15 +02:00
Christoph 5d23df8da7 feat(server/lsp_server): include .def file changes and offer quoted def/variable completions 2026-09-24 07:53:15 +02:00
Christoph de310a6604 feat(tools/tcl_command_completion): support def symbols and value completions 2026-09-24 07:53:15 +02:00
Christoph abf32a5e50 feat(server/lsp_tclserver): index .def symbols and provide completion items 2026-09-24 07:53:15 +02:00
Christoph aa0780dd51 feat(tools/file_sourcing): read PSC DefinedEvents and expose .def resolution 2026-09-24 07:53:15 +02:00
Christoph b2656599b2 feat(tools/def_symbols): add parser for .def block templates and addresses 2026-09-24 07:53:15 +02:00
Christoph d9d619c1dc Update version to 2026.9.501 2026-09-21 19:14:25 +00:00
Christoph 5c3ebc4c82 Update version to 2026.9.500 2026-09-21 18:54:48 +00:00
Christoph 3762a01d40 Update version to 2026.9.400 2026-09-11 21:40:33 +00:00
Christoph c28836933c Update version to 2026.9.300 2026-09-10 08:31:25 +00:00
Christoph b7f28ab1a3 Update version to 2026.9.220 2026-09-08 19:22:31 +00:00
Christoph 82e13cf7ce fix(completion): scan nested commands in unfinished braced args
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
2026-09-08 21:16:58 +02:00
Christoph d104906508 Update version to 2026.9.210 2026-09-04 11:46:55 +00:00
Christoph 844138b383 Update version to 2026.9.200
build_and_puplish.yml / build_and_publish (release) Canceled after 33s
2026-09-03 08:39:22 +00:00
Christoph 081b488fe3 Update version to 2026.9.100 2026-09-03 07:38:12 +00:00
Christoph 52b81b3dcf Update version to 2026.8.300 2026-08-28 20:42:34 +00:00
Christoph 07ccd2d26a Update version to 2026.8.200 2026-08-19 11:51:21 +00:00
Christoph 61d4785775 Update version to 2026.8.100 2026-08-19 07:47:31 +00:00
Christoph 4ca1b0cce9 Update version to 2026.6.201 2026-06-22 06:50:56 +00:00
Christoph 5d1c402d2a Update version to 2026.6.200 2026-06-22 06:34:00 +00:00
Christoph 67bd9de18a Update version to 2026.6.100 2026-06-18 19:03:03 +00:00
Christoph 8b39c4d250 Update version to 2026.6.100 2026-06-18 18:41:28 +00:00
Christoph 91ce762570 Update version to 2025.9.200 2025-09-01 13:24:13 +00:00
Christoph 377bddf579 feat: use uv instead of pip 2025-08-16 22:22:28 +02:00
Christoph cdc1cb4805 Update version to 2025.9.100 2025-08-16 16:35:58 +00:00
Christoph dcf447ed4f Merge branch 'relicense-agpl3' 2025-08-16 11:33:32 +02:00
Christoph 783a9aa7d7 Relicense to AGPL-3.0-or-later 2025-08-16 11:29:09 +02:00
Christoph 72906a1930 Update version to 2025.8.400 2025-08-15 07:34:53 +00:00
Christoph 7fdafe484e Update version to 2025.8.300 2025-08-12 11:26:06 +00:00
Christoph 98a0b2197d Update version to 2025.8.202 2025-08-12 09:38:34 +00:00
Christoph 0ed1e887fc Update version to 2025.9.100 2025-08-12 07:21:23 +00:00
Christoph f24b280edf mod: Keywords 2025-08-11 22:06:49 +02:00
Christoph b61cff3b3b Update version to 2025.9.4 2025-08-11 19:46:20 +00:00
Christoph cf62044d3e Update version to 2025.8.201 2025-08-11 19:37:32 +00:00
Christoph feba88212f fix: some highlight error
/ build_and_publish (release) Successful in 29s
2025-08-11 21:36:04 +02:00
Christoph aeebb5c964 fix: some highlight error
/ build_and_publish (release) Successful in 38s
2025-08-11 21:35:14 +02:00
Christoph b141818251 Update version to 2025.9.3 2025-08-11 16:41:00 +00:00
Christoph b3cac5c292 Update version to 2025.9.2 2025-08-11 15:20:46 +00:00
Christoph b059a75205 Update version to 2025.9.001 2025-08-11 14:24:17 +00:00
Christoph f55c3ba904 Update version to 2025.8.200 2025-08-09 12:09:07 +00:00
Christoph cb430a5553 Update version to 2025.8.2
/ build_and_publish (release) Successful in 33s
2025-08-09 12:06:50 +00:00
Christoph 637a28ad82 Update version to 2025.08.1
/ build_and_publish (release) Successful in 43s
2025-08-09 11:57:08 +00:00
Christoph 9b373e85b7 Update version to 2025.08.101 2025-08-07 05:35:45 +00:00
Christoph 6541830ef6 Update version to 2025.8.100 2025-08-06 20:10:08 +00:00
Christoph 509b13e99f add icon
/ build_and_publish (release) Successful in 46s
2025-08-06 22:08:39 +02:00
Christoph 396cfdc4ec Update version to 0.5.0 2025-08-06 18:22:29 +00:00
Christoph ccd22e4343 Update .gitea/workflows/build_and_puplish.yml
/ build_and_publish (release) Successful in 41s
2025-08-06 18:21:06 +00:00
Christoph 029eaebd57 Update version to 0.5.0-beta.1 2025-08-06 18:13:14 +00:00
Christoph 8be9aae05d update pipline 2025-08-06 20:09:15 +02:00
Christoph f5c61267e3 read all procs from psc file 2025-08-05 21:45:22 +02:00
Christoph 1abf89fe56 load all files for completion 2025-08-04 21:11:20 +02:00
Christoph d22d897d23 Update version to 0.4.14 2025-08-04 12:52:21 +00:00
Christoph 35d0f20fba Update version to 0.4.13 2025-08-04 11:33:48 +00:00
Christoph 6cde05b786 Update version to 0.4.13 2025-08-04 10:59:08 +00:00
Christoph 528c7a6b9e add more ignore files 2025-08-03 21:54:45 +02:00
Christoph f0ed8ac708 Update version to 0.5.0 2025-08-03 19:44:23 +00:00
Christoph 5124c12bc6 Update version to 0.4.12 2025-08-03 19:30:13 +00:00
Christoph f762c42e00 test new pipline 2025-08-03 21:27:09 +02:00
Christoph 4ccdf9e9f3 Update version to 0.4.11 2025-08-03 19:09:05 +00:00
Christoph 0318532308 add some features 2025-08-03 21:04:14 +02:00
Christoph fed8b84b46 add more semantic tokens 2025-07-30 22:10:27 +02:00
Christoph d99d7c6bf6 Update version to 0.4.10 2025-07-28 20:19:47 +00:00
Christoph 4d79f268b8 add linter 2025-07-27 22:11:16 +02:00
Christoph c6f0758b97 use tclint as parser / formatter 2025-07-27 17:55:48 +02:00
Christoph 666c537f07 add tclint 2025-07-24 21:31:08 +02:00
Christoph 7984b1648c Update version to 0.4.9 2025-07-22 05:25:58 +00:00
Christoph 250ec0c227 Update version to 0.4.8 2025-07-21 20:23:10 +00:00
Christoph 3fbe4f9243 add more functions 2025-07-21 22:19:49 +02:00
Christoph 5a020f7d07 Merge branch 'tcl_language_support' of https://git.cbsk-tech.de/Christoph/nx_post_support into tcl_language_support 2025-07-21 21:31:06 +02:00
Christoph cf6a39b51d add hover function 2025-07-21 21:31:04 +02:00
Christoph 4ef697190a Update version to 0.4.7
/ build_and_publish (push) Has been cancelled
2025-07-21 07:13:58 +00:00
Christoph 61fb0bc5d2 Update version to 0.4.6 2025-07-21 05:39:02 +00:00
Christoph 632fc32c3e Update version to 0.4.5 2025-07-21 05:16:43 +00:00
Christoph e84a08e22b Update version to 0.4.4 2025-07-21 04:53:41 +00:00
Christoph 65732ffac8 Update version to 0.4.3 2025-07-21 04:42:13 +00:00
Christoph 4e62883347 Update version to 0.4.2 2025-07-21 04:30:08 +00:00
Christoph ff3059421f Update version to 0.4.1
/ build_and_publish (push) Successful in 34s
2025-07-20 19:14:01 +00:00
Christoph 2a33639619 add configs to extension 2025-07-20 21:10:54 +02:00
Christoph 06069ce954 Update version to 0.4.0 2025-07-20 15:21:29 +00:00
Christoph 31cb644f85 del tokens 2025-07-20 17:17:38 +02:00
Christoph 9db2f0f7ac update pipline 2025-07-20 12:08:14 +02:00
Christoph 7c8634b971 update formatter 2025-07-20 11:53:40 +02:00