From 3a59edf56c45fcee230e5bdf16a505b704bcf282 Mon Sep 17 00:00:00 2001 From: Vo Quang Chien Date: Fri, 20 Dec 2024 09:34:10 +0700 Subject: [PATCH] feat(typst): add keymap to define entry point of the project --- lua/lazyvim/plugins/extras/lang/typst.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/typst.lua b/lua/lazyvim/plugins/extras/lang/typst.lua index 9a19e47e..8fdbb35c 100644 --- a/lua/lazyvim/plugins/extras/lang/typst.lua +++ b/lua/lazyvim/plugins/extras/lang/typst.lua @@ -17,6 +17,19 @@ return { opts = { servers = { tinymist = { + keys = { + { + "cP", + function() + local buf_name = vim.api.nvim_buf_get_name(0) + LazyVim.lsp.execute({ + command = "tinymist.pinMain", + arguments = { buf_name }, + }) + end, + desc = "Pin main file", + }, + }, single_file_support = true, -- Fixes LSP attachment in non-Git directories settings = { formatterMode = "typstyle",