Skip to content

xasc/t32-language-server

Repository files navigation

t32-language-server

Language server for the Lauterbach TRACE32® script language. It is available for Linux, Windows, macOS, and WebAssembly.

Table of Contents
  1. Features
  2. Usage
  3. Roadmap
  4. Packages
  5. Mirrors
  6. License
  7. Language server protocol support

Features

  • Go to definition for PRACTICE macros and subroutines.
  • Locates PRACTICE macros and file references across all scripts in a project.
  • Semantic tokens for improved syntax highlighting.
  • Code folding for PRACTICE blocks and comments.

Quick start

Dependencies

Builds require Rust version 1.95 or newer. These additional dependencies are required:

Installation

Using cargo

  1. Install Rust
  2. Install from crates.io:
    cargo install t32-language-server
    

VS Code & VSCodium

Install the extension "t32 Language Server" from

Check the extension's readme for additional setup instructions.

Precompiled binaries

Binary releases for Linux, Windows, macOS, and WebAssembly are available on the project's GitHub releases page.

Usage

Command line interface

t32ls [OPTIONS]

General options

  -h, --help
    Show this help message and exit.

  -c PID, --clientProcessId=PID
    Process ID of the client that started the server. The server can use the
    PID to monitor the client process and shut itself down if the client
    process dies. If the client process ID is not provided, set the value to 0
    to suppress the warning.

  -s DIR, --t32SystemDir=DIR
    System directory of your TRACE32 installation. The server will use this
    path to resolve the path prefix "~~" in script files. This prefix expands
    to the absolute path of the TRACE32 system directory, e.g. "C:\T32". It is
    commonly used to reference files from the subdirectory "demo" in the TRACE32
    system directory.

  -t LEVEL, --trace=LEVEL
    Set the initial logging level of the server's execution trace. LEVEL must
    be one of 'off,messages,verbose'.

  -T DIR, --t32TempDir=DIR
    Selected temporary directory of TRACE32. The server will use this path to
    resolve the path prefix "~~~" in script files. This prefix expands
    to the absolute path of the TRACE32 temporary directory, e.g. "/tmp".

  -V, --version
    Print version info and exit."

Example

t32ls --clientProcessId=42 -t messages

Roadmap

  1. Code Folds
  2. Support for autocompletions
  3. Hover and inlay hints

Packages

All packages are published from the GitHub mirror repository.

Registry Package Download
crates.io t32-language-server https://crates.io/api/v1/crates/t32-language-server/`major`.`minor`.`patch`/download
Visual Studio Marketplace t32 Language Server https://github.com/xasc/t32-language-server/releases/tag/v`major`.`minor`.`patch`
Open VSX Registry t32 Language Server https://github.com/xasc/t32-language-server/releases/tag/v`major`.`minor`.`patch`

Mirrors

This repository is mirrored to https://github.com/xasc/t32-language-server. The main repository is https://codeberg.org/xasc/t32-language-server.

License

Distributed under the European Union Public Licence version 1.2. REUSE is used for managing licensing information throughout the project. For more accurate licensing information, please check the individual files.

Language server protocol support

This language server implements version 3.18 of the language server protocol.

Lifecycle messages

Method Support status
initialize
initialized
client/registerCapability
client/unregisterCapability
$/setTrace
$/logTrace
shutdown
exit

Document synchronization

Method Support status
textDocument/didOpen
textDocument/didChange
textDocument/willSave
textDocument/willSaveWaitUntil
textDocument/didSave
textDocument/didClose
notebookDocument/didOpen
notebookDocument/didChange
notebookDocument/didSave
notebookDocument/didClose

Language features

Method Support status
textDocument/declaration
textDocument/definition
textDocument/implementation
textDocument/references
textDocument/prepareCallHierarchy
callHierarchy/incomingCalls
callHierarchy/outgoingCalls
textDocument/prepareTypeHierarchy
typeHierarchy/supertypes
typeHierarchy/subtypes
textDocument/documentHighlight
documentLink/resolve
textDocument/hover
textDocument/codeLens
codeLens/resolve
workspace/codeLens/refresh
textDocument/foldingRange
workspace/foldingRange/refresh
textDocument/selectionRange
textDocument/documentSymbol
textDocument/semanticTokens/full
textDocument/semanticTokens/full/delta
textDocument/semanticTokens/range
workspace/semanticTokens/refresh
textDocument/inlineValue
workspace/inlineValue/refresh
textDocument/inlayHint
inlayHint/resolve
workspace/inlayHint/refresh
textDocument/moniker
textDocument/completion
completionItem/resolve
textDocument/publishDiagnostics
textDocument/diagnostic
workspace/diagnostic
workspace/diagnostic/refresh
textDocument/signatureHelp
textDocument/codeAction
codeAction/resolve
textDocument/documentColor
textDocument/colorPresentation
textDocument/formatting
textDocument/rangeFormatting
textDocument/rangesFormatting
textDocument/onTypeFormatting
textDocument/rename
textDocument/prepareRename
textDocument/linkedEditingRange
textDocument/inlineCompletion

Workspace features

Method Support status
workspace/symbol
workspaceSymbol/resolve
workspace/configuration
workspace/didChangeConfiguration
workspace/workspaceFolders
workspace/didChangeWorkspaceFolders
workspace/willCreateFiles
workspace/didCreateFiles
workspace/willRenameFiles
workspace/didRenameFiles
workspace/willDeleteFiles
workspace/didDeleteFiles
workspace/didChangeWatchedFiles
workspace/executeCommand
workspace/applyEdit
workspace/textDocumentContent
workspace/textDocumentContent/refresh

Window features

Method Support status
window/showMessage
window/showMessageRequest
window/showDocument
window/logMessage
window/workDoneProgress/create
window/workDoneProgress/cancel
telemetry/event

About

Mirror of Language server for the Lauterbach TRACE32® script language

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages