aboutsummaryrefslogtreecommitdiff
path: root/lua/plugins/filetype.lua
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-06-26 12:34:35 -0700
committerMichael Forney <mforney@mforney.org>2019-06-27 12:02:47 -0700
commit3b798d3002e0b35a5f8890d29035fc91642fd6e0 (patch)
treeb1ba8573acd77fdefff318e5f76c700b04e992fb /lua/plugins/filetype.lua
parentf8c9f23619ffa407251426d706a996965e6d1cc9 (diff)
downloadvis-3b798d3002e0b35a5f8890d29035fc91642fd6e0.tar.gz
vis-3b798d3002e0b35a5f8890d29035fc91642fd6e0.tar.xz
filetype: Match known filenames exactly
Otherwise, a file like `passwd.c` will match both ansi_c and dsv. The one that gets chosen depends on the iteration order of table, which is non-deterministic.
Diffstat (limited to 'lua/plugins/filetype.lua')
-rw-r--r--lua/plugins/filetype.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/lua/plugins/filetype.lua b/lua/plugins/filetype.lua
index 6c574bc..35912f6 100644
--- a/lua/plugins/filetype.lua
+++ b/lua/plugins/filetype.lua
@@ -102,13 +102,13 @@ vis.ftdetect.filetypes = {
ext = { "%.d$", "%.di$" },
},
dockerfile = {
- ext = { "Dockerfile" },
+ ext = { "^Dockerfile$", "%.Dockerfile$" },
},
dot = {
ext = { "%.dot$" },
},
dsv = {
- ext = { "group", "gshadow", "passwd", "shadow" },
+ ext = { "^group$", "^gshadow$", "^passwd$", "^shadow$" },
},
eiffel = {
ext = { "%.e$", "%.eif$" },
@@ -282,7 +282,7 @@ vis.ftdetect.filetypes = {
ext = { "%.pike$", "%.pmod$" },
},
pkgbuild = {
- ext = { "PKGBUILD" },
+ ext = { "^PKGBUILD$" },
},
pony = {
ext = { "%.pony$" },