Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.
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.