aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-10-05 15:23:19 +0200
committerRandy Palamar <palamar@ualberta.ca>2023-10-05 08:42:30 -0600
commit7445c336c7cbd5676c6291286eb2cd55097d7113 (patch)
tree9c3482dd44f10e20b5a2ac4a1f9b0dcd402653ae
parent3d83d7716926a7296bbb0d6bb59371a9a5d66955 (diff)
downloadvis-7445c336c7cbd5676c6291286eb2cd55097d7113.tar.gz
vis-7445c336c7cbd5676c6291286eb2cd55097d7113.tar.xz
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.
-rw-r--r--lua/plugins/filetype.lua2
1 files changed, 1 insertions, 1 deletions
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 = {