aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/tinymist.lua
diff options
context:
space:
mode:
authorRobin Mueller <31589589+robamu@users.noreply.github.com>2025-10-27 21:21:16 +0100
committerGitHub <noreply@github.com>2025-10-27 13:21:16 -0700
commitb6c733f1d65edb93883a57bdbd0c222d6fb1c8d1 (patch)
tree7605fe0a5af90ecadc3e73b187af3f50fffcb520 /lsp/tinymist.lua
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-b6c733f1d65edb93883a57bdbd0c222d6fb1c8d1.tar
nvim-lspconfig-b6c733f1d65edb93883a57bdbd0c222d6fb1c8d1.tar.gz
nvim-lspconfig-b6c733f1d65edb93883a57bdbd0c222d6fb1c8d1.tar.bz2
nvim-lspconfig-b6c733f1d65edb93883a57bdbd0c222d6fb1c8d1.tar.lz
nvim-lspconfig-b6c733f1d65edb93883a57bdbd0c222d6fb1c8d1.tar.xz
nvim-lspconfig-b6c733f1d65edb93883a57bdbd0c222d6fb1c8d1.tar.zst
nvim-lspconfig-b6c733f1d65edb93883a57bdbd0c222d6fb1c8d1.zip
feat(tinymist): add pinMain command #4158
Diffstat (limited to 'lsp/tinymist.lua')
-rw-r--r--lsp/tinymist.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/lsp/tinymist.lua b/lsp/tinymist.lua
index f02ff194..946cfa90 100644
--- a/lsp/tinymist.lua
+++ b/lsp/tinymist.lua
@@ -17,10 +17,7 @@
local function create_tinymist_command(command_name, client, bufnr)
local export_type = command_name:match 'tinymist%.export(%w+)'
local info_type = command_name:match 'tinymist%.(%w+)'
- if info_type and info_type:match '^get' then
- info_type = info_type:gsub('^get', 'Get')
- end
- local cmd_display = export_type or info_type
+ local cmd_display = export_type or info_type:gsub('^get', 'Get'):gsub('^pin', 'Pin')
---@return nil
local function run_tinymist_command()
local arguments = { vim.api.nvim_buf_get_name(bufnr) }
@@ -64,6 +61,7 @@ return {
'tinymist.getDocumentTrace',
'tinymist.getWorkspaceLabels',
'tinymist.getDocumentMetrics',
+ 'tinymist.pinMain',
} do
local cmd_func, cmd_name, cmd_desc = create_tinymist_command(command, client, bufnr)
vim.api.nvim_buf_create_user_command(bufnr, 'Lsp' .. cmd_name, cmd_func, { nargs = 0, desc = cmd_desc })