Carlos Esparza

Results 52 comments of Carlos Esparza

lmao I'm an absolute idiot I just noticed nvim_buf_set_text already keeps track of the cursor position correctly, so most of the code here is unnecessary.

Ok now it's slightly different from before. If the cursor is inside one of the regions that gets changed, it will stay at the same position, or end up at...

Yes that's the idea. I like that name. Keeping the current behaviour as default could be achieved by undoing the commenting of ```javascript elseif not config.get_opts().move_cursor then -- M.set_curpos(pos.old_pos) end...

So what should the behaviour be when `move_cursor` is neither "begin", "sticky" of `false`/`nil`? Currently (current main branch) this would result in an undocumented behaviour which is essentially "sticky" except...

> I see, I think I'm not opposed to adding this functionality then. However, I would like to see a few things: Cool! > * Test cases + docs! OK...

Running the tests isn't working. I have plenary in my lazy config. I open `basics_spec.lua`, do `nnoremap t PlenaryTestFile` and the press `t`. But all the tests fail, also on...

To test the slow `\(\)` more I just replaced all `$`-math in my tex file with `\(\)` and I got some pretty bad time: ``` TOTAL COUNT MATCH SLOWEST AVERAGE...

A quick test seems to indicate that ``\%([`',]\)\1`` (average 3.0us) might be faster than ` ``\|''\|,,` (average 4.7us). But I'm not sure this sample is representative.

> Did you already check if the original pattern matches faster than the simplified pattern? That's would be surprising to me. Some data for this: I created some files with...

Here's another idea that might improve syntax highlighting performance. Currently there's **a lot** of syntax definitions that match specific commands. It might be faster to just have a syntax group...