-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autocommand not triggered #1
Comments
@lervag I may have fixed it on branch test_autocmd. |
No, I don't think so. The |
I misunderstood this remark. What did you mean, exactly? |
I can propose a PR, it might be easier to understand if I show what I mean. |
I'd appreciate it! |
See #2, specifically this commit. |
Wow, great job! I have a doubt, though: wouldn't the parser be triggered two times if if vim.opt_local.filetype:get() == "tex" then
_start_parser()
end would launch parser. |
Thanks :)
No, I don't think so - and this is the problem I'm trying to solve. If you are already inside a |
I understood this; what I meant was: suppose that we use a regular plugin manager, which loads plugins on startup. When |
Ah, but that's where |
Very interesting. I'll test and push as soon as I can. |
The autocommand defined here is not triggered if cmp-vimtex is loaded lazily by e.g. lazy.nvim. I think this will be a quite common situation.
A simple, but possibly good solution is to add a check if the current file is already a
.tex
file, and to then start the parser immediately.I would also advice to put all code inside the setup function. That is,
require
ing a script should not have a side effect in itself.The text was updated successfully, but these errors were encountered: