Skip to content

No longer possible to use an executable in PATH for lsp implementation #457

@xyven1

Description

@xyven1

The Problem

When lsp_binary was used to pass in the binary to use for the LSP implementation, it was possible to simply pass in executable find-able in PATH. With the new server and custom_server_filepath options, there is no direct way (that I can see) to have this plugin simply execute some binary which exists in PATH. For me this is a regression, since this is the only way I expect binaries to be reachable (via PATH, and not an absolute path).

Potential Solution

Provide a different option for the server which simply allows for users to specify the name of an executable. For example:

require("copilot.lua").setup({
    server = {
        type = "executable",
        name = "copilot-lsp"
    }
})

Workaround

require("copilot.lua").setup({
    server = {
        type = "binary",
        custom_server_filepath = vim.fn.exepath('copilot-lsp')
    }
})

This workaround is fairly simple, and so I wouldn't hate having to rely on it, but seems like this functionality should be exposed by the default set of options.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions