Skip to content
/ typstd Public

A plain and simple language server for Typst markup language.

License

Notifications You must be signed in to change notification settings

daskol/typstd

Repository files navigation

Typstd

Linting and testing

Overview

Typstd is a pretty simple language server for Typst markup language. Its distinctive feature is workspace management and completion for global objects which are defined out of scope of text document in focus (e.g. bibliography references).

Workspace

In order to determine entrypoints for compilation one can define typst.toml configuration file which enumerates targets for rendering.

[[document]]
name = "typstd"
version = "0.0.0"
entrypoint = "main.typ"
authors = ["Daniel Bershatsky <[email protected]>"]
license = "MIT"
description = "Plain and simple language server for Typst markup language."
repository = "https://github.com/daskol/typstd"
keywords = ["language-server", "languager-server-protocol", "lsp", "typst"]

Neovim

-- Default capabilities with `nvim-cmp` package.
local capabilities = require('cmp_nvim_lsp').default_capabilities()
lspconfig_configs['typstd'] = {
    default_config = {
        name = 'typstd',
        filetypes = { 'typst' },
        cmd = { 'typstd' },
        cmd_env = {},
        single_file_support = true,
        capabilities = capabilities,
    }
}

Telemetry

Tracing configuration can be adjusted either though CLI flags or with environment variable TYPSTD_LOG.

In compile time one should enable feature telemetry then run OpenTelemetry collector. Perhaps the easiest way to start collector is running it in docker container.

docker run -p 4317:4317 otel/opentelemetry-collector-dev:latest

About

A plain and simple language server for Typst markup language.

Topics

Resources

License

Stars

Watchers

Forks

Languages