Closed devnote-dev closed 5 months ago
Does this PR remove LSP functionality?
Also, this appears to remove tasks. Can those be reimplemented?
The option for configuring language servers was removed as it wasn't clear if it worked, there were mixed responses from people in the Discord server.
Tasks were removed due to the amount of unnecessary complexity that was going on in that file, I wasn't willing to rewrite it at the time, especially when there is very little benefit. I'd be willing to add it back in a future PR as this one will cause more merge conflicts.
The option for configuring language servers was removed as it wasn't clear if it worked, there were mixed responses from people in the Discord server.
Alright. We can try adding this back in a future PR.
Tasks were removed due to the amount of unnecessary complexity that was going on in that file, I wasn't willing to rewrite it at the time, especially when there is very little benefit. I'd be willing to add it back in a future PR as this one will cause more merge conflicts.
That works for me. My only concern was in breaking things that people use. You don't have to be the one to implement it, but you're welcome to if you want.
In terms of actual functionality, nothing should be broken – if anything, the extension should be more performant, especially when it comes to hover capabilities. My only concern is actually testing the extension right now, because some dependencies were updated and I can no longer get it running.
Apologies for that. What are the errors you're running into?
The extension launches in debug mode but after opening the window the debugger stops and I get this message:
Looking at this with my computer now, it looks like hovering isn't working correctly, at least for me. For some reason spawnContextTool()
is returning the response of getCompilerPath()
, instead of continuing past it.
It appears it's also happening with format too.
I'll mark this PR as a draft until I can get vscode to work again and debug the situation.
@nobodywasishere I have made some changes, can you try it out again? format and hover seem to be working again for me
Format seems to work now. Trying out hover it doesn't show anything when hovering anything (not sure where it's supposed to be), though when hovering in a spec file it shows an import error:
Also, there was an error popping up in symbols.ts
that I fixed with this patch (basically just checks if matches is null before checking the length):
https://hastebin.com/share/anahehecir.kotlin
Did you see the comments I left in the review?
This PR provides mostly a rewrite of the existing files from the original code (based off the Ruby implementation) to updated TypeScript code, which has notable performance improvements and general better handling of features in the extension (for example, using the compiler). Things like completion and the symbols provider are still a work in progress and may not always work.