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

feat: add lsp-ai support #3206

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

Robzz
Copy link

@Robzz Robzz commented Jun 17, 2024

This PR adds support for the lsp-ai language server. Since the server is language-agnostic, I've set the defaults to attach to all filetypes, and always run in single-file mode. I do have a couple questions though:

  1. As it is, this is not a full, functional configuration, as there are parts for which I don't think there are good default values, so I just want to be sure you're good with this as long as I document it, since from a quick look at the supported server list it looks like most (all ?) servers work out-of-the-box with the default config of an empty setup{} call.
    In particular, a user would need to select an inference backend, which could either be some API requiring an API key or some other user-managed inference server (no sane defaults for us to provide here), or have lsp-ai do inference itself with llama.cpp, which requires a GPU if you expect a decent latency for inline completions, as well as downloading a few GBs of model files from HuggingFace, which I don't think is a great default either.
  2. The contributor docs state: In general, if a server requires custom client-side commands or off-spec handlers, then the server configuration should be added without those in lspconfig and receive a dedicated plugin such as nvim-jdtls, nvim-metals, etc.
    The server exposes a custom textDocument/generation endpoint. If I'm reading this right, this would fall under off-spec handlers, and does not belong here ? Asking since a quick search in the repo did surface a couple of configurations that do similar things, but this seems rare.

Marking as draft as I still need to write the server docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant