Skip to content
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

fix(lazyfile): exclude filetypedetect from skips #3004

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dpetka2001
Copy link
Contributor

@dpetka2001 dpetka2001 commented Apr 17, 2024

Fixes #2891 (potentially)

After I saw that issue after a long a time, I decided to take a deeper dive to how lazyfile works.

Unfortunately, with my lack of programming experience, I could only understand some things on the surface, so I ended up doing some vim.print to have some visual hints. I then noticed that filetypedetect was given back from Event.get_augroups(event.event) and included in the skips table, which is later excluded in Event.trigger.

My assumption was that due to filetypedetect being skipped, the filetypes added in extras.util.dot could not be detected in LazyFile event when Neovim was invoked with file arguments, as also stated in the aforementioned issue.

So, I just tried to exclude filetypedetect from being added to skips table and when I tested it locally it worked when invoking Neovim with file arguments.

I would love some input from the maintainer, as the steps I followed were mostly based on logical deductions, rather having in-depth knowledge of what's actually going on in the lazyfile function and the maintainer is obviously the one most intrinsically acquainted with LazyVim codebase and obviously there might be a more correct way to do it.

@folke
Copy link
Collaborator

folke commented Apr 22, 2024

Thanks for looking into this. I'm out for the rest of the week as of tomorrow, but will have a look at this next week when I'm back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: dot file type detection not work when opening directly
2 participants