You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 6, 2024. It is now read-only.
first off: thank you for your great plugin! It really is a good effort and much easier to read than vimscript.
I'm getting some strange filedetections lately and I wanted to investigate that. The situation:
I created a bash script called 'build_cmake' that uses a shebang at the top of the file.
'filetype.nvim' reports this file as a makefile. I investigated how that could happen and I found that it
matches the complex regex with absolute path check:
iftry_regex(absolute_path, complex_maps.complex) then
return
end
This happens to be the case because build_c[mak]e contains the string mak. This could also happen if you have the string mak or mk or dsp in your absolute path. So I would argue that matching on the absolute path should be done after matching a shebang. What do you think about that?
Have a great day!
Nagua
The text was updated successfully, but these errors were encountered:
Yes, I confirm. I use Oil.nvim, and there is 'mak' in my home directory name. If I open anything in the home directory with Oil.nvim, the plugin set the file type to 'make'. And it breaks work of the Oil.nvim plugin.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello everyone,
first off: thank you for your great plugin! It really is a good effort and much easier to read than vimscript.
I'm getting some strange filedetections lately and I wanted to investigate that. The situation:
I created a bash script called 'build_cmake' that uses a shebang at the top of the file.
'filetype.nvim' reports this file as a makefile. I investigated how that could happen and I found that it
matches the complex regex with absolute path check:
filetype.nvim/lua/filetype/init.lua
Lines 179 to 181 in 25b5f7e
This happens to be the case because
build_c[mak]e
contains the stringmak
. This could also happen if you have the stringmak
ormk
ordsp
in your absolute path. So I would argue that matching on the absolute path should be done after matching a shebang. What do you think about that?Have a great day!
Nagua
The text was updated successfully, but these errors were encountered: