LSP: Building a Language Server From Scratch

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ม.ค. 2025

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

  • @SRG-Learn-Code
    @SRG-Learn-Code 11 หลายเดือนก่อน +58

    To be honest, I'm not going to do this anytime soon but is a great insight into something really interesting and mostly hidden. Topic is nicely explained, tempo is awesome, voice is clear and well recorded and the video is great. Thanks for sharing.

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +4

      Thank you, I really appreciate the kind words.

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

      perfectly sums up my thought

  • @jeffreyhartman1633
    @jeffreyhartman1633 6 หลายเดือนก่อน +7

    This is fantastic! We use an old proprietary vendor language a lot at my job, and the only real IDE that supports it is nearing 20 years old at this point. Dove into writing my own lsp for it and this is the best thing I've found that made it all make sense. Thanks for the content!

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

      Thank you so much for the kind words! Best of luck with your language server

  • @doc8527
    @doc8527 11 หลายเดือนก่อน +24

    1. bootstrap a meme language by yourself based on whatever language you are familiar with.
    2. create a lsp based on this video.
    3. Then, host a website that has a simple editor with the lsp syntax highlight. Compile and run your meme language on the fly, even only contains the most basic and trivia functionalities.
    if you are able to go through the entire process, even with the help of all the online resources. You already beat 95% of bachelor + master degree CS students around the world. Even average SDE in most companies. I'm not joking.

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +5

      This sounds like a good way to learn a ton and sharpen your skills.

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

      Thanks, gonna try this in my vacations.

  • @yankee-in-london
    @yankee-in-london 11 หลายเดือนก่อน +10

    I have searched for LSP videos before and got only marginal quality but this morning -- right around when my first cup of coffee finished brewing -- your video just showed up in my feed and wow this is MUCH better content than I'd seen before. Great instructive style, great everything!

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

      Thank you so much for the kind words and for watching. It means a lot to me.

    • @yankee-in-london
      @yankee-in-london 10 หลายเดือนก่อน

      @@semanticart I thought it useful in your videos on LSP's was you didn't just use library to implement things. I think this helped comprehension but I do wonder if maybe you might follow that up with discussing some of the libraries (or deep diving into one) to show how one might move more quickly or maybe as a way to provide an overview of features/hooks that are used in some of the better LSP's out there. Secretly I'd love to see something in the Rustlang space to show how the LSP model can be implemented away from just JS but that may be moving outside your comfort zone or narrow your audience too much so I am fully not expecting that. :)

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

      @yankee-in-london Good questions. I definitely am putting the "from-scratch" stuff aside for awhile. I hope to have demonstrated the approachability of the LSP and want to get into building more exciting things with it.
      Deep dives into libraries is a good idea. I'd probably go with vscode-languageserver-node first since it is most widely used and I'm most familiar with it.
      I am curious about Rust and have worked through a couple books on it but I certainly don't consider myself seasoned enough to sit down and make a video without a lot of prep. Rust seems like it would be a good fit for developer tooling (once you get over the learning curve). I can't say if there's an audience or not, but I'm just a small TH-camr so I'm not overly worried about that part :)
      I think doing deep-dives on various language servers could be interesting. I did a video recently on adding Neovim support for a non-standard method used by ruby-lsp. It'd be fun to dig deeper into how different language servers implement things (standard and non-standard).
      I love the suggestions. Feel free to keep them coming. I'm always looking for new ideas. Have a great day!

  • @warro-jg2yq
    @warro-jg2yq 11 หลายเดือนก่อน +4

    what a coincidence! i started having to create a ls for work and this video is pure gold. keep up the great work!

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +2

      What fortunate timing :) Can you say more about what you're building in your LS?

    • @warro-jg2yq
      @warro-jg2yq 11 หลายเดือนก่อน

      @@semanticart its about a very old dsl. i want to create a webapp, powered by the monaco-editor, that can provide some dsl-specific features. but setting up the monaco-editor with a clientside ls isnt as straightforward as i thought xd

    • @warro-jg2yq
      @warro-jg2yq 11 หลายเดือนก่อน +1

      my initial plan was to create an language-server class that gets gets passed io/ everything else relevant into its constructer and to write a bunch of glue-code to make it work inside a webworker, but getting the interface with monaco in a browser-environment to work seems kinda difficult for me

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

      ​@@warro-jg2yq What an interesting idea. I haven't thought of running an LS in an editor in a browser but if extensions work generally, then you might be able to make it work. The big question in my mind is how you'd handle the server running as a separate process. That seems tricky in that environment. 🤔I wonder if you might find it easier building a general use LS and publishing it as an NPM package. That LS could export functions that you could call directly from an extension (rather than running a separate process). Everyone would get all the LS goodness for local dev and you'd be able to re-use your functionality for the in-browser editor.

    • @warro-jg2yq
      @warro-jg2yq 11 หลายเดือนก่อน +1

      extensions dont work (atl its not straightforward without a bunch of additional code), but theres a lsp-compliant bridge called monaco-languageclient that should work. as for the second process: webworker do run on a seperate thread, so if my ls-class was implemented correctly, everything should work quite smoothly

  • @jessekelly8625
    @jessekelly8625 11 หลายเดือนก่อน +10

    Fantastic tutorial!! I would love to see more material like this.

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      Thanks, Jesse! I think I’ll have to do a follow up soon 😁

  • @ofeenee
    @ofeenee 11 หลายเดือนก่อน +7

    Please continue. I’m trying to create my own language/framework compiler and I’ve always wanted to know how to do this. I’d very much love a deep deep dive into the subject! Thank you very much for making and sharing this video. 🙏🙏🙏

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

      Thanks! Next video in this series is coming soon. I truly appreciate the kind words. Please let me know how your language turns out.

  • @frroossst4267
    @frroossst4267 11 หลายเดือนก่อน +4

    I tried to create my own LSP a few months ago, but ended giving up on it due to the lack of tutorials and good resources on it and lackluster documentation. This might help me restart the project, thank you for making this!

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      You can do it! Thanks for watching. Please let me know where your project ends up.

  • @ZAcharyIndy
    @ZAcharyIndy 11 หลายเดือนก่อน +7

    Please continue.
    I'm struggle to create LSP for certain frameworks and libs that not so popular but useful for me.
    🥺

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +4

      You got it! I'm working on the next video right now. 😉

  • @arsenbabaev1022
    @arsenbabaev1022 11 หลายเดือนก่อน +1

    Managed to connect the client example with my server written in Rust. First time using js / ts, didnt expect it to work without any issues.

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

      That's awesome, Arsen! Best of luck with your exploration here :)

  • @SirNoire
    @SirNoire 11 หลายเดือนก่อน +1

    Wow, thank you recommendation gods! Thank you for this, not many videos on this and the oens that do exist are kinda old. And your speaking voice and explanation style are awesome! Thanks!

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      Thank you so much for the kind words and for watching! Have a great day

  • @ilyukchiljin7640
    @ilyukchiljin7640 6 หลายเดือนก่อน +2

    this is cool! I'm planning on writing a toy language + compiler for it in golang, and an LSP will be a great addition to the project. Thanks for the awesome video, hope I get to see more contents on this channel!

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

      That's awesome! LMK if you end up publishing that LSP, I'd love to take a look. I'm getting into Go, so I'm sure to have some future LSP+Go content here.

  • @DrowzeGarkenos
    @DrowzeGarkenos 10 หลายเดือนก่อน +1

    Fantastic content! I'll slowly follow along later this week. Thanks a LOT for the great LSP content!

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

      Thank you for the kind words and have fun following along 😀

  • @MrKeebs
    @MrKeebs 11 หลายเดือนก่อน +2

    You were able to condense and distill what I thought was a pretty complex topic enough to make it look extremely simple. Thank you so much for putting this together!

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      You're very welcome, thanks for watching!

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

      writing software isn't hard, these days, it's building the goddamn software lmao.

  • @ZeroRegretz
    @ZeroRegretz 11 หลายเดือนก่อน +1

    Where was this video when I needed it last year. Great video!

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

      Glad you enjoyed it!

  • @thedevconnor
    @thedevconnor 11 หลายเดือนก่อน +4

    Thank you for doing this. I have been working on developing my own language and have been struggling to make an lsp. This video is great, again thank you!

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      That's awesome, Connor. Feel free to drop questions here if you have any. I'd love to see a link to whatever you build. 😃

  • @roylee6889
    @roylee6889 11 หลายเดือนก่อน +1

    Perfect tutorial, I am plan to build my own LS then this video come out, great ~
    Please continue on making these amazing videos.

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

      Thanks, Roy! I'm working on the third video now :)

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

      And please let me know when your LS is available, I'd love to check it out

  • @ContainedBlargh
    @ContainedBlargh 11 หลายเดือนก่อน +1

    Thank you so much for this tutorial!
    I had been thinking of adding syntax highlighting / code completion for vscode, but I ended up opting for notepad++.
    Well, your tutorial made me confident that I could easily add some basic functionality to vscode for my language and now it's already a little better than just syntax highlighting.
    Though, I have to admit, I ended up using your `Minimum Viable VS Code Language Server Extension` as my starting point, rather than writing it from scratch like in your video.
    But, you do a really good job of revealing what's happening behind the scenes!

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

      You should absolutely use the MVP extension rather than starting from scratch. If I were just concerned with building instead of teaching, I'd be leaning heavily on "vscode-languageserver" and "vscode-languageserver-textdocument" (which the MVP uses).
      Good luck and let me know what you build :)

  • @WesleyEgberto
    @WesleyEgberto 11 หลายเดือนก่อน +1

    Really great tutorial! Very simple and well explained.
    This video should be linked in the LSP docs.

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

      Wow, thanks! What a compliment :)

  •  11 หลายเดือนก่อน +1

    This was a cool walk through. I failed looking at LSPs before, and now I was able to set one up, following along. Nice work!
    If you do a follow up, I'd be happy to follow along making an LSP for some language that isn't already available IRL.

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

      Thank you for the kind words. I'm definitely interested in tackling an unrepresented language. Do you have any suggestions that you think might be compelling?

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

    Excellent tutorial. Thanks for sharing and please keep this series up! I hope there will be video talking about implementation of some common lsp capabilities like textDocument/definition or textDocument/reference.

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

      Great suggestion! That might be good fodder for the next episode. Thanks!

  • @dev_danny
    @dev_danny 11 หลายเดือนก่อน +1

    Amazing work! Exactly what I'm looking for right now. Can't wait for the follow up :)

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

      Thank you!

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

    The only typescript video you ever need.

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

      😄 Cheers!

  • @skydwlr
    @skydwlr 11 หลายเดือนก่อน +1

    thank you so much for making this, would love to see more.

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

      More to come! Working on the follow-up right now.

  • @conrad6071
    @conrad6071 11 หลายเดือนก่อน +2

    finally someone makes contents on this topic

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

      There's more on the way :)

  • @SnoozeDog
    @SnoozeDog 11 หลายเดือนก่อน +1

    Great stuff, dont usually see in depth for this topic

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

      Thanks for watching!

  • @daviddawkins
    @daviddawkins 11 หลายเดือนก่อน +1

    Excellent content, and well presented! Thank you.

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

      Thanks for watching, David. I'm glad you enjoyed it!

  • @mohamedtalaatharb2441
    @mohamedtalaatharb2441 11 หลายเดือนก่อน +1

    I enjoyed that tutorial, really interesting stuff.
    I plan to keep it in the back of my mind when building my own stuff.

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

      Great to hear. Thank you!

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

    Simply an amazing video! Thank you so much for making this!!

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

      My pleasure! I'm glad you enjoyed it :)

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

    Good job! Printing 5MB dictionary to console for every completion was hilarious haha

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

      😄 I'm glad you enjoyed it

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

    really great video , one of the best recorded videos in my opinion

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

      Thank you, Serizon! I'm glad you enjoyed it. You might also like the follow-up video: th-cam.com/video/t1nI8i-D4oM/w-d-xo.html

  • @jimshtepa5423
    @jimshtepa5423 11 หลายเดือนก่อน +1

    very very good presentation. thank you for your time!

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

      My pleasure, thank you for watching!

  • @blacklistnr1
    @blacklistnr1 11 หลายเดือนก่อน +2

    0:10 I don't think I've ever heard "Typescript" and "no dependencies" in the same sentence :))

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      Hahaha. It is definitely all relative 😁 Carl Sagan once said, “If you wish to make an apple pie from scratch, you must first invent the universe.” So the whole "From Scratch" thing is a bit of a misnomer, no matter how you look at it.

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

      @@semanticart The stdout approach was definitely my cup of "From Scratch"

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

      I'm glad to hear it :)

  • @OverWilliam
    @OverWilliam 11 หลายเดือนก่อน +2

    This is fantastic. Please keep going!

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

      Thank you for the encouragement!

  • @incognitohacks4850
    @incognitohacks4850 11 หลายเดือนก่อน +1

    Thank you for this, I always wanted to create a language server but I could never understand fully how it works.

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

      You're very welcome!

  • @darkarie
    @darkarie 11 หลายเดือนก่อน +1

    Amazing content! It would be so nice to see a tutorial of building an LSP with another language like Go or Rust

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      Thanks! I’ll keep that in mind.

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

    Awesome vid, just what I needed!

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

      Glad it helped!

  • @alexmeta6314
    @alexmeta6314 9 หลายเดือนก่อน +2

    Great content! Is it possible to create a language server or, alternatively, connect to a language server from a web-based code editor?

    • @semanticart
      @semanticart  9 หลายเดือนก่อน +1

      Thank you. It is possible but it is trickier and depends on the execution context of the editor, etc. It is outside my area of expertise but I know that twitter.com/PaoloRicciuti has done this for www.sveltelab.dev/ with some combination of Codemirror and/or webcontainers.io/
      He's a nice chap so I'm sure he'd be happy to give you a few pointers.

  • @victorob
    @victorob 11 หลายเดือนก่อน +1

    This was great content!

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

      Thank you and thanks for watching!

  • @guibibi
    @guibibi 11 หลายเดือนก่อน +2

    Loving this tutorial, very well explained and with a great tempo.
    One quick question, is there any reason why you are declaring all the interfaces instead of importing them from the "vscode-languageserver" package?

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      Thanks for the kind words!
      Good question about the types. I have two main goals there: 1. to keep the "from scratch" approach of not having dependencies on any pre-existing LSP libraries and 2. to help teach people where they can find the types in the docs (which I hope will help people feel more confident about their ability to learn the LSP _and_ help people who aren't in the TS/JS ecosystem and can't use vscode-languageserver).
      There's a tertiary goal to constrain them a little for our purposes (e.g. in the follow-up video, the official types have `data` as optional on the Diagnostic but in our language server we _always_ want to include data) but obviously I could accomplish that by amending the vscode-languageserver types.

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      In the real world, you should absolutely use vscode-languageserver if you're in the JS/TS ecosystem :)

    • @guibibi
      @guibibi 11 หลายเดือนก่อน +1

      @@semanticart Makes sense! Thanks for the tutorial, just finished part 1 and attacking part 2 now.

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

      @@guibibi Awesome. I hope you enjoy!

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

    Interesting, gonna watch it...
    edit: adding comment, so that I can be notified even though I forgot to watch.

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      Let me know how you enjoy it :)

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

    Great tutorial. Love stuff like this!

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

      Glad you liked it! More to come 😎

  • @elliotalderson6609
    @elliotalderson6609 11 หลายเดือนก่อน +1

    whoever wondering what language you should create LSP for, here are advises: LDIF, ASN.1

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

      Interesting. I wonder how many people are editing these by hand (versus generating them) 🤔

    • @elliotalderson6609
      @elliotalderson6609 11 หลายเดือนก่อน +1

      I may not know something but ASN.1 is exactly for ability to generate "from" and not "to". Writing LDAP queries in LDIF I bet happens more frequently but the point is that when you write a query for adding a new record to LDAP DS you want to see available object classes and attributes in schema which is defined in ASN.1

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

      Gotcha. I'm definitely not knowledgeable in this space.

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

    This is awesome, thank you!

    • @semanticart
      @semanticart  4 หลายเดือนก่อน +1

      You’re welcome! Thanks for watching

  • @luandkg
    @luandkg 11 หลายเดือนก่อน +1

    Wow, this is insane 🤪🤪🤪 please continue

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

      Thank you! Stay tuned, I'm working on the follow-up now.

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

    Ouh yea thank you sooo much. I need to build one and this will give me a good start I guess.

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

      Good luck and have fun!

  • @thechosenzendro
    @thechosenzendro 11 หลายเดือนก่อน +1

    Awesome video!

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

      Thank you so much

  • @Ashish_singh_dev
    @Ashish_singh_dev 11 หลายเดือนก่อน +1

    Awesome content 🔥, what would be approriate to optimize it further debounce or throttle on server side so that we send results of abc not a, ab and abc?

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

      Great question! I'd try debouncing. To make it work, you'll need to introduce global state to keep track of pending completion requests and then selectively reply to them. In your example, after the debounce period expires, you can reply to `abc` with completions and you can reply to the requests for `a` and `ab` with `null`.
      The client should re-request completions for `null` responses, so if the user later types `ab` it'll request it again and you can provide the completions you skipped before.
      Related: You might want to cache completions if they're expensive to calculate and don't change.

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

    Jonathan Blow loves this video

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      🤔I don’t get the reference.

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

      th-cam.com/video/ZpGWzV9iJV4/w-d-xo.html @@semanticart

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      hahaha. Amazing. Thanks for sharing

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

      @@semanticart I thought it will be funny 😅 seems quite interesting the video, I want to watch it to finally know what LSP are about

  • @michaeletzkorn
    @michaeletzkorn 11 หลายเดือนก่อน +1

    5:32 is this just an alias for git add patch using vimdiff or something? I really like this way of committing

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

      I currently use "git diff -w ." and then add each file manually. I definitely should switch to an alias like this 😅

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +2

      Good question! `add` is an alias I've set up for `git add --intent-to-add .; git add -p`. It lets you stage changes in parts for each changed file (including newly added files that aren't under git yet - that's the intent-to-add part). I like this approach because it lets me review and confirm each change. I can (e.g.) choose not to stage `console.log` debugging lines etc.
      The prettier diffing is via github.com/dandavison/delta

    • @michaeletzkorn
      @michaeletzkorn 11 หลายเดือนก่อน +1

      ​@@semanticartthanks for the reply! nice little tool for the arsenal 😊

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

    Thanks for the video! Any chance the next video could explain the library instead of writing everything from scratch? Regards

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

      You're welcome. I'll think about that one. Stay tuned!

  • @hankhsu1996
    @hankhsu1996 11 หลายเดือนก่อน +1

    Want to know the real-world completion suggestion algorithm, based on the scope and the syntax, maybe even incomplete code. I'm trying to build some LSP, but the language is just too complicated.

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

      I don't have any great resources or offhand knowledge about this, but it feels like a potentially good topic for a future video.
      In the meantime, to provide suggestions based on syntax and scope, you might want to look at something like treesitter or other grammar parsers to help you get a syntax tree you can use to inform your completions.
      Good luck and thanks for subscribing!

  • @elpiruwebmaster
    @elpiruwebmaster 11 หลายเดือนก่อน +1

    Great content 👌👌👌

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

      Thank you 🙌

  • @samuel.00
    @samuel.00 11 หลายเดือนก่อน

    Great video! Only comment I'd make is that your audio is a bit quiet, especially at the start.

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

      Noted, thanks. I'll do some digging and try to find a good guide on TH-cam audio. I'm still figuring all this out 😅

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

    Very helpful 💪💪

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

      Glad you think so! Thanks for watching

  • @eliancordoba1199
    @eliancordoba1199 11 หลายเดือนก่อน +1

    You rock!

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      Thanks for watching, Elian!

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

    I'd be far more interested and impressed in doing the reverse; creating a code editor that can use arbitrary LSP's. I created a full-fledged editor over a week in the summer but never could get an LSP client implementation going.

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

      Building an entire text editor isn't something I'm interested in but I do hope to build a client in an upcoming video for doing black-box testing. The idea is that you script requests/notifications from the client and make assertions on the responses from the server.

  • @ChrisGruel
    @ChrisGruel 11 หลายเดือนก่อน +2

    I love this content and I would love to be able to help support the creation of your content maybe through a TH-cam channel subscription or Patreon.
    I loved the stuff on LSP and the command line tools like entr and the other json CLI from jq

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

      Chris, wow, that is _super_ kind of you. I'd love to figure out ways to devote more time to this content. I'll be in touch if I get a Patreon off the ground or add TH-cam Memberships/Subscriptions.
      Thanks again!

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

    Hey I know it's been a few months, but this video has been really helping me become more familiar with LSP. I am building a language server for my internship. I was wondering if you have any idea why I am getting an error "The language server is either not installed, missing from PATH, or not executable." in neovim. Everything else worked flawlessly! Thanks!

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

      Thank you for the kind words. This is a good question. There's a few things that can go wrong here. First I'd check to see if running the `cmd` for the `vim.lsp.start` runs fine when you run it directly from the terminal (it shouldn't do anything, but it should sit there waiting for input without crashing). If that works, then your neovim probably doesn't have the same $PATH setup as your terminal and you can pull on that thread (or specify absolute paths, etc). If that didn't work, then hopefully it exited with a helpful error message.
      Let me know how it goes!

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

      @@semanticartThanks for the quick reply! I confirmed that running the command "npx ts-node " did kick off the server. I am on Windows and have never used neovim before so it may be something with my neovim config or something. I didn't mention at first but the error message also includes "Spawning language server with cmd: {"npx", "ts-node", "" failed." So it is successfully trying to spawn it with (seemingly) the right command. I don't know where to look for more details on the failure. (like a neovim error log file or something?)

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

      @@PriZ0nM1ke try this. Hit colon to get into command mode and do !npx ts-node and hit enter. See if you get any helpful message from that.

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

      @@semanticart It runs the file (I put a console.log() at the start to confirm) but doesn't hang like in a terminal. Doesn't throw any errors as far as I can tell.

    • @semanticart
      @semanticart  5 หลายเดือนก่อน +1

      @@PriZ0nM1ke Hrm. Check the lsp log file (get the name via `:lua =require('vim.lsp.log').get_filename()`). You can also set `vim.lsp.set_log_level("DEBUG")
      ` BEFORE starting the language server to (hopefully) get more info

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

    Is it required to use typescript instead of another programming language ?

    • @semanticart
      @semanticart  5 หลายเดือนก่อน +1

      No. You can write one in literally anything. Here's a very boring example I wrote in bash: prefab.cloud/blog/writing-a-language-server-in-bash/

  • @SaidYeter-j1w
    @SaidYeter-j1w 11 หลายเดือนก่อน +1

    I have no project that will use this. BUT I m thinking new project that will use 😄

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      Right on! This is inspiring technology and I'm glad to see you're inspired.

  • @valiantvirus
    @valiantvirus 11 หลายเดือนก่อน +5

    only 421 subscribers, lemme fix that

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      haha, thank you :)

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

    this is awesome.
    though it would probably be more reasonable to do this in a backend language like C / Zig.

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      Maybe. I'm just interested in teaching the concepts of the LSP. :)

  • @binofrancis1952
    @binofrancis1952 11 หลายเดือนก่อน +1

    Nice😊

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

      Thank you! Cheers!

  • @darkarie
    @darkarie 11 หลายเดือนก่อน +1

    By the way it could be really nice to get the time stamps of the video.

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      Totally. They’re in the description and I’ve tried a half dozen tweaks but TH-cam isn’t showing them on the video. Google suggests there’s a bug afoot. It worked in the preview before I posted it. 😢

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      Good news, the chapters are working now!

    • @darkarie
      @darkarie 11 หลายเดือนก่อน +1

      @@semanticart Amazing!

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

    1/3 part of video is about typing shit I try to understand.. thx very appropriate

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

      Keep trying. You can understand it. I believe in you.

  • @desertfish74
    @desertfish74 11 หลายเดือนก่อน +1

    volume level is super low

    • @semanticart
      @semanticart  11 หลายเดือนก่อน +1

      Thanks for the heads up. I’m doing some research to fix it for the follow-up video

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

    LSP in Java, C# and even PHP: The Liskov Substitution Principle
    LSP in Golang: Language Server Protocol

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

      Not sure if you're trolling or not, but this video has nothing to do with Golang. Also, there are language servers for Java, C#, and PHP.

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

    Who else looked up what a Zyzzogeton is after spotting it in the wordlist xD

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

    I use neovim because I am a beginner 😂

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

      haha. I LOVE neovim and use it for my daily editor. You're in good company

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

    Wow, I just built a LSP from scratch! Thank you! I couldn't get nvim to attach with just your code, but watching TJ's video with the vim.api.nvim_create_autocmd did the trick. Reference video with timestamp: watch?v=YsdlcQoHqPY&t=1915s

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

      Right on, congrats! And I appreciate the heads-up about attaching.