filetype.nvim
filetype.nvim copied to clipboard
Implement missing function calls and fix shebang detection
I created a filetype.detect
module that stores the functions used
to detect the filetypes of shell files.
The function I implemented checks is the shell name passed to it is in the shebang table and sets filetype to that or it sets the filetype to the shell name directly.
I also moved the analyze_shebang
function to filetype_detect
since it fits there more than having it in the main module.
I moved getlines
to filetype.util
and renamed it to
getlines_as_string
The shell functions I added were taken from vim.filetype.detect
but I modified the behaviour so that it bash, ksh, and dash do
not get converted to sh filetype and instead it is up to the user
to do so if they want.
I also fixed some broken muttrc
lua patterns and added a mapping for
.service
files.
closes: #79,#34 Can correctly identify shebangs with arguments
closes: #63 Can correctly identify python3 files as python
closes: #43 Provide an option to set a default filetype
closes: #91 all dist#ft
functions that are being used have been ported over
closes: #73 map .service
files to systemd
filetype
My bad, I didn't know that deleting the original repository also affected the pull request.