aboutsummaryrefslogtreecommitdiff
path: root/lua/plugins
diff options
context:
space:
mode:
authorKarol Kosek <krkk@serenityos.org>2021-09-25 13:12:16 +0200
committerFelix Van der Jeugt <felix.vanderjeugt@posteo.net>2022-05-29 16:02:43 +0200
commit0cc684f26b136029f4f49d808761d69228f42dff (patch)
tree32851892b1437c4948d38262fb78a90d59d1581d /lua/plugins
parent078985dc61f4d97fdf9fdd9184807753d5a46af6 (diff)
downloadvis-0cc684f26b136029f4f49d808761d69228f42dff.tar.gz
vis-0cc684f26b136029f4f49d808761d69228f42dff.tar.xz
filetype: Set diff filetype for COMMIT_EDITMSG files
This filename is set when writing a commit message in git. If you run git-commit with an --verbose option or if you just have set it in your git-config, that shows you the patch diff on bottom of the file. Unfortunately, now every patch file will set colorcolumn, but overall I think this is better than having duplicated lexers.
Diffstat (limited to 'lua/plugins')
-rw-r--r--lua/plugins/filetype.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/lua/plugins/filetype.lua b/lua/plugins/filetype.lua
index 2ea5a06..18767ec 100644
--- a/lua/plugins/filetype.lua
+++ b/lua/plugins/filetype.lua
@@ -96,7 +96,8 @@ vis.ftdetect.filetypes = {
ext = { "%.desktop$" },
},
diff = {
- ext = { "%.diff$", "%.patch$", "%.rej$" },
+ ext = { "%.diff$", "%.patch$", "%.rej$", "^COMMIT_EDITMSG$" },
+ cmd = { "set colorcolumn 72" },
},
dmd = {
ext = { "%.d$", "%.di$" },
@@ -159,10 +160,6 @@ vis.ftdetect.filetypes = {
gherkin = {
ext = { "%.feature$" },
},
- ['git-commit'] = {
- ext = { "^COMMIT_EDITMSG$" },
- cmd = { "set colorcolumn 72" },
- },
['git-rebase'] = {
ext = { "git%-rebase%-todo" },
},