micangl / cmp-vimtex

Vimtex source for nvim-cmp.
MIT License
78 stars 5 forks source link

Fix start of parser on initialization #2

Closed lervag closed 10 months ago

lervag commented 10 months ago

I've also added some tool configuration (.luarc.json, .stylua.conf and .editorconf) and reformatted the source files. Let me know if you disagree with that - I can easily drop the commit.

micangl commented 10 months ago

Formatting and style, in the codebase, were a bit of a dumpster-fire. I'll have to start using StyLua too.

micangl commented 10 months ago

Everything's working correctly. One last question: why was { clear = true, } removed from the augroup creation?

lervag commented 10 months ago

Everything's working correctly.

Glad to hear that!

One last question: why was { clear = true, } removed from the augroup creation?

Because clear = true is the default already. I prefer to not pass options unless one changes something from the default.

lervag commented 10 months ago

Also, sorry for not changing the docs, I forgot that. By the way, I think you should also consider to change your other options from being integer to being booleans. It is better to check if some_bool_value then than if some_int_value == 1 then.

lervag commented 10 months ago

Formatting and style, in the codebase, were a bit of a dumpster-fire. I'll have to start using StyLua too.

Perhaps not dumpster-fire, but not quite consistent either. When possible, I always prefer to just let som tool decide how things look. StyLua is nice and works well.

micangl commented 10 months ago

It is better to check if some_bool_value then than if some_int_value == 1 then.

Definitely.