Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSP doc tooltip covering current line #8143

Closed
paul-hansen opened this issue Sep 1, 2023 · 9 comments
Closed

LSP doc tooltip covering current line #8143

paul-hansen opened this issue Sep 1, 2023 · 9 comments
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug S-waiting-on-review Status: Awaiting review from a maintainer.

Comments

@paul-hansen
Copy link

Summary

In insert mode, while typing a command the LSP documentation tooltip automatically comes up but it can be on the wrong line causing it to sometimes cover the line I'm trying to edit. I've had this happen a few times but have been unable to create steps to replicate it consistently. I did get a screenshot of it.

The line I'm editing is covered in the image below, it should be Text::from_section("test", CURSOR_HERE), but it's covering the from_section part:
Screenshot_20230901_153814

Reproduction Steps

Haven't been able to reproduce consistently, I'll keep trying and update here if I find a way.

Helix log

~/.cache/helix/helix.log

2023-09-01T14:21:40.074 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T14:21:40.088 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T14:22:18.090 helix_lsp::transport [ERROR] rust-analyzer <- InvalidParams: code action without data
2023-09-01T15:31:48.601 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T15:31:48.601 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T15:31:51.814 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T15:31:51.815 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T15:31:57.195 helix_lsp::transport [ERROR] rust-analyzer err <- "Panic context:\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "> \n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "version: 1.72.0 (5680fa1 2023-08-23)\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "request: textDocument/completion CompletionParams {\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "    text_document_position: TextDocumentPositionParams {\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "        text_document: TextDocumentIdentifier {\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "            uri: Url {\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "                scheme: \"file\",\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "                cannot_be_a_base: false,\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "                username: \"\",\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "                password: None,\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "                host: None,\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "                port: None,\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "                path: \"/home/paul/Projects/Rust/bevy_hello/src/main.rs\",\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "                query: None,\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "                fragment: None,\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "            },\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "        },\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "        position: Position {\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "            line: 1,\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "            character: 8,\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "        },\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "    },\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "    work_done_progress_params: WorkDoneProgressParams {\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "        work_done_token: None,\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "    },\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "    partial_result_params: PartialResultParams {\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "        partial_result_token: None,\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "    },\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "    context: None,\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "}\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "thread 'Worker' panicked at 'Bad range: node range 0..19, range 20..20', /cargo/registry/src/index.crates.io-6f17d22bba15001f/rowan-0.15.11/src/cursor.rs:786:13\n"
2023-09-01T15:31:57.196 helix_lsp::transport [ERROR] rust-analyzer err <- "stack backtrace:\n"
2023-09-01T15:31:57.221 helix_lsp::transport [ERROR] rust-analyzer err <- "   0: rust_begin_unwind\n"
2023-09-01T15:31:57.221 helix_lsp::transport [ERROR] rust-analyzer err <- "             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:593:5\n"
2023-09-01T15:31:57.221 helix_lsp::transport [ERROR] rust-analyzer err <- "   1: core::panicking::panic_fmt\n"
2023-09-01T15:31:57.221 helix_lsp::transport [ERROR] rust-analyzer err <- "             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/panicking.rs:67:14\n"
2023-09-01T15:31:57.222 helix_lsp::transport [ERROR] rust-analyzer err <- "   2: <rowan::cursor::SyntaxNode>::covering_element\n"
2023-09-01T15:31:57.223 helix_lsp::transport [ERROR] rust-analyzer err <- "   3: syntax::parsing::reparsing::incremental_reparse\n"
2023-09-01T15:31:57.223 helix_lsp::transport [ERROR] rust-analyzer err <- "   4: <syntax::Parse<syntax::ast::generated::nodes::SourceFile>>::reparse\n"
2023-09-01T15:31:57.223 helix_lsp::transport [ERROR] rust-analyzer err <- "   5: <ide_completion::context::CompletionContext>::new\n"
2023-09-01T15:31:57.223 helix_lsp::transport [ERROR] rust-analyzer err <- "   6: ide_completion::completions\n"
2023-09-01T15:31:57.223 helix_lsp::transport [ERROR] rust-analyzer err <- "   7: <salsa::Cancelled>::catch::<<ide::Analysis>::with_db<<ide::Analysis>::completions::{closure#0}, core::option::Option<alloc::vec::Vec<ide_completion::item::CompletionItem>>>::{closure#0}, core::option::Option<alloc::vec::Vec<ide_completion::item::CompletionItem>>>\n"
2023-09-01T15:31:57.223 helix_lsp::transport [ERROR] rust-analyzer err <- "   8: <ide::Analysis>::completions\n"
2023-09-01T15:31:57.223 helix_lsp::transport [ERROR] rust-analyzer err <- "   9: rust_analyzer::handlers::request::handle_completion\n"
2023-09-01T15:31:57.223 helix_lsp::transport [ERROR] rust-analyzer err <- "  10: std::panicking::try::<core::result::Result<core::option::Option<lsp_types::completion::CompletionResponse>, alloc::boxed::Box<dyn core::error::Error + core::marker::Send + core::marker::Sync>>, <rust_analyzer::dispatch::RequestDispatcher>::on_with_thread_intent<true, lsp_types::request::Completion>::{closure#0}::{closure#0}>\n"
2023-09-01T15:31:57.224 helix_lsp::transport [ERROR] rust-analyzer err <- "  11: <<stdx::thread::pool::Pool>::spawn<<rust_analyzer::task_pool::TaskPool<rust_analyzer::main_loop::Task>>::spawn<<rust_analyzer::dispatch::RequestDispatcher>::on_with_thread_intent<true, lsp_types::request::Completion>::{closure#0}>::{closure#0}>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}\n"
2023-09-01T15:31:57.224 helix_lsp::transport [ERROR] rust-analyzer err <- "note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\n"
2023-09-01T15:31:57.224 helix_lsp::transport [ERROR] rust-analyzer <- InternalError: request handler panicked: Bad range: node range 0..19, range 20..20
2023-09-01T15:31:57.224 helix_view::editor [ERROR] editor error: Async job failed: protocol error: InternalError: request handler panicked: Bad range: node range 0..19, range 20..20
2023-09-01T15:35:29.237 helix_lsp::transport [ERROR] rust-analyzer <- InvalidParams: code action without data
2023-09-01T15:35:55.798 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(188)), original request likely timed out
2023-09-01T16:02:39.113 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:02:39.113 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:02:51.668 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:02:51.668 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:02:51.668 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:02:51.668 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:02:51.668 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:02:51.668 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:02:51.668 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:02:51.668 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:02:51.669 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:02:51.669 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:02:51.669 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:02:51.669 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:02:52.616 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:02:52.616 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:02:54.735 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:02:54.735 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:02:54.735 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:02:54.736 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:02:55.924 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:02:55.924 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:02:55.924 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:02:55.925 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:04:01.582 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:04:01.582 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:04:10.183 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:04:10.183 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:04:10.183 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:04:10.183 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:04:10.183 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:04:10.184 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:04:11.771 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:04:11.771 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:04:12.749 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:04:12.749 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:04:15.639 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:04:15.639 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:04:15.639 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:04:15.639 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:04:16.295 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:04:16.295 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:04:17.149 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:04:17.149 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:04:19.461 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2023-09-01T16:04:19.461 helix_view::editor [ERROR] editor error: Async job failed: protocol error: ServerError(-32801): content modified
2023-09-01T16:04:19.625 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(14)), original request likely timed out
2023-09-01T16:04:19.626 helix_lsp::transport [ERROR] Tried sending response into a closed channel (id=Num(12)), original request likely timed out

Platform

Linux (EndeavorOS)

Terminal Emulator

wezterm 20230828-072823-a103b6d9

Helix Version

helix 23.05 (c9694f6)

@paul-hansen paul-hansen added the C-bug Category: This is a bug label Sep 1, 2023
@paul-hansen
Copy link
Author

If there isn't enough here to be actionable feel free to close this and I'll reopen when I have more info. I'm just hoping it's something simple or the helix log might be helpful to someone.

Possible that #3545 is somewhat related.

@kirawi
Copy link
Member

kirawi commented Sep 2, 2023

I think it is supposed to never be on the same line, and in practice this is usually the case for me. Needs further investigation.

let mut popup = Popup::new(SignatureHelp::ID, contents)
.position(old_popup.and_then(|p| p.get_position()))
.position_bias(Open::Above)
.ignore_escape_key(true);

@kirawi kirawi added A-helix-term Area: Helix term improvements S-waiting-on-review Status: Awaiting review from a maintainer. labels Sep 7, 2023
@zetashift
Copy link
Contributor

I am having this a lot too! Couldn't reproduce consistently either, but lately it's been bugging me a lot.

hx --version
helix 23.05

Using commit a38ec6d6ca9e5dbbd2e313f3173f2e967ed71fc1 a38ec6d

@kirawi
Copy link
Member

kirawi commented Sep 15, 2023

This might be fixed in #8021

@paul-hansen
Copy link
Author

I'm moving away from Helix. I suggest opening a new report if anyone still wants this addressed.

@paul-hansen paul-hansen closed this as not planned Won't fix, can't repro, duplicate, stale Sep 21, 2023
@kirawi
Copy link
Member

kirawi commented Sep 21, 2023

This issue is still useful to track

@kirawi kirawi reopened this Sep 21, 2023
@acceleratesage
Copy link

This may or may not be related to this, but when a method signature is unusually long, I get a similar bug. Using python-lsp-server and:

hx --version
helix 23.05 (7f5940be)

The method that lsp signature help is shown for is this: https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_rds/DatabaseInstance.html

Before entering Insert mode:
Screenshot 2023-10-22 at 16 34 02

When entering Insert mode:
Screenshot 2023-10-22 at 16 34 18

The text that I write is below the popup and not visible. Aldo Ctrl-d and Ctrl-u don't work as expected as the signature is not scrolled even though the scroll bar is moved.

@aidanmaney
Copy link

I can reproduce:

image

@pascalkuthe
Copy link
Member

Closing kn favor of #5827

@pascalkuthe pascalkuthe closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

No branches or pull requests

6 participants