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

No intellisense for unsaved files #16

Open
felipecrs opened this issue Aug 11, 2021 · 2 comments
Open

No intellisense for unsaved files #16

felipecrs opened this issue Aug 11, 2021 · 2 comments

Comments

@felipecrs
Copy link

I don't know if it's desired or no, but the extension seems to only provide intellisense for Groovy code when the file is saved:

KmlsHD3ohz

@shadycuz
Copy link
Member

@felipecrs Yes... I have noticed this when trying to debug new features. I also try and throw groovy into a fresh file and it doesn't work for me either.

So we tell vscode to activate the plugin once vscode knows the language is groovy.

"activationEvents": [
    "onLanguage:groovy",
    "onCommand:groovy.restartServer"
],

but on the language server side it has to compile your workspace, so it needs access to the files and the filesystem. I just tried with the Redhat Java extension and it also behaves the same way. We can leave this open for now and I will add something to the README to avoid any surprises. Groovy3 did add a way to compile text without files so it's possible that this could be added in the future as long as the LSP (the protocol) supports it.

@felipecrs
Copy link
Author

I just tried with the Redhat Java extension and it also behaves the same way.

Oh, if it behaves the same way then I think we are good.

We can leave this open for now and I will add something to the README to avoid any surprises.

It's up to you, now knowing that it does not work even for Java, it's fine for me if you prefer to close it.

Groovy3 did add a way to compile text without files so it's possible that this could be added in the future as long as the LSP (the protocol) supports it.

Very interesting. TypeScript's LSP supports it, so from LSP's perspective it should be doable.

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

No branches or pull requests

2 participants