mdpls icon indicating copy to clipboard operation
mdpls copied to clipboard

Add deferUpdates mode

Open Dummi26 opened this issue 1 year ago • 1 comments

This is a mode where the preview isn't updated once per change, but rather at most once per , if the document has changed. This means that typing 20 characters only causes a few updates instead of one for each character. Saves battery and reduces lag with very big .md files using a ton of TeX.

Disabled by default, but I had to move the Markdown Server into an Arc<Mutex<_>>. Can be enabled using LSP config.

I needed this to prevent my battery from emptying way too fast, but this also makes working with large documents more enjoyable in general.

Set to only a few milliseconds of delay for a nice and smooth experience, or a longer time for better battery life.

LSP config options:

  • deferUpdates.ms_before
  • deferUpdates.ms_between

Dummi26 avatar Nov 28 '23 11:11 Dummi26

i typed <duration> and it ate it. once per <duration>. sorry

Dummi26 avatar Nov 28 '23 11:11 Dummi26