Learn By Building: Language Server Protocol
Learn By Building: Language Server Protocol
#Learn #Building #Language #Server #Protocol
“TJ DeVries”
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:
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…
source
To see the full content, share this page by clicking one of the buttons below |
Now if only I can find a place to teach me about how to make this production ready. Fill in the blanks you mentions
super video!!
This is great. Would love to see a follow up video explaining how the linters/type checkers/etc work too.
Thanks!
This is a fantastic video. Thanks, TJ!
Such a great video, not only for LSP basics itself but also the Go learning aspect of it too. Thanks for the content 😀
Incredible as always
I want that shirt 😅
Very great work…, Sir
Great content. Waiting for the implementation of callHierarchy.
I know you were doing this all manually as a teaching exercise but CoPilot is so good for at converting these JSON schemas into Go structs. Saves so much dang time
I'll never forget that registered nurse tip. i always used to get those the wrong way around.
Last year I tried to build a bridge between nvim-dap and powershell dap server to make them communicate over named pipes, which nvim-dap didn't support at the time. I learned a lot but in the end it was a bridge too far.. Dap seems to be quite similar to lsp
Teej not only told us to RTFM, he also made a video because he knew we’re not going to RTFM anyway. Thanks Teej
That was bomber
the split personality approach to explain server to neovim communication is great. Very informative and Fun!
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!
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.
Amazing stuff TJ, a little confused on how to setup the lsp attachment for markdown, specifically the require("tj.lsp"), whats in that file?
This is absolutely amazing, made me feel ready to take my skill issues to golang once more!
What a legend you are, TJ! Thank you
I enjoy how casually TJ call "rn" "registered nurse"
Thanks for sharing this, it really helps to see how experienced devs work
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.
Great teaching formation! Great content! Thank you.
f
I need 2 months to learn Go then I'll return to this video. So exciting!!!
Thanks! You’ve made switching to Neovim so much easier due to your videos!
Love you TJ, you are always making such amazing content for us🥰
Just the perfect timing! I was looking into LSPs and also want to learn more GO. THX TJ.
Your videos are so clear and educational ❤ much more superior to those random guys that work in big companies, such as netflix❤
Man, I always fall asleep during your streams, but these presentations… Oh yeah, they're literally becoming part of World Heritage now.
Awesome! Waiting for you to start parsing files for the LSP using tree-sitter!