oil.nvim
oil.nvim copied to clipboard
feat(icons): filetype detection via shebang
This PR adds a step in the columns making: read the first line of the file and use that to compute a "fallback" filetype in case the filename alone cannot be used to determine the filetype.
This is then passed to the IconProvider which uses it if the icon is nil, or default.
This works well in initial tests, but vim.fn.readfile(name, '', 1) only read files in the current folder, I need to understand how I can make that work when changing folders. However, once this is done, I think this will provide some nice additional icons.
Looking forward to getting a review/suggestions :)