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
{{ message }}
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.
Highlighting is perfectly fast on small files, but once files get over 500 lines, highlighting noticeably lags for every few characters I type in insert mode. It would be great if there was a way to disable highlighting while typing, or only reapply highlighting on a function call so it could be hooked up to an autocmd.
Sorry for the late response, not sure if you're still experiencing this or have moved on. But anyways, that is sending a lot of requests. I personally don't use clangd so this slipped by me, the behvavior looks a lot worse.
I have made an initial attempt to address typing. We can't completely ignore updates to the highlighting during editing, but the timer period can be adjusted, if a new request comes in before the timer runs it will reset the timeout. This should result in dramatically fewer highlighting runs, obviously you won't get real-time highlight updates but that's probably fine.
The changes are on a separate branch as they are experimental: feature-mode-delay
These are new settings variables to toggle:
g:lsp_cxx_hl_delay - this is the default timer delay, usually 10ms. I don't recommend touching it unless the others aren't working well.
g:lsp_cxx_hl_use_mode_delay - bool, whether to vary the delay based on editor mode
g:lsp_cxx_hl_edit_delay_ms - edit mode (insert/replace) delay, defaults to 1000ms
Please try setting this and seeing if your situation improves:
I've been using these settings for the past week and they work great! I prefer g:lsp_cxx_hl_delay_ms as it also makes successive normal mode operations smoother.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Highlighting is perfectly fast on small files, but once files get over 500 lines, highlighting noticeably lags for every few characters I type in insert mode. It would be great if there was a way to disable highlighting while typing, or only reapply highlighting on a function call so it could be hooked up to an autocmd.
Configuration:
CoC configuration:
Log from typing in a 1400 line file:
Log from typing in a 20 line file:
The text was updated successfully, but these errors were encountered: