aboutsummaryrefslogtreecommitdiff
path: root/lua/plugins
diff options
context:
space:
mode:
authorRandy Palamar <randy@rnpnr.xyz>2024-04-28 12:53:05 -0600
committerRandy Palamar <randy@rnpnr.xyz>2024-04-29 08:27:30 -0600
commit8be1f68ec8a8310109a9204ec9a8599614d8d623 (patch)
treed123c9b1e120f20b383155c5fe75783ab81db349 /lua/plugins
parent1fc175627f3afe938be0b5daa6a864b281725fec (diff)
downloadvis-8be1f68ec8a8310109a9204ec9a8599614d8d623.tar.gz
vis-8be1f68ec8a8310109a9204ec9a8599614d8d623.tar.xz
lua: small filetype/style setting cleanup
Filetype extension mapping already needs to match regular expressions so we might as well us it to simplify things. set_syntax doesn't need to handle pseudo scintilla style definitions. I couldn't even find any examples of table style definitions anywhere let alone references to other definitions as $(style.myvarname) (hint: variables in lua already handle this).
Diffstat (limited to 'lua/plugins')
-rw-r--r--lua/plugins/filetype.lua11
1 files changed, 3 insertions, 8 deletions
diff --git a/lua/plugins/filetype.lua b/lua/plugins/filetype.lua
index e8a5945..391621d 100644
--- a/lua/plugins/filetype.lua
+++ b/lua/plugins/filetype.lua
@@ -178,7 +178,7 @@ vis.ftdetect.filetypes = {
ext = { "%.gleam$" },
},
glsl = {
- ext = { "%.glslf$", "%.glslv$" },
+ ext = { "%.glsl[fv]?$" },
},
gnuplot = {
ext = { "%.dem$", "%.plt$" },
@@ -200,7 +200,7 @@ vis.ftdetect.filetypes = {
mime = { "text/x-haskell" },
},
html = {
- ext = { "%.htm$", "%.html$", "%.shtm$", "%.shtml$", "%.xhtml$" },
+ ext = { "%.[sx]?htm[l]?$" },
mime = { "text/x-html" },
},
icon = {
@@ -272,12 +272,7 @@ vis.ftdetect.filetypes = {
mime = { "text/x-makefile" },
},
man = {
- ext = {
- "%.1$", "%.2$", "%.3$", "%.4$", "%.5$", "%.6$", "%.7$",
- "%.8$", "%.9$", "%.1x$", "%.2x$", "%.3x$", "%.4x$",
- "%.5x$", "%.6x$", "%.7x$", "%.8x$", "%.9x$",
- "%.ms$", "%.me$", "%.mom$", "%.mm$", "%.tmac$"
- },
+ ext = { "%.[1-9][xp]?$", "%.ms$", "%.me$", "%.mom$", "%.mm$", "%.tmac$" },
},
markdown = {
ext = { "%.md$", "%.markdown$" },