Skip to content

Conversation

iovis
Copy link
Contributor

@iovis iovis commented Dec 9, 2024

Fixes #1507

In #1506 the offset was added to make_given_range_params, but the signature of the function is:

function M.make_given_range_params(start_pos, end_pos, bufnr, offset_encoding)

Which in servers like clangd was causing this issue:

Error executing vim.schedule lua callback: .../neovim/0.10.2_1/share/nvim/runtime/lua/vim/lsp/util.lua:2074: bufnr: expected number, got string
stack traceback:
	[C]: in function 'error'
	vim/shared.lua: in function 'validate'
	.../neovim/0.10.2_1/share/nvim/runtime/lua/vim/lsp/util.lua:2074: in function '_get_offset_encoding'
	.../neovim/0.10.2_1/share/nvim/runtime/lua/vim/lsp/util.lua:2148: in function 'make_given_range_params'
	...e/nvim/lazy/lspsaga.nvim/lua/lspsaga/codeaction/init.lua:178: in function 'send_request'
	...e/nvim/lazy/lspsaga.nvim/lua/lspsaga/diagnostic/init.lua:300: in function <...e/nvim/lazy/lspsaga.nvim/lua/lspsaga/diagnostic/init.lua:276>

@glepnir glepnir merged commit 336ff52 into nvimdev:main Dec 10, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

expected number, got string in make_given_range_params
2 participants