-
Notifications
You must be signed in to change notification settings - Fork 41
cursor is misplaced on lsp_finder window #12
Comments
@DanielPower is it working on nvim51 branch without issues? I have some issue with the preview but cursor is placed correctly in nvim nightly |
Sorry for the late response. After switching from commit |
@DanielPower @tami5 im still having this issue after specifying the nvim51 branch. |
So am I. sorry for the confusion. It doesn't happen every time and I wasn't able to reproduce it for a bit. Not sure what causes it to only happen sometimes. |
@DanielPower could we reopen this issue? |
I'm also facing this issue as well with the newest neovim and lspsaga.nvim. Seems like the Definition part has been rendered twice so it breaks the UI. |
The problem resolved after I update the nvim-lspconfig today. Seems like is caused by the changes in nvim-lspconfig. |
I haven't seen it in a few days. It seems inconsistent. Not sure if it's been fixed since I updated to 0.6 and switched back to the master branch or not. If I don't see the issue again, and nobody responds to this issue that they're still having it on Neovim 0.6, then I'll close this issue in a week or so. |
I've had the issue happen again on Neovim 0.6 with the latest version of lspsaga. So this does still exist.
Edit 2: After updating and restarting, I'm still seeing the issue. |
Line 13 in lua/lspsaga/provider.lua local def_response = lsp.buf_request_sync(0, method[1], def_params, timeout or 1000) For some reason, the response includes an empty table as first entry. {
[2] = {},
[3] = {
result = { {
range = {
end = {
character = 19,
line = 105
},
start = {
character = 6,
line = 105
}
},
uri = "<cleared_out>"
} }
}
} This causes local responses = {}
if libs.result_isempty(def_response) then
def_response[1] = {}
def_response[1].result = {}
def_response[1].result.saga_msg = "0 definitions found"
end
table.insert(responses, def_response) Since the first index([1]) is not set in function libs.result_isempty(res)
if type(res) ~= "table" then
print "[Lspsaga] Server return wrong response"
return
end
for _, v in pairs(res) do
if next(v) == nil then
-- return true
goto continue
end
if not v.result then
-- return true
goto continue
end
if next(v.result) == nil then
-- return false
goto continue
end
if next(v.result) ~= nil then
return false
end
::continue::
end
return true
end This fixed the problem for me. Since I'm not very familiar with Lua, I'm not sure this is the best way to solve it. Some input would be appreciated. |
Same problem occurs on neovim 0.8 with the latest lspsaga. This problem will definitely appear when writing ts/js files, but not other filetypes. I tried other branchs, but it still exists. |
Description
When opening the references preview
lua require'lspsaga.provider'.lsp_finder()
, cursor and syntax highlighting is misaligned. See attached video.Screen.Recording.2021-10-05.at.5.26.46.PM.mov
Expected Behavior
Cursor should align correctly with the file that's being previewed.
Actual Behavior
Cursor is always 3 lines above where it should be.
Neovim Built in Behavior
Neovim does not have this built-in. The built-in behaviour uses a quickfix list.
Details
Reproduce
lua require'lspsaga.provider'.lsp_finder()
on any symbol.Environment
The text was updated successfully, but these errors were encountered: