Giter VIP home page Giter VIP logo

typst-lsp's Introduction

Typst LSP

A brand-new language server for Typst.

Features

  • Syntax highlighting, error reporting, code completion, and function signature help
  • Compiles to PDF on save (configurable to as-you-type, or can be disabled)

This repo consists of:

Near future goals

  • Improved preview (e.g. built-in PDF viewer, render to image for speed)
  • Support for more editors

Development guide

Prerequisites

Install:

  • Rust for the LSP itself
  • Rust Analyzer an extension for Rust LSP for VS Code
  • node for the VS Code extension; it may be easiest to install via fnm

First time setup

  1. Clone this repository locally
  2. Open it in VS Code; it's needed to run the extension
  3. In the addons/vscode subdirectory:
    1. Run npm install to install extension dependencies
    2. Run npm run compile to build the extension
  4. Run through the development cycle once to initialize and test everything
  5. (Optional: install the dev version of the extension): Press Ctrl+Shift+P, and choose Developer: Install Extension from Location... and choose the directory for the extension, addons/vscode/. There will not be any messages, but the extension can be found in the Extensions @installed list.

Development cycle

  1. Make any changes
  2. Run cargo install --path .; at present, the VS Code extension just invokes the typst-lsp command to start the LSP, and this command will compile and replace that binary with the latest version
    • If modifying the extension, keep npm run watch running, or npm run compile after changes
  3. Press Ctrl+F5 to launch the "Extension Development Host"; if it's already running, invoke "Developer: Reload Window" from the command palette in the Extension Development Host
  4. Within the Extension Development Host, the extension will be active and ready for testing

typst-lsp's People

Contributors

astrale-sharp avatar beeb avatar bramas avatar bristermitten avatar cgmossa avatar dependabot[bot] avatar dvdvgt avatar george-miao avatar georgehoneywood avatar jakobhellermann avatar laurmaedje avatar lvignoli avatar nvarner avatar nyabla avatar teddyhuang-00 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.