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

Register user plugins for specific filetypes #14

Open
reegnz opened this issue Sep 7, 2023 · 2 comments · May be fixed by #19
Open

Register user plugins for specific filetypes #14

reegnz opened this issue Sep 7, 2023 · 2 comments · May be fixed by #19

Comments

@reegnz
Copy link
Contributor

reegnz commented Sep 7, 2023

Besides regex, the original gx-extended plugin allowed for an additional filetype-based filtering, so that the regex matching was only happening in a specific filetype. The filetype detection itself is then handled by vim instead of the plugin.
Only workaround today is defining your own filename pattern, but then you start reimplementing an inferior version of the ftdetect functionality which is already part of vim.

@rmagatti
Copy link
Owner

rmagatti commented Sep 7, 2023

Right. I can see it being useful to have a ft based implementation as well. It would bifurcate the interface of how to register handlers but that might be okay

reegnz added a commit to reegnz/gx-extended.nvim that referenced this issue Dec 15, 2023
Instead of just plain globbing and trying to figure out file types by
glob patterns, utilize existing ftdetect functionality of neovim.

Fixes rmagatti#14

Signed-off-by: Zoltán Reegn <zoltan.reegn@gmail.com>
@reegnz reegnz linked a pull request Dec 15, 2023 that will close this issue
reegnz added a commit to reegnz/gx-extended.nvim that referenced this issue Dec 15, 2023
Instead of just plain globbing and trying to figure out file types by
glob patterns, utilize existing ftdetect functionality of neovim.

Fixes rmagatti#14

Signed-off-by: Zoltán Reegn <zoltan.reegn@gmail.com>
@reegnz
Copy link
Contributor Author

reegnz commented Dec 15, 2023

@rmagatti I opened a PR with an implementation, I hope that works out.

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 a pull request may close this issue.

2 participants