From 191b1c7d506b08b5ccb11a33e511cd6e4131e4ed Mon Sep 17 00:00:00 2001 From: Nguyen Hoai Nam <55802579+namnh198@users.noreply.github.com> Date: Mon, 21 Jul 2025 22:46:45 +0700 Subject: [PATCH] fix(lsp): make_position_params with offset encoding. #6276 --- lua/lazyvim/plugins/extras/lang/typescript.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index f7cc3231..b4b6592d 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -69,7 +69,8 @@ return { { "gD", function() - local params = vim.lsp.util.make_position_params() + local win = vim.api.nvim_get_current_win() + local params = vim.lsp.util.make_position_params(win, "utf-16") LazyVim.lsp.execute({ command = "typescript.goToSourceDefinition", arguments = { params.textDocument.uri, params.position },