-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Extension cpp lsp #1499
base: master
Are you sure you want to change the base?
Extension cpp lsp #1499
Conversation
Maven Tycho is not happy:
I think this makes no sense. I'm pretty sure Is there a way we can exclude this code from the Tycho build? Maybe in the same way as the way we exclude Kotlin? Epoch does not use this code. |
if (!initialized) { | ||
CppLanguageServer.init(); | ||
initialized = true; | ||
} | ||
return CppLanguageServer.hoverRequest(params); | ||
// return IHoverService.EMPTY_HOVER; // Fail silently |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try {
if (!initialized) {
CppLanguageServer.init();
initialized = true;
}
return CppLanguageServer.hoverRequest(params);
} catch (IndexOutOfBoundsException e) {
return IHoverService.EMPTY_HOVER; // Fail silently
}
The old code which got deleted in this PR does "Fail silently," as it says, which is of course very bad. However, I want to keep it around (temporarily, until we move away from Xtext). See lf-lang/vscode-lingua-franca#63 (and the comment about the "hacky little patch") for background
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, wait, never mind. If we don't use the default hover method, we don't have the IndexOutOfBoundsException
from the framework, so that comment was not exactly right. But we do use the default hover method if we are not hovering over C++ code. So actually, the right thing to do is to use the old hacky thing only if we are not hovering over C++.
Edit: Actually, I should just stop talking and clarify what I mean when I have my wits about me and have read all the other code. You can disregard what I wrote.
Commit mostly works except it highly depends on a user using "lf build" all the time, but not pressing Command+S which saves a file. If a user presses Command+S, the current file that a user is working on does not produce any output anymore (I assume the issue is somewhere where the file is closed and reopened).
|
No description provided.