Learn By Building: Language Server Protocol

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 มิ.ย. 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
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 187

  • @lemurza5236
    @lemurza5236 3 หลายเดือนก่อน +160

    The best thing that's happened in the past 2 years is TJ becoming a full-time content creator

  • @inDefEE
    @inDefEE 3 หลายเดือนก่อน +28

    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.

  • @BlakeRogersNS
    @BlakeRogersNS 3 หลายเดือนก่อน +93

    Love that you do deep dives into these topics and make them simple!

    • @teej_dv
      @teej_dv  3 หลายเดือนก่อน +15

      That's the goal!! Really appreciate the message :)

  • @rabidhamper7
    @rabidhamper7 3 หลายเดือนก่อน +17

    I enjoy how casually TJ call "
    " "registered nurse"

    • @muonx9649
      @muonx9649 2 หลายเดือนก่อน

      true 🤣

  • @nilskch
    @nilskch 4 ชั่วโมงที่ผ่านมา

    One of the best tutorials I have ever seen! Thanks!

  • @LukasSmith827
    @LukasSmith827 3 หลายเดือนก่อน +12

    wow this is months worth of work in 2 hours, this is gonna take me so long to finish

    • @teej_dv
      @teej_dv  3 หลายเดือนก่อน +23

      just fall asleep to it on repeat (for the watch time metrics plz) LUL

  • @smithshelke2036
    @smithshelke2036 3 หลายเดือนก่อน +43

    THIS GUY IS THE BEST TEACHER IN ALL OF INTERMEDIATE TECH TH-camRS

    • @blovio
      @blovio 3 หลายเดือนก่อน

      Absolute facts

    • @alikin
      @alikin 3 หลายเดือนก่อน +1

      best among INTERMEDIATIES?

    • @rodrigolj
      @rodrigolj 3 หลายเดือนก่อน +5

      I guess he meant "best teacher for intermediate level programmers on TH-cam", but ended up calling TJ a mid teacher 😂

    • @alikin
      @alikin 3 หลายเดือนก่อน

      @@rodrigoljhe literally said that, and what surprised me most, the other comment with "absolute facts."

    • @alikin
      @alikin 3 หลายเดือนก่อน

      Now the question is what's better?
      best among intermediates
      or
      worst among the best?

  • @jordanray1537
    @jordanray1537 3 หลายเดือนก่อน +7

    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!

  • @erjdev
    @erjdev 3 หลายเดือนก่อน

    Super interesting seeing the layers comprising LSPs. Thanks again for the epic videos! Your style is fantastic and easy to follow.

  • @arlaxia
    @arlaxia 3 หลายเดือนก่อน

    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!

  • @ibzih
    @ibzih 3 หลายเดือนก่อน

    Such a great video, not only for LSP basics itself but also the Go learning aspect of it too. Thanks for the content :D

  • @iyousef46
    @iyousef46 3 หลายเดือนก่อน +4

    a few days ago tree-sitter and now an LSP, you are killing it :D

  • @bbfh-yt
    @bbfh-yt 3 หลายเดือนก่อน

    These tutorials are so great, simple, to the point and no bs just pure gold

  • @joseiedo
    @joseiedo 2 หลายเดือนก่อน +1

    I love this channel. Good work TJ!

  • @ev3rybodygets177
    @ev3rybodygets177 3 หลายเดือนก่อน +5

    damn teeej out here killing it since going full time. this content is 🔥

  • @tobiasweyer5063
    @tobiasweyer5063 3 หลายเดือนก่อน

    Just the perfect timing! I was looking into LSPs and also want to learn more GO. THX TJ.

  • @chrishipple4419
    @chrishipple4419 3 หลายเดือนก่อน +3

    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.

  • @sudonick-kn5zn
    @sudonick-kn5zn 3 หลายเดือนก่อน +1

    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!

  • @alexandersemionov5790
    @alexandersemionov5790 3 หลายเดือนก่อน

    the split personality approach to explain server to neovim communication is great. Very informative and Fun!

  • @iambasanta
    @iambasanta หลายเดือนก่อน

    This is so good, i'm gonna follow it step by step. Thanks TJ for this amazing content!

  • @RenteaRadu
    @RenteaRadu 2 หลายเดือนก่อน +1

    Thank you TJ, I really appreciate this type of content/topics!

  • @henriquefigueiredo4077
    @henriquefigueiredo4077 12 วันที่ผ่านมา

    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,

  • @normansoetbeer1350
    @normansoetbeer1350 2 หลายเดือนก่อน

    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!

  • @genderender
    @genderender 3 หลายเดือนก่อน

    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

  • @sp3ctum
    @sp3ctum 3 หลายเดือนก่อน +1

    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.

  • @RaniGiro
    @RaniGiro หลายเดือนก่อน

    Absolutely amazing video, tj really makes a complex topic like lsp and simplifies it. Great job!

  • @eulersson
    @eulersson หลายเดือนก่อน

    What a masterclass 😍 You are a very good communicator TJ.

  • @tamatotodile
    @tamatotodile 25 วันที่ผ่านมา

    Learned so much from you teej, thanks a lot for making this video! Looking forward to the treesitter one!

  • @twenty-fifth420
    @twenty-fifth420 3 หลายเดือนก่อน +3

    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.

  • @mahmoudayoub9168
    @mahmoudayoub9168 3 หลายเดือนก่อน

    Thanks for sharing this, it really helps to see how experienced devs work

  • @wesleylewis9140
    @wesleylewis9140 2 หลายเดือนก่อน +1

    Great video man. You made it look so easy and smooth!

  • @matez8355
    @matez8355 3 หลายเดือนก่อน

    wtf, crazy high quality content keeps coming out and in topics no one else is or even can teach people like TJ can

  • @andrewrush7667
    @andrewrush7667 3 หลายเดือนก่อน +1

    Thanks! You’ve made switching to Neovim so much easier due to your videos!

    • @teej_dv
      @teej_dv  3 หลายเดือนก่อน +1

      Wowowowow!! Thanks so much!!!

  • @TaiGroot
    @TaiGroot 3 หลายเดือนก่อน +3

    Thanks! I am just about to write one, perfect timing!

  • @rubinbhandari124
    @rubinbhandari124 3 หลายเดือนก่อน +3

    Damn the timing. I was looking for a golang project to refresh up on golang and this landed just in time.

  • @james.schubert
    @james.schubert 3 หลายเดือนก่อน

    This is a fantastic video. Thanks, TJ!

  • @ashleyspianoprogress1341
    @ashleyspianoprogress1341 2 หลายเดือนก่อน

    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

  • @catalinvoineag6344
    @catalinvoineag6344 2 หลายเดือนก่อน +1

    Please do more of these! They are great explainers :)

  • @TheTmLev
    @TheTmLev 3 หลายเดือนก่อน

    What a legend you are, TJ! Thank you

  • @Echiduna
    @Echiduna 3 หลายเดือนก่อน

    Love you TJ, you are always making such amazing content for us🥰

  • @kcin4206
    @kcin4206 3 หลายเดือนก่อน +1

    couldn’t agree more with the first sentence. great video 👍

  • @sbarrios93
    @sbarrios93 3 หลายเดือนก่อน

    By far your best video yet 🔥

  • @SalvaToroTorus
    @SalvaToroTorus 3 หลายเดือนก่อน

    Very cool topic, thoroughly and clearly explained, really good advice and Golang masterclass included.
    Thanks!

  • @hharcont
    @hharcont 3 หลายเดือนก่อน +5

    I was just looking for this, thank you so much Neovim Jesus!

    • @sp3ctum
      @sp3ctum 3 หลายเดือนก่อน +4

      He died for our vims 😂

    • @zozephdev
      @zozephdev 3 หลายเดือนก่อน

      @@sp3ctumI laughed at this a little bit too much xD

    • @sp3ctum
      @sp3ctum 3 หลายเดือนก่อน

      @@zozephdev ikr I have been laughing at it all day myself 🤣

  • @mrstopanimate
    @mrstopanimate 3 หลายเดือนก่อน

    Good stuff TJ!!!! This is so awesome

  • @francescarpi
    @francescarpi 2 หลายเดือนก่อน

    Thank you so much for this video. I learned a lot, and I'm excited to start tinkering with my own LSP.

  • @MarkAngelo-jl6vb
    @MarkAngelo-jl6vb 3 หลายเดือนก่อน +6

    i really like your videos, you explain really hard concepts very simple and easy to understand

    • @teej_dv
      @teej_dv  3 หลายเดือนก่อน +1

      Thanks! That's a really nice comment

  • @MattRobinsonDev
    @MattRobinsonDev 3 หลายเดือนก่อน

    Incredible as always

  • @albertobalsam2342
    @albertobalsam2342 3 หลายเดือนก่อน +1

    You are a great teacher. Learned a lot. Thank you, teej!

  • @hyltoncarboo8303
    @hyltoncarboo8303 3 หลายเดือนก่อน

    Man, this man doesn't miss!!

  • @Strawberry_Htet
    @Strawberry_Htet 3 หลายเดือนก่อน

    mannnn READ THE FRIENDLY MANUAL is now my motto because of you, teej

  • @chrisjames278
    @chrisjames278 3 หลายเดือนก่อน

    Great fun to follow along with, thanks!

  • @amzabdrahim3350
    @amzabdrahim3350 2 หลายเดือนก่อน

    beautiful content, this is real engineering! please keep going ! you are a great teacher!

  • @jorgeimo
    @jorgeimo 3 หลายเดือนก่อน

    Fantastic video TJ, thank you!

  • @cjjb
    @cjjb 3 หลายเดือนก่อน

    Love your content, man. Keep it up!

  • @FaintArt
    @FaintArt 3 หลายเดือนก่อน

    thanks and keep continuing to make such videos even though the audience size is less today.. it will be high soon

  • @jorgeandresnumamendoza258
    @jorgeandresnumamendoza258 3 หลายเดือนก่อน

    Activate subtitles please. Thank you so much. This is amazing.

  • @yourcringestepdad
    @yourcringestepdad 3 หลายเดือนก่อน +1

    This is great. Would love to see a follow up video explaining how the linters/type checkers/etc work too.

  • @EricPhillips89
    @EricPhillips89 2 หลายเดือนก่อน

    Very well presented, awesome video!

  • @DouglasGubert
    @DouglasGubert 3 หลายเดือนก่อน

    This is absolutely amazing, made me feel ready to take my skill issues to golang once more!

  • @atxorsatti
    @atxorsatti 2 หลายเดือนก่อน

    Thank you
    Thank you thank ypu thank you
    Thank you
    Thank you
    We need more content creators like this
    Take notes pls

  • @ForeverZer0
    @ForeverZer0 3 หลายเดือนก่อน

    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.

  • @akshettrj
    @akshettrj 2 หลายเดือนก่อน

    You are a really good teacher 😊

  • @ghun131
    @ghun131 3 หลายเดือนก่อน

    I need 2 months to learn Go then I'll return to this video. So exciting!!!

    • @stefanalecu9532
      @stefanalecu9532 3 หลายเดือนก่อน +1

      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

  • @sweetbabyalaska
    @sweetbabyalaska 3 หลายเดือนก่อน

    You're a really good teacher.

  • @anakinsonone
    @anakinsonone 2 หลายเดือนก่อน

    After installing quite a few LSPs, I became curious about what exactly an LSP is. So, I opened TH-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. TH-cam seems to be reading my mind in real-time.

  • @droid806
    @droid806 3 หลายเดือนก่อน

    Man, I always fall asleep during your streams, but these presentations... Oh yeah, they're literally becoming part of World Heritage now.

  • @burakyildiz8921
    @burakyildiz8921 3 หลายเดือนก่อน

    Great teaching formation! Great content! Thank you.

  • @CheezePie
    @CheezePie 3 หลายเดือนก่อน

    Probably the best LSP guide on TH-cam! Love your content man❤
    Honestly, I was scared of the documentation😅
    Now I feel confident enough to RTFM
    Thanks Teej😁

    • @stefanalecu9532
      @stefanalecu9532 3 หลายเดือนก่อน +1

      Teej made the manual friendly for everyone

    • @CheezePie
      @CheezePie 3 หลายเดือนก่อน

      @@stefanalecu9532 True!

  • @dieduch
    @dieduch 3 หลายเดือนก่อน

    Thank yooooou, you are an inspiration TJ ❤

  • @oluwatobitobias
    @oluwatobitobias 3 หลายเดือนก่อน

    Very great work..., Sir

  • @mrshodz
    @mrshodz 2 หลายเดือนก่อน

    Excellent video.

  • @MatyyRdk
    @MatyyRdk 3 หลายเดือนก่อน

    This is great, more videos like this, please!

  • @adampaul7905
    @adampaul7905 2 หลายเดือนก่อน

    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.

  • @theondono
    @theondono 3 หลายเดือนก่อน

    Teej not only told us to RTFM, he also made a video because he knew we’re not going to RTFM anyway. Thanks Teej

  • @alikin
    @alikin 3 หลายเดือนก่อน

    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!

  • @kajuken
    @kajuken 2 หลายเดือนก่อน

    More content like this please.

  • @maximofernandez196
    @maximofernandez196 3 หลายเดือนก่อน

    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

  • @Gordolone
    @Gordolone 2 หลายเดือนก่อน

    Awesome video Teej! loved it! keep up the amazing work

  • @kaandesu4881
    @kaandesu4881 3 หลายเดือนก่อน

    this is golden, thanks a lot!

  • @marcarlotuico5449
    @marcarlotuico5449 3 หลายเดือนก่อน

    thanks TJ GEM!

  • @f_48irfanshaikh29
    @f_48irfanshaikh29 3 หลายเดือนก่อน

    great video loved it 🤟

  • @FruchteisMitErdbeer
    @FruchteisMitErdbeer 3 หลายเดือนก่อน

    Huh, this shows me that go actually seems to be a lot nicer to work with than I expected

  • @nzdude87
    @nzdude87 3 หลายเดือนก่อน

    I'll never forget that registered nurse tip. i always used to get those the wrong way around.

  • @weiSane
    @weiSane 3 หลายเดือนก่อน +2

    TJ with that shirt on you look like you should be chilling somewhere on a beach in the Caribbean or Hawaii 😂

  • @benjaminpapin4312
    @benjaminpapin4312 3 หลายเดือนก่อน

    super video!!

  • @metin4yt
    @metin4yt 3 หลายเดือนก่อน

    Great video, thanks ❤

  • @lallenfrancisl
    @lallenfrancisl 2 หลายเดือนก่อน

    I don't think there is a better video on building LSPs on the internet than this

  • @user-oc9yi4kg9n
    @user-oc9yi4kg9n 3 หลายเดือนก่อน

    this is amazing!

  • @clementdato6328
    @clementdato6328 3 หลายเดือนก่อน

    Your videos are so clear and educational ❤ much more superior to those random guys that work in big companies, such as netflix❤

  • @arbitrandomuser
    @arbitrandomuser 3 หลายเดือนก่อน +8

    I'm watching this video at 0.25x so i get to view that magnificent shirt longer.

    • @teej_dv
      @teej_dv  3 หลายเดือนก่อน +1

  • @user-ud9gr9ix8k
    @user-ud9gr9ix8k 3 หลายเดือนก่อน +3

    watching this feels so illegal. getting this education for free

    • @teej_dv
      @teej_dv  3 หลายเดือนก่อน

      you can always become a member of the channel ;)

  • @antonpodkur3520
    @antonpodkur3520 3 หลายเดือนก่อน

    Masterpiece!

  • @hermessantos5258
    @hermessantos5258 3 หลายเดือนก่อน

    THIS is art folks

  • @coffeeintocode
    @coffeeintocode 3 หลายเดือนก่อน

    Yesssss! More Gooooooo

  • @guitaripod
    @guitaripod 3 หลายเดือนก่อน

    Thanks, Sensei

  • @bbfh-yt
    @bbfh-yt 3 หลายเดือนก่อน +1

    Looking forward to a similar project for Tree-sitter

  • @user-ew7ol1pz5g
    @user-ew7ol1pz5g 3 หลายเดือนก่อน

    Amazing idea

  • @AlleBalle54
    @AlleBalle54 2 หลายเดือนก่อน

    banger shirt, video also pretty good

  • @hechuan5075
    @hechuan5075 3 หลายเดือนก่อน

    nice, my prayer has been answered