CM6 lint question

Hi, I have two questions about lint:

  1. How to set lintDelay, I see it default 500.

  2. I want it to display multiple lines in lint tooltip, so I return Diagnostic which message is a string with “\n”, but the tooltip show the message in one line.

LintDelay is currently not configurable, but could be made configurable. Why do you want to change it and what would you set it to?

Does styling .cm-diagnostic with white-space: pre-wrap solve your issue with newlines? I guess that could be made the default.

I use lexer parser parsing my language in linter, which runs in a large web application and needs to reduce the resolution frequency to ensure the user experience. I need to constantly adjust to determine a suitable LintDelay value.

white-space: pre-wrap is work, thanks!

Great. @codemirror/lint 0.18.2 set the white-space style by default and adds an option, like in linter(myFunc, {delay: 2000}), for the delay.

I want to use the wordAt function the @codemirror/state-0.18.6 version today,
but I use codeMirror through basic-setup, there is a lot of packages in it, and it seems that I can’t upgrade one of them. so I had to copy the wordAt function on github directly.

Should I import them one by one to replace the basic-setup?

Removing your package lock and reinstalling should usually upgrade everything to the latest version.

Thanks :grin: :grin: :grin: