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

Question about updating LSP output #23

Closed
fprasx opened this issue Jul 24, 2022 · 8 comments
Closed

Question about updating LSP output #23

fprasx opened this issue Jul 24, 2022 · 8 comments

Comments

@fprasx
Copy link

fprasx commented Jul 24, 2022

Hi, I'm using the most recommended setup, and the LSP output (like inline errors and lints) only update when I save my changes to the buffer with :w. Should the output should update in real time or is it only supposed to update when the changes are written with :w? Thanks!

@adiSuper94
Copy link

I am facing the same issue.
Found a similar issue in rust-tools.nvim.
@sharksforarms can you confirm this behavior on your setup ?

@sharksforarms
Copy link
Owner

Yes this is how it's setup for me too. I haven't had a need for an alternative as I frantically do :w all the time 😅

@adiSuper94
Copy link

I guess i am gonna get used to the same. Thanks for the info @sharksforarms. And and huge thank you for all this config.

@fprasx
Copy link
Author

fprasx commented Aug 4, 2022

Ok, good to know that's just how it works. The solution I'm using is mapping jw to <esc>:w<cr> so it updates the output.

@sharksforarms
Copy link
Owner

I'm sure there's a way using an autocmd with the :LspRestart command maybe? Not at a computer to try (for a couple of weeks)

@sgoudham
Copy link

sgoudham commented Aug 5, 2022

I am facing the same issue. Found a similar issue in rust-tools.nvim. @sharksforarms can you confirm this behavior on your setup ?

Hi, I'm the one that raised that issue. I've been using the modularize_and_inlay_rewrite branch from rust-tools.nvim for a while, I feel like the issue I raised is actually a bug because I remember the diagnostics updating at least when I switched modes 🤔

And also, the config that I'm using... includes this option below (from the rust-tools.nvim docs):

-- Event which triggers a refersh of the inlay hints.
-- You can make this "CursorMoved" or "CursorMoved,CursorMovedI" but
-- not that this may cause higher CPU usage.
-- This option is only respected when only_current_line and
-- autoSetHints both are true.
only_current_line_autocmd = "CursorHold",

In my issue, you can see in the gif I uploaded that it's not refreshing the inlay hints even though I have the above config. I've updated the issue within rust-tools.nvim

@simrat39
Copy link

simrat39 commented Aug 9, 2022

Diagnostics not updating is a rust-analyzer thing: rust-lang/rust-analyzer#3107

@sharksforarms
Copy link
Owner

Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants