-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
[Request] - Maybe a "LSP 101 - Setup"? #1
Comments
Hello! Thanks for taking the time to write this up. It's really appreciated. And, your offer to help is awesome! This library has a bunch of somewhat-composable pieces. The "simplest" one is It might be easier to get going with First, do you have a server you'd like to interact with? Or, a language you'd like to operate on? If not, it could be interesting to see if sourcekit-lsp is installed with Xcode. That could make for an easy intro server. |
Awesome, I appreciate that note on the server differences. I did a little more experimentation after my first run through and made a bit of progress. Here's a quick rundown of current state:
I'm tossing a sample class below showing a quick run now that I've got the LocalProcessServer pointing to the right executable. Also the first set of logs from running with this config. I'm totally certain the configuration is wrong, but at least I've got it talking to the right thing. Next step I'm hoping for is getting that right config into place so the lsp understands what to index and what to read from, although I'm not quite sure if that's the right way to think of this configuration. I'm only aware of a small caveat being when or how the requested files are built to have the compile results cached. If I can get any good response back from it, I feel like I can start putting together a small layer around my main interests - definitions, type lookups. Let's say I wanted to read a definition from that sample file as a one off request. What do you see as a gross misunderstood of the lib/protocol in the sample below? 😛
|
Ok lots of progress! It's also great to know that sourcekit-lsp in included. The first problem I see is in your Aside: determining what capabilities servers actually have can be tricky, because you are seeing here only statically-available capabilities. Those may be dependent on your client's capabilities. But, servers can also register capabilities dynamically, and have their own dependencies. For example, I'm also unsure if you can get away with all nil Here's the flow you need:
|
Filled in some more details in the README that hopefully help! |
Hey there, and thanks for your time!
First off, thank you for sharing this repository and work to open up access to the Swift LSP for more folks to use. It's a great effort, and I've been excited to try and use the tool for a while now.
Unfortunately, I'm hitting that oft-expected LSP wall of, "There are so many moving pieces I don't know which piece to learn first to start learning more." Between build caches, local process instances, and quite literally everything in between in the Swift build and runtime, I am finding myself continuously at a loss for how to set this thing up.
My request is for a baby's-first-LSP-call guide or tutorial on how to interact with this client, and how to use it to interact with the server at the other end. Some simple step-by-step guide that shows:
With that corpus of a tutorial, I feel a lot of the other pathways to the LSP are opened. Since setup is a huge portion of the work, and getting into a "working state" is most of the trouble, following those first few requests and gotchas gives a feel for the API surface, and how things are "meant to work".
In any and all ways I can, I offer support to help write this! If that means reading through some of your suggested tutorials or notes and compiling them into a working document, I'm for it. Or, if it means being on a video call and working through individual steps and documenting it, I'm for that too. I am immensely interested in learning this technology and having others be able to do the same, so take very little salt when I say I really want this to work, haha.
Thanks for reading the text wall, and again, thanks for the great library and history of development around SwiftLSP.
The text was updated successfully, but these errors were encountered: