Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple language server with lsp-workspace-command #10176

Commits on Apr 6, 2024

  1. Allow multiple language server with lsp-workspace-command

    This fix allows for multiple language servers at once which support
    workspace commands. This was previously broken as just the first
    language server supporting workspace commands was queried when listing
    allowed worspace commands.
    
    The fix is in two parts. Firstly, querying all workspace commands from
    all language servers available and using them when actually running the
    command in `lsp_workspace_command`. Secondly, doing the same in
    `completers::lsp_workspace_command` such that completion still works as
    expected.
    
    The fix has one remaining issue, which I am unsure how to handle in the
    best way possible, but which I also don't think should happen often:
    Multiple language servers may register commands with the same name. This
    will lead to that command being listed in the popup menu and in the
    completion list multiple times, which can be possibly confusing. One
    could disambigue them in the popover menu, but I am not sure the same
    can be done for completion. When running `lsp-workspace-command` with
    parameters, this behavior is "fixed" by displaying an error in that
    case. I am unsure if this is the best fix for this issue in that case,
    but could not find a better one.
    Schmiddiii committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    7a484ef View commit details
    Browse the repository at this point in the history