mattn / efm-langserver

General purpose Language Server
MIT License
1.34k stars 61 forks source link

Option to skip linting/formatting if rootMarkers can't be resolved? #213

Closed fsouza closed 2 years ago

fsouza commented 2 years ago

Hi there!

Would you take a PR adding an option or something like that to allow linting/formatting/anything else if rootMarkers can't be resolved?

For example:

What do you think? Is that feasible/acceptable? Thank you!

mattn commented 2 years ago

What you want is that efm-langserver do NOT operating linting/formatting/anything if rootMarkers can't be found. Right?

fsouza commented 2 years ago

What you want is that efm-langserver do NOT operating linting/formatting/anything if rootMarkers can't be found. Right?

Exactly. Since that would be a behavior change, I think we should do it behind a new knob. Would that be acceptable?

mattn commented 2 years ago

I don't think it's breaking behavior. I think.

mattn commented 2 years ago

Please do

fsouza commented 2 years ago

Oh, looks like for linting it's already in-place: https://github.com/mattn/efm-langserver/commit/fdd0aab0e2dcc5e823feb9de170ebf036b213a0a

I can reuse the strategy and the config flag for textDocument/formatting. Will do that and open a PR