Comments (12)
Each time a new diagnostics response is received, the panel's content is cleared and rebuilt from scratch using "view.insert()" for each message. This causes flickering, if many items are added.
To solve this issue, all responses must be converted to the text content in the background and then be used to replace the whole panal's content with one "view.replace()" call.
EDIT: Maybe the scoll position should even be restored after update rather than scrolling to the bottom.
from lsp.
Debouncing the update would help somewhat here (VS Code seems to use "editor.quickSuggestionsDelay": 10
) but I think there's also an issue with the redrawing generally.
from lsp.
This is especially disturbing when the error surpasses a screenful. The whole view starts scrolling a lot
from lsp.
Could you enable log_debug
in your settings and share the results of a single keypress? A single diagnostics update should result in 1 update of the panel, but the way we write lines to the panel may not be batched in an efficient manner.
from lsp.
LSP: notify: textDocument/didSave
LSP: notify: textDocument/didSave
LSP: got json: {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"range":{"end":{"character":10,"line":88},"start":{"character":2,"line":78}},"message":"Warning 34: unused type ac
LSP: got json: {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"range":{"end":{"character":10,"line":88},"start":{"character":2,"line":78}},"message":"Warning 34: unused type ac
Two here
from lsp.
@deathaxe that sounds like a great fix!
@chenglou Two didSave events! That's not good - are you running some format-on-save logic (eg. another plugin?)?
from lsp.
No format on save
from lsp.
I'm only seeing the one textDocument/didChange
event here, but that's still causing the flickering. I'll look at the view.replace()
fix and see if that helps.
from lsp.
Merging the PR closed the issue, we can re-open if this hasn't improved.
from lsp.
This is still an issue.
from lsp.
Hi @tsujp, thanks for commenting in the original issue!
Can you share some details (what server are you running, when does it flicker?) A log covering a fresh start to a repro (with the LSP log_debug
setting would be much appreciated!
from lsp.
@tomv564 very sorry, I did not have "only_show_lsp_completions": true
set which was the cause of the issue, I should've more thoroughly checked the setup. When I removed some things to get the diagnostics I noticed the setting.
So, setting "only_show_lsp_completions": true
removed the 'problem' (which was really me hehe).
from lsp.
Related Issues (20)
- Error rewriting command lsp_recheck_sessions. Encountered infinite loop HOT 1
- Semantic tokens not working with Clojure LSP HOT 4
- LSP server initialization does not respond HOT 7
- Don't start/attach language server for semi-transient views HOT 5
- LSP 1.25.0 is not on packagecontrol.io HOT 2
- Getting unexpected underlines: possibly `document_highlight_style: ""` stopped working HOT 8
- RuntimeError: Set changed size during iteration HOT 1
- Toggle Shortcut for Switching Between LSP Hover and Native Sublime Text Hover
- Add `bufferSettings` key in sublime-settings for LSP settings that only apply to unsaved buffers HOT 3
- LSP is never started for initial unsaved buffer
- View closes after canceling Diagnostics Quick Panel HOT 5
- goto diagnostic closes the file on escape HOT 2
- AttributeError: 'int' object has no attribute 'startswith' HOT 2
- LemMinX causes KeyError HOT 7
- Option to keep LSP server running while project open, even after last file is closed
- Remove obsolete dependencies HOT 4
- Lsp-Omnisharp Code Actions does not work
- CodeLens does not process the whole file after opening it. HOT 2
- Refactor/Rename unavailable for function name HOT 2
- Goto Symbol boots slowly on large files, first characters are inserted in the code as a result HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp.