Skip to content

Support for LSP completion requests - #1

Open
marvinborner wants to merge 3 commits into
mainfrom
feature/completion
Open

Support for LSP completion requests#1
marvinborner wants to merge 3 commits into
mainfrom
feature/completion

Conversation

@marvinborner

Copy link
Copy Markdown
Member

This PR is part of effekt-lang/effekt#384 and adds LSP completion request handlers for kiama.

I wonder if there's a more elegant (or already implemented?) solution for optWord? This is relevant for filtering the suggested symbols (e.g. by prefix). Just for testing I split by whitespace, but this should ultimately also consider dots, semicolons, etc.

@jiribenes

Copy link
Copy Markdown
Contributor

What's the status of this PR? Can we merge this part and get to effekt-lang/effekt#384 later or is there something blocking this? :)

@marvinborner

marvinborner commented Sep 6, 2024

Copy link
Copy Markdown
Member Author

This PR depends on effekt-lang/effekt#384 's getCompletion, so merging only this wouldn't do anything.

The PRs suffer from the same problems as effekt-lang/effekt#398. Ideally, completion should only suggest symbols in scope. We don't currently have an efficient way of doing this.

Also, active typing typically introduces syntax errors, so caching the last working phase/stage might also be needed.

@jiribenes

Copy link
Copy Markdown
Contributor

This PR depends on effekt-lang/effekt#384 's getCompletion, so merging only this wouldn't do anything.

I realise that, but my question is: will there ever be any more code for this on the Kiama side?
If we don't foresee more code here, then I'm fine with merging this PR...

@marvinborner

Copy link
Copy Markdown
Member Author

Ah yes, I'm not sure. We may want a different API once Effekt's side is improved. It's probably fine though.

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.

2 participants