Same - I used to solve it by just opening vim specifically for big file as it would take foreeeeever to read it through nvim. Now i dunno if that's only because of treesitter, but it certainly wouldn't help
@@GOTHICforLIFE1 Yeah, it was because of treesitter. Tresitter tries to parse such absrudly complex piece of code and understandably it struggles to do so. This is why Tresitter needs the option in it's config to to define after which size threshold it should stop run the analyze I tried several plugins that intended to do so, but they didn't work for me
Great vid (btw), treesitter queries were exactly what I wanted to learn more about for a while now and I like how you explained them and showed their application. I told myself that I won't reconfigure Neovim until doing a new one while learning NixOS, buuuuut your videos have been giving me the urge to do it either way haha
In terms of errors all over code, my favourite feature of Neovim is that the LSP error messages only come up in normal mode. I can happily type away in insert mode without the distractions, as if I'm using basic vim, then see errors to fix when back in normal mode. It's so nice, VS Code irritated me by putting big ugly lines everywhere while I'm typing.
Hey Teej, couple of questions from about 9:50 onwards: 1. Is the person writing the grammar for a language responsible for providing a highlights.scm? Or is that the responsibility of the author of a colorscheme? 2. If I were to write my own grammar, should I try to match the naming convention and structure found in other grammars? Or is that only really relevant for those things that start with the @ sign? Is there a specification for those or would I just use :InspectTree and :Telescope highlights and try to match what's already being used? 3. If the language I'm building parsing/highlighting for has a certain feature that isn't accounted for by a colorscheme I install, does that mean I as the grammar author have to make a new highlight group for that and link it to something the colorscheme does define? (And therefore an additional plugin with those highlighting rules is required to use the language?) Basically, if you could shed some light onto what is expected to be provided by the grammar, by the nvim-treesitter plugin and by a colorscheme, that would be awesome. Thanks :)
also, treesitter.nvim require enabling. what happens when you enable it ? does it take over ? if so there's a huge waste in letting the first highlighting happen and then later on enable treesitter to take over. treesitter should take over from the start. or there should be some way to disable all builtin highlighting "before" enabling treesitter.nvim. that way the highlighting work is left entirely to treesitter and there's no time wasted on an initial highlight that later gets overwritten
I just noticed this last week but when I started out with Vim around December last year, I'd looked into tree-sitter and saw that most of the project was written in C. But when I recently checked it out again after moving up to Neovim, the entire tree-sitter codebase was in Rust! Did it get re-written?! WHen?! Or am I going crazy?
@@oserodal2702 Ok yeah, I went back and checked it _properly_ this time. Most of the Rust code is from the tree-sitter CLI. Which makes a lot more sense to me since Rust is pretty good for that kind of thing.
Something: does anything
Teej: “this says HEY! …”
lmao I also noticed
Been using neovim for years, never thought I'd learn so much from this. Such a great series!
Yup! I'm here for the TJ energy and the random nuggets that get sprinkled in. Excited for later videos!
Teej and VIM, sitting in a tree...
P-A-R-S-I-N-G
Ha!
that's gold
Teejsitter
@@AG-ur1ljLOL that’s amazing
I love how tj intentionally slows down his pace to dumb things down :) thanks for all the great content
8:48 - Jeeez I needed that for a long time. Especially for minified bundled files. Thank you
Same - I used to solve it by just opening vim specifically for big file as it would take foreeeeever to read it through nvim. Now i dunno if that's only because of treesitter, but it certainly wouldn't help
@@GOTHICforLIFE1 Yeah, it was because of treesitter. Tresitter tries to parse such absrudly complex piece of code and understandably it struggles to do so.
This is why Tresitter needs the option in it's config to to define after which size threshold it should stop run the analyze
I tried several plugins that intended to do so, but they didn't work for me
You are incredible at explaining things ! Love it.
Nice video, appreciate it TJ
Thanks for covering the basics for all us mortals
Great vid (btw), treesitter queries were exactly what I wanted to learn more about for a while now and I like how you explained them and showed their application.
I told myself that I won't reconfigure Neovim until doing a new one while learning NixOS, buuuuut your videos have been giving me the urge to do it either way haha
these videos will massively increase the neovim nerds population
Love this series. And the thumbnails!
Teej uses such a nice an easy way to explain things that everything looks easy and interesting. This is a great talent
downloaded all the videos, watching locally on VLC, but came here to press the like button and give this comment, thanks TJ!
Thanks TJ! Very cool!
Thanks for making this series!
In terms of errors all over code, my favourite feature of Neovim is that the LSP error messages only come up in normal mode. I can happily type away in insert mode without the distractions, as if I'm using basic vim, then see errors to fix when back in normal mode. It's so nice, VS Code irritated me by putting big ugly lines everywhere while I'm typing.
I never comment on videos, but Tj, you are the best, thank you so much!!
This one was really interesting, thanks TJ
Thanks so much for this serie
This was the first video I watch for 10 minutes and end more confused than when I started
loving this series. At the root of the christmas tree, a star is sitting. (that's TJ)
Treesitter and LSP (well and Lua) really is the secret sauce that makes neovim neovim.
1:39 this is a personal attack lil bro
Hey Teej, couple of questions from about 9:50 onwards:
1. Is the person writing the grammar for a language responsible for providing a highlights.scm? Or is that the responsibility of the author of a colorscheme?
2. If I were to write my own grammar, should I try to match the naming convention and structure found in other grammars? Or is that only really relevant for those things that start with the @ sign? Is there a specification for those or would I just use :InspectTree and :Telescope highlights and try to match what's already being used?
3. If the language I'm building parsing/highlighting for has a certain feature that isn't accounted for by a colorscheme I install, does that mean I as the grammar author have to make a new highlight group for that and link it to something the colorscheme does define? (And therefore an additional plugin with those highlighting rules is required to use the language?)
Basically, if you could shed some light onto what is expected to be provided by the grammar, by the nvim-treesitter plugin and by a colorscheme, that would be awesome. Thanks :)
7:25 Use gg=G to indent the file
Wonderful!
Thank you TJ
09:18 what component was providing the syntax highlighting before you installed treesitter.nvim and how does it not clash with treesitter ?
also, treesitter.nvim require enabling. what happens when you enable it ? does it take over ? if so there's a huge waste in letting the first highlighting happen and then later on enable treesitter to take over. treesitter should take over from the start. or there should be some way to disable all builtin highlighting "before" enabling treesitter.nvim. that way the highlighting work is left entirely to treesitter and there's no time wasted on an initial highlight that later gets overwritten
Not even two minutes in and I'm already getting roasted 😂
nothng like teej whispering about neovim
Amazing thumb!
great vid
1:39 damn man no need :(
anyway love the series
Tyvm
Advent of tmux next year?
I don't even use tmux lol
What does it take to make `function()` and `end` into aliases for brackets? In a way that `%` will understand in normal mode.
Have you covered erb files? It only recognises blocks of code but not granular enough to build useful queries
how did you instantly format the entire file, after copy pasting the treesitter config???
when i try the space x keymap i get an error: Argument required.
I just noticed this last week but when I started out with Vim around December last year, I'd looked into tree-sitter and saw that most of the project was written in C. But when I recently checked it out again after moving up to Neovim, the entire tree-sitter codebase was in Rust! Did it get re-written?! WHen?! Or am I going crazy?
The Rust bindings are maintained in the treesitter repo itself. The core treesitter engine, parser, etc., is in C.
@@oserodal2702 Ok yeah, I went back and checked it _properly_ this time. Most of the Rust code is from the tree-sitter CLI. Which makes a lot more sense to me since Rust is pretty good for that kind of thing.
Thanks for the video! unrelated question: what's the name of your font?
Nevermind, I found another one I like. I think yours is Berkeley Mono though.
The font looks like the combinatiin of terminus and jetbrains mono
I don't understand, when will Treesitter in Neovim be considered stable?
"Prime" mentioned
Next Vid: Treesitter advanced
"Its full of errors, not just syntax" 🤣
TELL ME IM WRONG
@@teej_dv Not at all and I'm not even ashamed. I wish treesitter could parse those errors tho 😅
WOW Tj.... you out there write code that is full of errors, not just syntax .... really that is low dude :D
lost me at the end, but good foundation.
haha sorry about that
420 seen
1st view
Ngl the A.I. thumbnails look terrible. I thought this was one of those bot spam videos that are all over TH-cam nowadays at first
I thought these have been pretty on brand for TJ and Prime's videos. Makes it look like a shit post, turns out to be quality content
Its mostly that if I'm going to make a video for every day for 25 days this time of the year, then I can't spend hours on a thumbnail haha