Skip to content

Is it possible to customize (or filter) the responses from LSP? #5278

Open
@your-diary

Description

@your-diary

Setup

I've been using coc.nvim with the following gopls (Golang Language Server) configuration for years:

"languageserver": {
  "golang": {
    "command": "gopls",
    "rootPatterns": ["go.mod"],
    "filetypes": ["go"]
  }
}

The configuration was copied from the official doc of coc.nvim with no modification.

Problem

Related:

Recent update to gopls broke the minimal setup above.

Specifically, when I try to use "organize imports" functionality via <plug>(coc-codeaction-cursor), "open gopls documentation in browser" is now shown above "organize imports".

Image

According to the issues above, however, it is not a bug and there is no solution though a member of the project says that isPreferred response parameter of LSP support may be added in the future.

Question

Is it possible to customize (or filter) the responses from LSP?

Image

Debug Output of coc.nvim

I posted the debug output of coc.nvim in

(Please see Logs section.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions