yegappan / lsp

Language Server Protocol (LSP) plugin for Vim9
MIT License
458 stars 49 forks source link

LspCodeAction #430

Closed JetSetIlly closed 8 months ago

JetSetIlly commented 8 months ago

The documentation says I can specify a query when invoking :LspCodeAction. However, I don't seem to be able to include actions with spaces in. I see that I should be able to specify a regular expression but nothing I come up with works.

The code action I want to specify is labelled Organize Imports. I've tried

I'm misunderstanding something but I'm not sure what.

I've got it working by using just Organize as the query but I can't be sure there won't be another code action that starts with Organize and I don't want to trigger it by accident.

Shane-XB-Qian commented 8 months ago

please input start with '/' ?

JetSetIlly commented 8 months ago

Yes. That solves it. I had tried it with an ending slash too but that's incorrect. Just a starting slash. Thanks.