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

[bug] Not working when filetype doesn't match parser name #34

Open
artem-nefedov opened this issue Jan 25, 2025 · 0 comments · May be fixed by #35
Open

[bug] Not working when filetype doesn't match parser name #34

artem-nefedov opened this issue Jan 25, 2025 · 0 comments · May be fixed by #35

Comments

@artem-nefedov
Copy link

artem-nefedov commented Jan 25, 2025

In certain cases filetype and parser (language) name can be different, e.g. shell script can have sh filetype and use bash parser.
Currently, vim.treesitter.language.inspect(filetype) check causes failure in such case, e.g. vim.treesitter.language.inspect('sh') throws no parser for 'sh' language error even if bash parser is installed.

This is a regression introduced in 11aea08. Before this commit, it was using vim.treesitter.language.get_lang(), which works properly. For example, vim.treesitter.language.get_lang('sh') will return bash.

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.

1 participant