gitcommit
source for nvim-cmp
cmp-gitcommit
is a fork of cmp-conventionalcommits
- no npm dependencies
- commitlint support
- lerna support
(cd {%p:h:h} && git ls-files)
If you are not POSIX compliant shell user, please make a request. I will deal with it.
This plugin provides
- types (
ci: 👷
,ci
,ci:
, etc) - scopes (
Travisi
,Circle
,BrowserStack
, etc) - tracked path object (
README.md
,src
,.gitignore
, etc)
sources for nvim-cmp
Packer
use 'hrsh7th/nvim-cmp'
use { 'Cassin01/cmp-gitcommit', after = { 'nvim-cmp' } }
require('cmp').setup {
sources = require'cmp'.config.sources({{ name = 'gitcommit' }})
}
use {
-- ...
config = function()
require('cmp-gitcommit').setup({
typesDict = {
ci = {
label = 'ci',
emoji = '👷',
documentation = 'Changes to our CI configuration files and scripts',
scopes = {'Travisi', 'Circle', 'BrowserStack', 'SauceLabs'} -- FEATURE custom scopes !!
}
style = {
label = 'style',
emoji = '🎨',
documentation = 'Changes that do not affect the meaning of the code',
}
test = {
label = 'test',
emoji = '🚨',
documentation = 'Adding missing tests or correcting existing tests',
}
-- ...
}
insertText = function(label, emoji) return label .. ":" .. emoji .. ' ' end
})
end
}