diff options
| author | parazyd <parazyd@dyne.org> | 2021-01-12 11:04:17 +0100 |
|---|---|---|
| committer | parazyd <parazyd@dyne.org> | 2021-01-12 11:04:17 +0100 |
| commit | a1733f2a0365f2ebbfc285935647c2874fff25c1 (patch) | |
| tree | 44baf1e731ad2d084b89b9683d76936295454fe5 /lua/plugins/filetype.lua | |
| parent | 334fed9dd20f19bbd78b1c73d081d625c222640a (diff) | |
| download | vis-a1733f2a0365f2ebbfc285935647c2874fff25c1.tar.gz vis-a1733f2a0365f2ebbfc285935647c2874fff25c1.tar.xz | |
filetype: Detect make shebang for "makefile".
This is useful when writing "debian/rules" files in packages.
Diffstat (limited to 'lua/plugins/filetype.lua')
| -rw-r--r-- | lua/plugins/filetype.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lua/plugins/filetype.lua b/lua/plugins/filetype.lua index 5aebdcc..5b6c2ab 100644 --- a/lua/plugins/filetype.lua +++ b/lua/plugins/filetype.lua @@ -250,6 +250,9 @@ vis.ftdetect.filetypes = { makefile = { ext = { "%.iface$", "%.mak$", "%.mk$", "GNUmakefile", "makefile", "Makefile" }, mime = { "text/x-makefile" }, + detect = function(_, data) + return data:match("^#!/usr/bin/make") + end }, man = { ext = { |
