neovim: add typst-preview plugin

This commit is contained in:
2026-03-31 22:02:29 +03:00
parent 9c1cff4e30
commit e2001b4fc9
4 changed files with 17 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ null_ls.setup({
null_formatting.gofmt, null_formatting.gofmt,
null_formatting.goimports, null_formatting.goimports,
null_formatting.shfmt, null_formatting.shfmt,
null_formatting.typstyle,
}, },
on_attach = function() on_attach = function()
local group = vim.api.nvim_create_augroup("NullLsLspFormatting", { clear = true }) local group = vim.api.nvim_create_augroup("NullLsLspFormatting", { clear = true })
@@ -59,7 +60,7 @@ vim.api.nvim_create_autocmd("LspAttach", {
vim.keymap.set("v", "<leader>.", vim.lsp.buf.range_code_action, opts) vim.keymap.set("v", "<leader>.", vim.lsp.buf.range_code_action, opts)
end end
local codelens_ignored_clients = { "yaml" } local codelens_ignored_clients = { "yaml", "tinymist" }
if if
client client

View File

@@ -73,3 +73,10 @@ vim.lsp.config.yaml = {
filetypes = { "yaml" }, filetypes = { "yaml" },
} }
vim.lsp.enable("yaml") vim.lsp.enable("yaml")
-- typst
vim.lsp.config.tinymist = {
cmd = { "tinymist", "lsp" },
filetypes = { "typst" },
}
vim.lsp.enable("tinymist")

View File

@@ -55,6 +55,10 @@ pack.add({
}, },
}) })
pack.add({
src = "chomosuke/typst-preview.nvim",
})
pack.add({ pack.add({
src = "catppuccin/nvim", src = "catppuccin/nvim",
name = "catppuccin", name = "catppuccin",

View File

@@ -97,6 +97,10 @@
"rev": "5255aa27c422de944791318024167ad5d40aad20", "rev": "5255aa27c422de944791318024167ad5d40aad20",
"src": "https://github.com/nvim-telescope/telescope.nvim" "src": "https://github.com/nvim-telescope/telescope.nvim"
}, },
"typst-preview.nvim": {
"rev": "87db18b8d19c8b0eed399f52e4c527ce5afe4817",
"src": "https://github.com/chomosuke/typst-preview.nvim"
},
"vim-fugitive": { "vim-fugitive": {
"rev": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0", "rev": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0",
"src": "https://github.com/tpope/vim-fugitive" "src": "https://github.com/tpope/vim-fugitive"