nvimdev / nvimdev/lspsaga.nvim
error: get_line_byte_from_position (a nil value)
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 3.8k
- Forks
- 308
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
An error attempt to call field '_get_line_byte_from_position' (a nil value) occurs in places where the lsp.util._get_line_byte_from_position function is used, such as :Lspsaga peek_definition.
This is because the _get_line_byte_from_position function has been removed from Neovim. It should use vim.pos instead.
https://github.com/neovim/neovim/commit/a7f09db9de683f0bb1f4bc5725e39be63666b89c
Steps to reproduce
- use Neovim head
:Lspsaga peek_definition
Expected behavior
No error should occur
Neovim version (nvim -v)
NVIM v0.13.0-dev-576+g71c72c3409
lspsaga commit
3e33a6a6c5d379f3d4fae77fae6b53b762a0a30f
Terminal name/version
wezterm
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating uses of lsp.util._get_line_byte_from_position, especially the path exercised by :Lspsaga peek_definition. Compare the usage with Neovim's referenced change and verify the command on Neovim head. Done means reproducing the command without the nil-value error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, vim
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100