nvimdev / nvimdev/lspsaga.nvim

error: get_line_byte_from_position (a nil value)

Open Beginner friendly
#1,565 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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
  1. use Neovim head
  2. :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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.