mirror of
https://github.com/neovim/neovim.git
synced 2026-07-31 04:39:07 +00:00
Problem: filetype: .git-blame-ignore-revs file is not recognized
Solution: Detect .git-blame-ignore-revs file as gitrevlist filetype,
include syntax and filetype plugins (Fionn Fitzmaurice)
A Git revision list is
> a list of object names (i.e. one unabbreviated SHA-1 per line)...,
> comments (#), empty lines, and any leading and trailing whitespace are
> ignored.
(from Git's fsck.skipList documentation).
The default output of git rev-list will match this. It is also suitable
as input to git blame --ignore-revs-file.
This adds filetype detection matching .git-blame-ignore-revs files,
syntax highlighting and basic filetype settings.
closes: vim/vim#20702
a8d5be9284
Co-authored-by: Fionn Fitzmaurice <fionn@github.com>
17 lines
417 B
VimL
17 lines
417 B
VimL
" Vim filetype plugin file
|
|
" Language: Git revision list
|
|
" Author: Fionn Fitzmaurice (github.com/fionn)
|
|
" Maintainer: Fionn Fitzmaurice (github.com/fionn)
|
|
" License: Vim & Apache 2.0
|
|
|
|
if exists("b:did_ftplugin")
|
|
finish
|
|
endif
|
|
let b:did_ftplugin = 1
|
|
|
|
setlocal comments=:#
|
|
setlocal commentstring=#\ %s
|
|
setlocal keywordprg=git\ show
|
|
|
|
let b:undo_ftplugin = "setl comments< commentstring< keywordprg<"
|