mattn / efm-langserver

General purpose Language Server
MIT License
1.32k stars 59 forks source link

When "lint-on-save", also lint when document is first opened #276

Closed Hubro closed 4 months ago

Hubro commented 4 months ago

I'm using lint-on-save with mypy, because mypy is slow and doesn't support processing files through STDIN. However, it's a bit surprising when I save a document and a bunch of unrelated diagnostics suddenly show up, because the document wasn't linted when I first opened it.

I feel like expected, intuitive behavior with lint-on-save is that the document is also linted when it's initially opened.

mattn commented 4 months ago

Added lint-after-open.

https://github.com/mattn/efm-langserver/commit/5f956853b1ad7c9457faf059555b8021f26539af