OBS: Work In Progress
(Neo)vim plugin for Typst.
I am applying the 80/20 rule in this project since I prefer to have something now rather than waiting for everthing later.
Editing typst-palette in Vim with the gruvbox colorscheme
Existing
- Vim syntax highlighting.
- Compile the active document with
:make
.
Possible features
- Formatting using this?
- Even better highlighting for neovim using treesitter?
Do you miss anything from other packages, e.g. vimtex
, create an issue
and I'll probably add it!
require('packer').startup(function(use)
use {'kaarmu/typst.vim', ft = {'typst'}}
end)
- Restart neovim to reload config
- Call
:PackerSync
return {
'kaarmu/typst.vim',
ft = 'typst',
lazy=false,
}
call plug#begin('~/.vim/plugged')
Plug 'kaarmu/typst.vim'
call plug#end()
- Restart (neo)vim to reload config
- Call
:PlugInstall
g:typst_cmd
- Specifies the location of the Typst executable. Defaults to "typst"
.
:TypstWatch
- Watches your document and recompiles on change; also opens the document with your default pdf viewer.
If you are using neovim
you can install typst-lsp.
There exist a server configuration in nvim-lspconfig
so it should be easy to set it up. The
config currently requires that you're working in a git repo. Once the neovim+LSP recognizes
the file the LSP will compile your document while you write (almost like a wysiwyg!).