mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-07 11:24:39 +02:00
chore(typst): add comments and simplify code
This commit is contained in:
parent
2daa8da842
commit
d281c79dee
1 changed files with 4 additions and 6 deletions
|
@ -17,10 +17,8 @@ return {
|
||||||
opts = {
|
opts = {
|
||||||
servers = {
|
servers = {
|
||||||
tinymist = {
|
tinymist = {
|
||||||
single_file_support = true,
|
single_file_support = true, -- Fixes LSP attachment in non-Git directories
|
||||||
root_dir = function()
|
root_dir = LazyVim.root.get,
|
||||||
LazyVim.root.get()
|
|
||||||
end,
|
|
||||||
settings = {
|
settings = {
|
||||||
formatterMode = "typstyle",
|
formatterMode = "typstyle",
|
||||||
},
|
},
|
||||||
|
@ -44,7 +42,7 @@ return {
|
||||||
cmd = { "TypstPreview", "TypstPreviewToggle", "TypstPreviewUpdate" },
|
cmd = { "TypstPreview", "TypstPreviewToggle", "TypstPreviewUpdate" },
|
||||||
build = function(plugin)
|
build = function(plugin)
|
||||||
local typst_preview = require("typst-preview")
|
local typst_preview = require("typst-preview")
|
||||||
typst_preview.setup(plugin.opts)
|
typst_preview.setup(plugin.opts) -- Setup preview during build to avoid redundant downloads
|
||||||
typst_preview.update()
|
typst_preview.update()
|
||||||
end,
|
end,
|
||||||
keys = {
|
keys = {
|
||||||
|
@ -52,7 +50,7 @@ return {
|
||||||
"<leader>cp",
|
"<leader>cp",
|
||||||
ft = "typst",
|
ft = "typst",
|
||||||
"<cmd>TypstPreviewToggle<cr>",
|
"<cmd>TypstPreviewToggle<cr>",
|
||||||
desc = "Typst Preview",
|
desc = "Toggle Typst Preview",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue