You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
telescope: require("telescope.health").check()
Checking for required plugins ~
- OK plenary installed.
- WARNING nvim-treesitter not found. (Required for `:Telescope treesitter`.)
Checking external dependencies ~
- OK rg: found ripgrep 14.1.1
- OK fd: found fd 10.1.0
===== Installed extensions ===== ~
Steps to reproduce
Create two files in the same directory
file.lua
require("hello")
hello.lua (make sure the first line is empty, this is important)
print("hello world")
nvim -nu minimal.lua file.lua
Execute :Telescope lsp_definition while the cursor
is over the "hello" string in the require("hello") call.
Expected behavior
The file is opened without any errors
Actual behavior
You will get this error
Error executing vim.schedule lua callback: /usr/share/nvim/runtime/lua/vi
m/lsp/util.lua:1142: Column value outside range
stack traceback:
[C]: in function 'nvim_win_set_cursor'
/usr/share/nvim/runtime/lua/vim/lsp/util.lua:1142: in function 's
how_document'
...o/plugins/telescope.nvim/lua/telescope/builtin/__lsp.lua:266:
in function 'handler'
/usr/share/nvim/runtime/lua/vim/lsp.lua:936: in function 'handler
'
/usr/share/nvim/runtime/lua/vim/lsp/client.lua:687: in function '
'
vim/_editor.lua: in function <vim/_editor.lua:0>
if you remove the first empty line in hello.lua the error is gone.
Minimal config
localroot=vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .reprofor_, nameinipairs { "config", "data", "state", "cache" } dovim.env[("XDG_%s_HOME"):format(name:upper())] =root.."/" ..nameend-- bootstrap lazylocallazypath=root.."/plugins/lazy.nvim"ifnotvim.uv.fs_stat(lazypath) thenvim.fn.system {
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
lazypath,
}
endvim.opt.runtimepath:prepend(lazypath)
-- install pluginslocalplugins= {
{
"nvim-telescope/telescope.nvim",
dependencies= {
"nvim-lua/plenary.nvim",
},
config=function()
-- Start an LSP Server, lua is used here but the bug can-- can be reproduced with any LSP (that supports definition ofc)vim.api.nvim_create_autocmd("FileType", {
pattern= {"lua"},
callback=function ()
vim.lsp.start({
name="luals",
cmd= { '/path/to/lua-language-server' },
root_dir=vim.fn.getcwd(),
})
end
})
--require("telescope").setup {}
end,
},
}
require("lazy").setup(plugins, {
root=root.."/plugins",
})
The text was updated successfully, but these errors were encountered:
Description
You will get an error if you issue
Telescope lsp_definition
that resolves to the beginning of a file where the file has a empty first line.Neovim version
Operating system and version
Linux 6.11.8-200.fc40.x86_64
Telescope version / branch / rev
Commit 2eca9ba
checkhealth telescope
Steps to reproduce
Create two files in the same directory
file.lua
hello.lua
(make sure the first line is empty, this is important)nvim -nu minimal.lua file.lua
Execute
:Telescope lsp_definition
while the cursoris over the
"hello"
string in therequire("hello")
call.Expected behavior
The file is opened without any errors
Actual behavior
You will get this error
if you remove the first empty line in
hello.lua
the error is gone.Minimal config
The text was updated successfully, but these errors were encountered: