feat(typst): use builtin lsp formatter

This commit is contained in:
Vo Quang Chien 2024-10-29 08:31:02 +07:00
parent f498290e11
commit 837ed57745

View file

@ -12,46 +12,22 @@ return {
}, },
}, },
{
"williamboman/mason.nvim",
opts = {
ensure_installed = { "typstyle" },
},
},
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
opts = { opts = {
servers = { servers = {
tinymist = {}, tinymist = {
settings = {
formatterMode = "typstyle",
}, },
}, },
}, },
{
"stevearc/conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
typst = { "typstyle" },
}, },
}, },
},
{
"nvimtools/none-ls.nvim",
optional = true,
opts = function(_, opts)
local nls = require("null-ls")
opts.sources = vim.list_extend(opts.sources or {}, {
nls.builtins.formatting.typstyle,
})
end,
},
{ {
"chomosuke/typst-preview.nvim", "chomosuke/typst-preview.nvim",
cmd = { "TypstPreview" }, cmd = { "TypstPreview", "TypstPreviewToggle", "TypstPreviewUpdate" },
build = function() build = function()
require("typst-preview").update() require("typst-preview").update()
end, end,
@ -65,7 +41,7 @@ return {
}, },
opts = { opts = {
dependencies_bin = { dependencies_bin = {
["typst-preview"] = "tinymist", tinymist = "tinymist",
}, },
}, },
}, },