Skip to content

fix(typst)!: remove the outdated .vim plugin; configure treesitter - #1761

Merged
azdanov merged 1 commit into
AstroNvim:mainfrom
monoid-kitty:main
Apr 30, 2026
Merged

fix(typst)!: remove the outdated .vim plugin; configure treesitter#1761
azdanov merged 1 commit into
AstroNvim:mainfrom
monoid-kitty:main

Conversation

@monoid-kitty

Copy link
Copy Markdown
Contributor

the outdated plugin (kaarmu/typst.vim) bricks some formatting provided by the LSP (tinymist)

📑 Description

Not only is there no need to use workaround code highlighting provided by the said plugin (there is Treesitter now!) and other its features (because a proper LSP does most of it), but also the old plugin somehow broke formatting provided by the LSP for me.

📖 Additional Information

the outdated plugin (kaarmu/typst.vim) bricks some formatting provided by the LSP (tinymist)
@github-actions

github-actions Bot commented Apr 27, 2026

Copy link
Copy Markdown

Review Checklist

Does this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist:

Proper conventional commit scoping:

  • If you are adding a new plugin, the scope would be the name of the category it is being added into. ex. feat(utility): added noice.nvim plugin

  • If you are modifying a pre-existing plugin or pack, the scope would be the name of the plugin folder. ex. fix(noice-nvim): fix LSP handler error

  • Pull request title has the appropriate conventional commit type and scope where the scope is the name of the pre-existing directory in the project as described above

  • README is properly formatted and uses fenced in links with <url> unless they are inside a [title](url)

  • Entry returns a single plugin spec with the new plugin as the only top level spec (not applicable for recipes or packs).

  • Proper usage of opts table rather than setting things up with the config function.

  • Proper usage of specs table for all specs that are not dependencies of a given plugin (not applicable for recipes or packs).

@monoid-kitty

monoid-kitty commented Apr 27, 2026

Copy link
Copy Markdown
Contributor Author

if anyone want to see what behavior it fixes:

repro.lua

-- save as repro.lua
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs { "config", "data", "state", "runtime", "cache" } do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  -- stylua: ignore
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)

-- install plugins
local plugins = {
  { "AstroNvim/AstroNvim", version = "^5", import = "astronvim.plugins" },
  { "AstroNvim/astrocommunity", version = "^20", { import = "astrocommunity.pack.typst" } },

  -- add any other plugins/customizations here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

-- add anything else here (autocommands, vim.filetype, etc.)

how to reproduce

  1. nvim -u repro.lua main.typ
  2. type #let project() = { (the closing bracket will be auto-completed, and press enter, so that it looks like this:
#let project() = {
         // cursor here [9 space chars]
}

expected

by default (and I've tried to set this manually) the LSP (tinymist) uses 2 spaces for indending. but neovim forces me to use 9

after the said changes it becomes:

#let project() = {
  // cursor here [2 space chars]
}

Comment thread lua/astrocommunity/pack/typst/init.lua
@azdanov azdanov changed the title fix(typst): remove the outdated .vim plugin; configure treesitter fix(typst)!: remove the outdated .vim plugin; configure treesitter Apr 28, 2026
@azdanov

azdanov commented Apr 28, 2026

Copy link
Copy Markdown
Member

I made it a breaking change since that plugin did offer some extra functionality that might "break" people's workflow.

@azdanov
azdanov merged commit 3bcb278 into AstroNvim:main Apr 30, 2026
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants