-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
LSP Backend #1739
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
LSP Backend #1739
Conversation
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.
Looks good man. I've left some notes on things that have to change and some that should be discussed
CodeEdit/Features/LSP/LanguageClient/LanguageClient+CallHierarchy.swift
Outdated
Show resolved
Hide resolved
CodeEdit/Features/LSP/LanguageClient/LanguageClient+DocumentLink.swift
Outdated
Show resolved
Hide resolved
d2a2576
to
8236329
Compare
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.
Great work! I'm really excited about getting all this functionality fully implemented. I found just a few small issues. We're still missing tests, and I'm not sure how to mock good responses from the language server or set one up for testing from scratch. Also, could you rename the folder LanguageServer+
to something like LanguageServerExtensions
?
I'll take a look at adding a mock provider for tests |
So I think one way we could do it is by creating a fake server binary. It would be a swift script that gets compiled and it would send back a randomized json response based on the request it received. Can I get some thoughts on this before I proceed with it? It would be a big task to get a mock language server that can effectively test the implementation. @CodeEditApp/maintainers |
No, that would be a waste of time right now. Tests are crucial in CE to ensure everything works now and after others make changes, especially with tightly coupled code that many people use and modify. But we’re not even using your language server functions yet. If setting up tests for server binaries is too complicated or time-consuming, I'd say skip them for now. We definitely need to create them eventually😅 |
Ok I'll make an issue for it and I can do it in the next milestone. |
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.
I see it's already merged, but still one point. (Didn't have to be done in this PR tho)
|
||
struct NoExtraData: Hashable { } | ||
|
||
struct CacheKey: Hashable { |
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.
In the future we need to do something with this. CacheKey
is now a callable struct from within the entire project, but it doesn't describe what it does at all.
Either should be fixed by moving to modules or very explicit documentation
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.
I'll make the naming more clear in my next or
Description
Contains the LSP backend.
Related Issues
Checklist