Code Monkey home page Code Monkey logo

typst-companion's Introduction

Typst Companion

A VS Code extension that adds Markdown-like editing niceties on top of and in addition to to Nathan Varner's Typst LSP.

Features

  • Intuitive handling of Ordered and Unordered lists in .typ files.
    • Enter while in a list context (either ordered or unordered) continues the existing list at the current level of indentation (with correct numbering, if ordered).
    • Tab and Shift+Tab while in a list context (either ordered or unordered) indents and out-dents bullets intuitively (and re-numbers ordered lists if appropriate).
    • Reordering lines inside an ordered list automatically updates the list numbers accordingly.
  • Keyboard Shortcuts for:
    • Toggle Bold, Italics, and Underline (ctrl/cmd + b|i|u)
    • Increase and decrease header level (ctrl/cmd + shift + ]|[)

Requirements

I strongly encourage installing Nathan Varner's Typst LSP in addition to this extension for syntax highlighting, error reporting, code completion, and all of Typst LSP's other features. This extension just adds some small additional features that I missed when using Typst LSP.

Release Notes

0.0.3

  • Added toggle Bold with ctrl/cmd + b.
  • Added toggle Italic with ctrl/cmd + i.
  • Added toggle Underline with ctrl/cmd + u.
  • Added increase/decrease Header level with ctrl/cmd + shift + ] and ctrl/cmd + shift + ], respectively.
  • Added 'Typst Companion: Toggle List' command to command palette.

For previous versions, see the CHANGELOG on GitHub.

Prior Art

The core logic of this extension is adapted, with attribution and gratitude, from Markdown All-in-One, under the following license:

MIT License, Copyright (c) 2017 张宇

typst-companion's People

Contributors

cfiggers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

typst-companion's Issues

Fine-tuning to Markdown List behavior

Currently, Enter while in an empty, indented bullet clears the bullet and moves down to the next level. Intuitively, it should outdent the bullet.

Currently, Tab while in the middle of typing in a bullet inserts a tab. Intuitively, it should indent the whole bullet.

Handle Multi-line selections for Bold and Italicize keyboard shortcuts

Currently, Ctrl+b and Ctrl+i simply surround the current selection with * and _, respectively. However, this does not work when multiple lines are selected. Instead, each line should independently have * or _ added to the beginning and end. E.g.:

// Before:

Multiple
Lines

// Current After Ctrl+B with both lines selected

*Multiple
Lines*

// Desired After Ctrl+B with both lines selected

*Multiple*
*Lines*

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.