Tree sitter & LSP: Short Comparison

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 พ.ย. 2024

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

  • @jesseleite
    @jesseleite 3 ปีที่แล้ว +23

    TJ, you are a gold mine of info. Thank you for sharing this kind of stuff!

    • @teej_dv
      @teej_dv  3 ปีที่แล้ว +2

      My pleasure! 😁

  • @AntonHelm
    @AntonHelm 4 ปีที่แล้ว +16

    Thanks for the comparison on tree-sitter and LSP. I am not sure if it's just me ... but the end is the best. I feel unsatisfied or missing out on something ;)

    • @teej_dv
      @teej_dv  4 ปีที่แล้ว +6

      Well we ended up talking about more stuff on stream, but it didn't make sense to leave it all in the video.
      Sometime in the future, I will probably demo more things with tree sitter.

  • @xixiaofin
    @xixiaofin ปีที่แล้ว +5

    why it ends when the interesting part comes!?!?

  • @qwertyasdf7615
    @qwertyasdf7615 4 ปีที่แล้ว +5

    Great content man! ✌️

  • @Jeppelelle
    @Jeppelelle 4 ปีที่แล้ว +5

    I recently switched from ST3 to VIM (then nvim, thanks) & yesterday i stumbled upon a problem, can treesitter be configured to create custom multiline textobjects?:
    I wanted to copy just the query that was structured like this:
    ("
    SELECT
    epstein,
    did,
    not
    FROM
    kill
    ORDER BY
    himself
    ")
    Noticed that yi" did not work as i expected, after a quick googling i found out vim doesn't do multiline textobjects inside quotes (kinda weird since it can do it inside (){}[] etc etc) & i did not find alot of good solutions to my problem, so i did a big brain move & did yi( instead, great, now i can use ds" to get rid of the quotes, turns out, nope, surround also seem to rely on the built in textobjects
    So, is it worth me experimenting with treesitter & implement a way to include quotes into the list of multiline textobjects? Is that something tresitter can do?
    Also, i guess you guys will never ever add " to the (){}[] list of multilines/block objects in nvim since it's out of spec for VIM? (and i guess it would break to many peoples workflow/configs)

    • @teej_dv
      @teej_dv  3 ปีที่แล้ว +2

      I think there are plugins to do something like this. I suppose it's possible with tree sitter. You might want to check out either vim-surround, vim-sandwhich or maybe some other plugin that makes custom text objects. I think one of those would probably do what you're hoping for.
      Also, great example LUL

    • @Jeppelelle
      @Jeppelelle 3 ปีที่แล้ว +1

      @@teej_dv Thanks for the reply 👍
      I tested those but did not get them to work as i expected, i'm an idiot so thats probably why :D
      Anyways, eventually ended up with these plugins:
      Plug 'kana/vim-textobj-user'
      Plug 'kana/vim-textobj-indent'
      Plug 'beloglazov/vim-textobj-quotes'
      Works good enough for me now but not a big fan of loading/using 3 plugins for such a simple task but hey atleast it works ;)

  • @hellosagar
    @hellosagar 4 ปีที่แล้ว +2

    Thanks sir

  • @Volhybo1t
    @Volhybo1t ปีที่แล้ว +2

    do you do grep Vids

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

    thanks

  • @RaymondPeckIII
    @RaymondPeckIII ปีที่แล้ว

    Comparison: th-cam.com/video/c17j09vY5sw/w-d-xo.htmlsi=7SyimfUTqKutf4SY&t=215