From 7445c336c7cbd5676c6291286eb2cd55097d7113 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 5 Oct 2023 15:23:19 +0200 Subject: 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. --- lua/plugins/filetype.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/plugins') diff --git a/lua/plugins/filetype.lua b/lua/plugins/filetype.lua index 464b466..85a353e 100644 --- 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 = { -- cgit v1.2.3