Learn By Building: Language Server Protocol
Вставка
- Опубліковано 25 чер 2024
- In this video, we build an entire Language Server from an empty Go project with literally no dependencies. Along the way, we'll use Go's standard library, builtin unit testing and Neovim to learn the most effective way that I know - by building something. There's no "Fill in the rest of the owl" - it's each step along the way. Hopefully by the end you really understand what's happening with Language Servers
Leave a like or comment, and subscribe of course! ;)
Repo Link: github.com/tjdevries/educatio...
Neovim: Neovim btw
00:00:00 - Introduction
00:00:50 - Read the Friendly Manual
00:01:44 - Transport Mechanism
00:03:02 - RPC Encode
00:05:39 - RPC Encode Test
00:08:15 - RPC Decode
00:12:27 - RPC Decode Test
00:13:38 - Decoding Method
00:17:18 - Decoding Content
00:18:04 - Building
00:18:58 - Building main.go
00:20:50 - Split Function
00:21:49 - Split Function Impl
00:25:49 - Logging
00:28:35 - Add basic Logging
00:29:16 - VERY FIRST MESSAGE
00:32:24 - Server life cycle
00:39:19 - More decoding
00:41:32 - Decoding Initialize
00:46:08 - Initialize Response
00:52:06 - Language Server Things
00:53:17 - Text Document Synchronization
00:56:18 - Start of "compiler"
01:02:22 - Start of "Analysis"
01:05:11 - Syncing State
01:10:25 - Changing Documents
01:13:19 - Hover Structu
01:19:08 - First Hover Response
01:23:26 - Making Hover Interactive
01:26:47 - Goto Definition
01:33:17 - Code Actions Demo
01:34:44 - Code Actions Explained
01:38:59 - Completion
01:47:59 - Diagnostics
01:58:16 - Conclusion
Links
Twitch: / teej_dv
Twitter: / teej_dv
Github: github.com/tjdevries - Наука та технологія
The best thing that's happened in the past 2 years is TJ becoming a full-time content creator
Heck yeah
Couldn't agree more. Awesome content.
I am only 35 mins in but this is absolute gold. Not necessarily in terms of the specifics of building an LSP... I mean it's great, but how many of us are actually gonna need to build an LSP from scratch ... but just in terms of problem solving, how to approach learning something, and how to de-mystify a topic. This 2 hour video must have taken your weeks of research and practice. Really appreciate all that hard work and then sharing it with us all.
Love that you do deep dives into these topics and make them simple!
That's the goal!! Really appreciate the message :)
I enjoy how casually TJ call "
" "registered nurse"
true 🤣
wow this is months worth of work in 2 hours, this is gonna take me so long to finish
just fall asleep to it on repeat (for the watch time metrics plz) LUL
One of the best tutorials I have ever seen! Thanks!
THIS GUY IS THE BEST TEACHER IN ALL OF INTERMEDIATE TECH UA-camRS
Absolute facts
best among INTERMEDIATIES?
I guess he meant "best teacher for intermediate level programmers on UA-cam", but ended up calling TJ a mid teacher 😂
@@rodrigoljhe literally said that, and what surprised me most, the other comment with "absolute facts."
Now the question is what's better?
best among intermediates
or
worst among the best?
Pausing to say you are an incredible teacher. Everything makes perfect sense. You build on previous ideas in a way that helps anyone understand. Brilliant stuff!
Super interesting seeing the layers comprising LSPs. Thanks again for the epic videos! Your style is fantastic and easy to follow.
I've been waiting for an LSP tutorial like this for Neovim for so long!! It's been a while that I've wanted to know more about LSP and how it works with Neovim, but lacked some of the knowledge to build the server myself. This is perfect, thank you!
Such a great video, not only for LSP basics itself but also the Go learning aspect of it too. Thanks for the content :D
a few days ago tree-sitter and now an LSP, you are killing it :D
These tutorials are so great, simple, to the point and no bs just pure gold
I love this channel. Good work TJ!
damn teeej out here killing it since going full time. this content is 🔥
Just the perfect timing! I was looking into LSPs and also want to learn more GO. THX TJ.
love this. I built a LSP server last year to help validate & format our custom PR body requirements in a markdown file locally rather than waiting on CI. Totally silly project but the point was to learn LSPs.
this is hands down one of the best tutorials, and this is how every tutorial should be like. great work full time content creator that streams btw!
the split personality approach to explain server to neovim communication is great. Very informative and Fun!
This is so good, i'm gonna follow it step by step. Thanks TJ for this amazing content!
Thank you TJ, I really appreciate this type of content/topics!
This is the video I was expecting to find when I've tried to add some features to Java LSP and I gave up. It was too hard, not the LSP part, but the Java Compile API. Thank you,
What a great video! Often I find myself being overwhelmed when only looking at the final code of some projects on Github. But watching this getting built from scratch with all those explanations and thoughts was really helpful!
omg, this is exactly the kind of video i was hoping existed. i'm not a great dev, and have no idea where to start with a LSP. you're the best tj
Oh yes I was just starting to build my toy LSP project! It's going to be written in rust, and I think I'll build a treesitter parser for the language first.
This will be very helpful. Also wanted to say thanks for your content! It ignited a passion I had a long time ago and has made my life a lot better.
Absolutely amazing video, tj really makes a complex topic like lsp and simplifies it. Great job!
What a masterclass 😍 You are a very good communicator TJ.
Learned so much from you teej, thanks a lot for making this video! Looking forward to the treesitter one!
1:05 As someone who has glanced at the treesitter and LSP manuals, I want to say readability of documentation is really essential. I read a lot and I write a lot, so seeing good language is important to me. There is just something about hand written documentation that is also a skill and treat for developers out there. And I say this because my first experience ever with documentation...was Ruby on Rails.
I have not quite recovered since.
Thanks for sharing this, it really helps to see how experienced devs work
Great video man. You made it look so easy and smooth!
wtf, crazy high quality content keeps coming out and in topics no one else is or even can teach people like TJ can
Thanks! You’ve made switching to Neovim so much easier due to your videos!
Wowowowow!! Thanks so much!!!
Thanks! I am just about to write one, perfect timing!
Damn the timing. I was looking for a golang project to refresh up on golang and this landed just in time.
This is a fantastic video. Thanks, TJ!
You are a fantastic teacher. I have an interview coming up for a team that works on LSP for generative AI features and this content is invaluable
Please do more of these! They are great explainers :)
What a legend you are, TJ! Thank you
Love you TJ, you are always making such amazing content for us🥰
couldn’t agree more with the first sentence. great video 👍
By far your best video yet 🔥
Very cool topic, thoroughly and clearly explained, really good advice and Golang masterclass included.
Thanks!
I was just looking for this, thank you so much Neovim Jesus!
He died for our vims 😂
@@sp3ctumI laughed at this a little bit too much xD
@@zozephdev ikr I have been laughing at it all day myself 🤣
Good stuff TJ!!!! This is so awesome
Thank you so much for this video. I learned a lot, and I'm excited to start tinkering with my own LSP.
i really like your videos, you explain really hard concepts very simple and easy to understand
Thanks! That's a really nice comment
Incredible as always
You are a great teacher. Learned a lot. Thank you, teej!
Man, this man doesn't miss!!
mannnn READ THE FRIENDLY MANUAL is now my motto because of you, teej
Great fun to follow along with, thanks!
beautiful content, this is real engineering! please keep going ! you are a great teacher!
Fantastic video TJ, thank you!
Love your content, man. Keep it up!
thanks and keep continuing to make such videos even though the audience size is less today.. it will be high soon
Activate subtitles please. Thank you so much. This is amazing.
This is great. Would love to see a follow up video explaining how the linters/type checkers/etc work too.
Very well presented, awesome video!
This is absolutely amazing, made me feel ready to take my skill issues to golang once more!
Thank you
Thank you thank ypu thank you
Thank you
Thank you
We need more content creators like this
Take notes pls
Very helpful video. I have project making my own toy language for learning/hobby purposes, and was soon going to dive into making an LSP for it, so this video will be helpful as a resource to come back to when I start it in earnest.
You are a really good teacher 😊
I need 2 months to learn Go then I'll return to this video. So exciting!!!
You could learn enough Go to be able to get the gist of what's going on and at the same time rewrite it using your preferred language, the same concepts apply
You're a really good teacher.
After installing quite a few LSPs, I became curious about what exactly an LSP is. So, I opened UA-cam, and just as I was about to search 'What is an LSP and how does it work?' I saw this video as my first recommendation. UA-cam seems to be reading my mind in real-time.
Man, I always fall asleep during your streams, but these presentations... Oh yeah, they're literally becoming part of World Heritage now.
Great teaching formation! Great content! Thank you.
Probably the best LSP guide on UA-cam! Love your content man❤
Honestly, I was scared of the documentation😅
Now I feel confident enough to RTFM
Thanks Teej😁
Teej made the manual friendly for everyone
@@stefanalecu9532 True!
Thank yooooou, you are an inspiration TJ ❤
Very great work..., Sir
Excellent video.
This is great, more videos like this, please!
It's an incredible video. It is actually a skill I wanted to learn ! I will soon do some try in rust to do a lsp such like that.
Teej not only told us to RTFM, he also made a video because he knew we’re not going to RTFM anyway. Thanks Teej
I expectec to write the comment "I wish you ignored the chat, and focused on the thing you are doing," and saw that there is not chat. Cool!
More content like this please.
I'm happy I actually learned more of htmx reading that friendly manual that I could ever do watching a yt video.
And you know what? I'm gonna read the unfriendly and scary manual and actually learn how to make an http server
Awesome video Teej! loved it! keep up the amazing work
thanks TJ GEM!
this is golden, thanks a lot!
great video loved it 🤟
Huh, this shows me that go actually seems to be a lot nicer to work with than I expected
I'll never forget that registered nurse tip. i always used to get those the wrong way around.
TJ with that shirt on you look like you should be chilling somewhere on a beach in the Caribbean or Hawaii 😂
super video!!
Great video, thanks ❤
I don't think there is a better video on building LSPs on the internet than this
this is amazing!
Your videos are so clear and educational ❤ much more superior to those random guys that work in big companies, such as netflix❤
I'm watching this video at 0.25x so i get to view that magnificent shirt longer.
watching this feels so illegal. getting this education for free
you can always become a member of the channel ;)
Masterpiece!
THIS is art folks
Yesssss! More Gooooooo
Thanks, Sensei
Looking forward to a similar project for Tree-sitter
Amazing idea
banger shirt, video also pretty good
nice, my prayer has been answered