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

Support for LSP completion requests #1

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

marvinborner
Copy link
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

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
Copy link
Member Author

marvinborner commented Sep 6, 2024

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

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
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