fix(typst)!: remove the outdated .vim plugin; configure treesitter - #1761
Conversation
the outdated plugin (kaarmu/typst.vim) bricks some formatting provided by the LSP (tinymist)
Review ChecklistDoes this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist: Proper conventional commit scoping:
|
|
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
#let project() = {
// cursor here [9 space chars]
}expectedby 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]
} |
|
I made it a breaking change since that plugin did offer some extra functionality that might "break" people's workflow. |
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