aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin
diff options
context:
space:
mode:
authorYi Ming <ofseed@foxmail.com>2025-02-11 17:19:44 +0800
committerYi Ming <ofseed@foxmail.com>2025-02-11 18:48:56 +0800
commite8b5dd1e89bfa984e7b943443a291484cba23fac (patch)
tree3d8419bb98c6b2a951bc994e30dd26bd7008f690 /test/functional/plugin
parent67221497762ab5a055451c40a374e03bb620a68a (diff)
downloadrneovim-e8b5dd1e89bfa984e7b943443a291484cba23fac.tar.gz
rneovim-e8b5dd1e89bfa984e7b943443a291484cba23fac.tar.bz2
rneovim-e8b5dd1e89bfa984e7b943443a291484cba23fac.zip
feat(lsp)!: `symbol_to_item` requires `offset_encoding`
Diffstat (limited to 'test/functional/plugin')
-rw-r--r--test/functional/plugin/lsp_spec.lua20
1 files changed, 17 insertions, 3 deletions
diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua
index db3ab8ed98..a0064f741e 100644
--- a/test/functional/plugin/lsp_spec.lua
+++ b/test/functional/plugin/lsp_spec.lua
@@ -2930,6 +2930,8 @@ describe('LSP', function()
local expected = {
{
col = 1,
+ end_col = 1,
+ end_lnum = 2,
filename = '',
kind = 'File',
lnum = 2,
@@ -2937,6 +2939,8 @@ describe('LSP', function()
},
{
col = 1,
+ end_col = 1,
+ end_lnum = 4,
filename = '',
kind = 'Module',
lnum = 4,
@@ -2944,6 +2948,8 @@ describe('LSP', function()
},
{
col = 1,
+ end_col = 1,
+ end_lnum = 6,
filename = '',
kind = 'Namespace',
lnum = 6,
@@ -3036,7 +3042,7 @@ describe('LSP', function()
},
},
}
- return vim.lsp.util.symbols_to_items(doc_syms, nil)
+ return vim.lsp.util.symbols_to_items(doc_syms, nil, 'utf-16')
end)
)
end)
@@ -3045,6 +3051,8 @@ describe('LSP', function()
local expected = {
{
col = 1,
+ end_col = 1,
+ end_lnum = 2,
filename = '',
kind = 'File',
lnum = 2,
@@ -3052,6 +3060,8 @@ describe('LSP', function()
},
{
col = 1,
+ end_col = 1,
+ end_lnum = 6,
filename = '',
kind = 'Namespace',
lnum = 6,
@@ -3115,7 +3125,7 @@ describe('LSP', function()
},
},
}
- return vim.lsp.util.symbols_to_items(doc_syms, nil)
+ return vim.lsp.util.symbols_to_items(doc_syms, nil, 'utf-16')
end)
)
end)
@@ -3125,6 +3135,8 @@ describe('LSP', function()
local expected = {
{
col = 1,
+ end_col = 1,
+ end_lnum = 3,
filename = '/test_a',
kind = 'File',
lnum = 2,
@@ -3132,6 +3144,8 @@ describe('LSP', function()
},
{
col = 1,
+ end_col = 1,
+ end_lnum = 5,
filename = '/test_b',
kind = 'Module',
lnum = 4,
@@ -3181,7 +3195,7 @@ describe('LSP', function()
containerName = 'TestBContainer',
},
}
- return vim.lsp.util.symbols_to_items(sym_info, nil)
+ return vim.lsp.util.symbols_to_items(sym_info, nil, 'utf-16')
end)
)
end)