Magically format embedded languages in Neovim

preview_player
Показать описание
We use tree-sitter, lua & python to format embedded SQL strings into #neovim . You'll learn how to combine these building blocks in interesting ways to be able to do this for a bunch of languages or projects that you have!

Plugins:

Рекомендации по теме
Комментарии
Автор

Programming is Cool. Also, just in case you didn't catch it, "Rust".

joeycozza
Автор

Loving these more advanced videos! Good stuff!

ronniemagatti
Автор

Thanks TJ, keep it up!
I don't imagine myself writing treesitter queries anytime soon, but who knows, I didn't think I'd move from the way my vimrc was, and now my whole config is in lua.
נאו-ווים זה מגניב!

mosheavni
Автор

Loving these. Treesitter is a game changer

notgate
Автор

This is awesome. Thanks TJ. Was great to watch this live as well. Would love this to be expanded on in upcoming videos

chrisjames
Автор

This kind of stuff makes in depth configuration and plugin writing so much more approachable! Thanks a ton and keep it up!

scottiedoesno
Автор

Awesome in every sense. Your videos are always very well structured and it is always a pleasure to watch and listen. It takes so much different aspects to achieve this. I really appreciate your commitment.

davidstadelmann
Автор

As usual - damn great video. It would be great if things like this will expand to some kind of "LUA?? NEOVIM?? YES - treesitter usage guide & examples with RUST BTW" series. Can't wait for it.

syswow
Автор

Thanks! TJ!

Question: for work I'm on a MacBook (traditionally Linux but you know), having trouble with mac's version of cmake which forces me to use brew (meaning no nightly version on the Mac).

Any suggestions (also, I'm on an m1, arm arch).

Thanks in advance!

Also, at least on my journey, seeing potential for heredocs! (Neovim is cool)

nkodoko
Автор

Wow amazing, I was searching these kind of videos my whole life ! Thanks TJ

alexwexov
Автор

Omg this was unthinkable in vim a couple of years ago.. amazing! Thank you for showing the possibility and the how of this dark magic

albertlee
Автор

This is mind bogueling, thank you so much TJ to make those videos <3 Now Imma go "lose" way to many hours to play with that hahaha

arnaudf.
Автор

Love this so much. I'm going to go and adapt this concept to the SQL queries in a Go project, see you on the other side

nodidog
Автор

I very much enjoy your videos, always something to learn - thank you. I am intrigued to find out what color scheme you use, I really like it!

rubensiotaperez
Автор

You're videos are super helpful! Thank you! Like button smashed!

jefmyers
Автор

Neovim é foda! Parabéns pelo trabalho! :D

ricardokullock
Автор

In SF. Big fan, TSPlayground blew my mind. I gotta switch to nvim from vim, now. I have spent hours and hours reading through vim help pages (and 2 books - practical vim & learnvimscriptthehardway (ok this is a website)). I have written a few small cute little plugins in old vimscript. Including a clone of the “execute from one buffer and put it into another”.

The plugin I’m most proud of is one that defines a grammar to [tab]edit or source your config files (ftplugin, syntax, vimrc, current, etc.)

I enjoyed it all, but it was also a lot of work. I am slowly coming to accept that the native treesitter bindings are just… it’s unbeatable. As I learn more about neovim, it becomes the first time in my life where I’m starting to see stuff that I can’t think of how to do in vim and I think that I know enough to confidently say “this cannot be done trivially”.

I could write an external program that does this… filters the whole file & formats the SQL - it would probably even use treesitter. The results would be the same - but it wouldn’t be part of my text editor. But to have first class support for stuff like this, the interactive building of the query - instead of having to copy paste example code into the treesitter web app (idk if they even have a query builder but they certainly do - that’s too useful not to) - so fast. So clean. So powerful.

Now begins the arduous and slow journey of … I just gotta learn the available commands. See y’all in 100 in-documentation hours! :) I will enjoy the journey

arisweedler
Автор

I'd be curious to see if TS could still detect the SQL string if it was stored in a constant variable instead of directly in the query func. Damn I guess have to go try that for myself..

Martinni
Автор

Thanks for this video, much better than reading docs!

davidsicilia
Автор

We need more tree sitter stuff, that was soo cool.

Unaimend