vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit efecd4582819c2fafa713bf65938a3bde26a9700
parent 1156af651f2baa7978c24c1de43b77c4bf3e2bab
Author: Florian Fischer <florian.fischer@muhq.space>
Date:   Thu,  5 Oct 2023 15:23:19 +0200

fix literal makefile name detection

The current literal file name detection for GNUmakefile, makefile
or Makefile could match anywhere in the file name.

For example the file type of `makefile.lua` (the name of our makefile lexer)
was detected as makefile.

This is fixed by requiring the literal patterns to start and end with
the string.

Diffstat:
Mlua/plugins/filetype.lua | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lua/plugins/filetype.lua b/lua/plugins/filetype.lua @@ -268,7 +268,7 @@ vis.ftdetect.filetypes = { makefile = { hashbang = {"^#!/usr/bin/make"}, utility = {"^make$"}, - ext = { "%.iface$", "%.mak$", "%.mk$", "GNUmakefile", "makefile", "Makefile" }, + ext = { "%.iface$", "%.mak$", "%.mk$", "^GNUmakefile$", "^makefile$", "^Makefile$" }, mime = { "text/x-makefile" }, }, man = {