diff options
| author | Karl Schultheisz <kdsch@protonmail.com> | 2020-01-21 21:27:11 -0500 |
|---|---|---|
| committer | Karl Schultheisz <kdsch@protonmail.com> | 2020-01-21 21:27:11 -0500 |
| commit | 2d6150426fe825cd7b179c5c3ed648ae607be122 (patch) | |
| tree | 72d0d8be0c235900736ef0b89fe4770d98c5e1c9 /lua/plugins | |
| parent | cb03746137bc23f3c1b485088fefb9d4feffa368 (diff) | |
| parent | 30cd60cc2b2babda36ab752396df58697e9f26fd (diff) | |
| download | vis-2d6150426fe825cd7b179c5c3ed648ae607be122.tar.gz vis-2d6150426fe825cd7b179c5c3ed648ae607be122.tar.xz | |
Merge branch 'master' into add-layout-option
Diffstat (limited to 'lua/plugins')
| -rw-r--r-- | lua/plugins/filetype.lua | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/lua/plugins/filetype.lua b/lua/plugins/filetype.lua index 6c574bc..cff073a 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$" }, @@ -125,6 +125,9 @@ vis.ftdetect.filetypes = { faust = { ext = { "%.dsp$" }, }, + fennel = { + ext = { "%.fnl$" }, + }, fish = { ext = { "%.fish$" }, }, @@ -282,7 +285,7 @@ vis.ftdetect.filetypes = { ext = { "%.pike$", "%.pmod$" }, }, pkgbuild = { - ext = { "PKGBUILD" }, + ext = { "^PKGBUILD$" }, }, pony = { ext = { "%.pony$" }, @@ -385,6 +388,10 @@ vis.ftdetect.filetypes = { texinfo = { ext = { "%.texi$" }, }, + text = { + ext = { "%.txt$" }, + mime = { "text/plain" }, + }, toml = { ext = { "%.toml$" }, }, @@ -497,6 +504,12 @@ vis.events.subscribe(vis.events.WIN_OPEN, function(win) end end + -- try text lexer as a last resort + if (mime or 'text/plain'):match('^text/.+$') then + set_filetype('text', vis.ftdetect.filetypes.text) + return + end + win:set_syntax(nil) end) |
