Open djtech-dev opened 1 year ago
Hey, welcome. So I assume by saying "full", you mean that the existing completionContext isn't enough? It certainly doesn't contain the lines of code previous to the location at which the cursor triggered the completion.
So getting more context about the current buffer is actually something that's shown in our quickstart in the README. We have things like this:
document = server.workspace.get_document(params.text_document.uri)
# `params.position` is the current cursor position
current_line = document.lines[params.position.line].strip()
Does that give you some inspiration for exploring getting more context?
Hi, I'm working on an LSP Server and right now I'm implementing the Completations.
I wanted to ask how to read the full context (like the actual line of code or the lines of code previous to the current buffer) from
CompletionParams
.Thanks.