-
Notifications
You must be signed in to change notification settings - Fork 11
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
Feat: Add diagnostics for embedded languages #18
Feat: Add diagnostics for embedded languages #18
Conversation
2fdfbed
to
ab6a2c8
Compare
Tests fail since the rebase. I don't get it :/ |
There was a race condition that slipped into staging tests. Rebase again and you should be fine. |
a2dc95f
to
f52d23e
Compare
I still don't manage to replicate the errors. I only noticed sometimes it is slow to update when I save the document and the parsing is running in the background. Maybe this is the issue you have? What is your version of vscode? |
This is something I tried. I failed to find any such setting. It might be impossible. |
It doesn't seem to get fixed by waiting. |
Maybe virtual documents would help? But OK for now. |
fb5f3c3
to
2d81a2e
Compare
The issue with "trimTrailingWhitespace" should be fixed now |
2d81a2e
to
dc3db6b
Compare
Thanks for your detailed explanations of the limitations. This feature is very promising, I hope we can find other workarounds of the current VSCode limitations. |
5c3c764
to
67e71fb
Compare
I found a way to close tabs as they open. They still can be seen appearing and disappearing once in a while in the tab bar, but at least the user does not have to close them manually. If I type random characters very fast, once in a while a tab will try to close while it still has non-saved changes (tab.isDirty), and a prompt will appear. This might be annoying if you type very very fast, but hopefully there's no one who code that fast? It is not ready to merge, I still have to clean up a couple of things. I'd just like to know if you think the behavior is good enough for now. |
Closing the tabs is still a bit hacky UX. It's really a shame we don't have a proper VSCode API for diagnostics here. However having the risk of getting the notification for unsaved modifications is definitely too intrusive. That's very likely due to a race condition when two rapid Otherwise, could you make another try with the NodeJS file API and notify vscode to refresh the python diagnostics? |
67e71fb
to
408322b
Compare
There's no way to notify vscode to refresh the diagnostics. Apparently the LSP has such a feature, but it is not yet integrated to VS Code. I tried updating the file with "fs", then updating with a blank change, then saving with vs code api. It won't update the diagnostics. I made a change that edits the files only if they are not being updated. After spending a couple of minutes typing junk as fast as I could, I never saw the prompt to save the files on closing the tabs. Once in a while the undesired tabs will stay open for a couple of seconds, but it always closed itself after I stopped typing. It also makes the completion a bit less responsive, but it is still better than what it was before removing the debouncing. |
I really like the current iteration! On my setup, no more "file not saved" popup as well. The diagnostics are very responsive and the modification tab is not that annoying and gets away very fast usually. |
Also, if I click on the diagnostics for the virtual files in the problems view, they get immediately closed. Users shouldn't really do this adn rather click on the diagnostics for the .bb originals. Is there something we can do? Masking them is not possible, but keeping the file open through clicking when there is no pending file edits? |
It is because of the override. The
I have in mind to explain all of it in the readme so the users have a way to know what's going on.
Weird. I thought I was handling it. This line is supposed (according to my experimentations) to prevent them to close when they have been opened by a user action. For example, if I click on a problem from the "problems" tab, the "embedded language file" will open on "preview" mode. I wonder why it does not work for you :/ |
408322b
to
588c47b
Compare
The new version does not show warning on do_install:append and inline_python into bash functions. It also adds a TROUBLESHOOTING.md file |
I get some false positive diagnostics still in some recipes, but they can be addressed in new PRs. This one is plenty good now :) |
This gives better responsiveness when editing files
588c47b
to
bcd73cd
Compare
yes, I'll search for false positives 👌 |
No description provided.