-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitmoji.txt
97 lines (68 loc) · 3.22 KB
/
gitmoji.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
*gitmoji.nvim*
==============================================================================
Gitmoji is a plugin to help you use gitmojis in your commits.
The default setting enables gitmoji for `gitcommit` filetypes.
Then, with the help of nvim-cmp, you can type `:` - and get a list of
completions for all gitmojis emojis.
------------------------------------------------------------------------------
*gitmoji-table-of-contents*
Table of Contents
Setup........................................................|gitmoji-setup|
Configuration........................................|gitmoji-configuration|
------------------------------------------------------------------------------
*gitmoji-setup*
`M.setup`({opts})
Setup function. This method simply merges default configs with opts table.
You can read more about the possible settings at |gitmoji-configuration|.
Parameters~
{opts} gitmoji.config configurations for gitmoji.nvim
Usage~
require("gitmoji").setup({}) -- replace `{}` with your config table
------------------------------------------------------------------------------
*gitmoji-source*
`M.source_name`()
Small helper function to get the name of the gitmoji source.
Return~
`(string)` source name of the gitmoji source
Usage~
require("gitmoji").source_name()
==============================================================================
------------------------------------------------------------------------------
*gitmoji-configuration*
`config`
Configuration is a simple lua table with a few settings.
You can set a list of filetypes that you wish the gitmoji completions to
be active for, and you can set the completion type you wish (eg. emojis
or text). Finally it is possible to have the completion automatically add
a space after insertion in order to be ready for more text after gitmoji
insertion.
Class~
{gitmoji.config}
Fields~
{filetypes} `(string[])` array of filetypes to add gitmoji completions for.
{completion} (gitmoji.completion) configurations for what to write after selection
Default values:
>
local config = {
filetypes = { "gitcommit" },
completion = {
append_space = false,
complete_as = "emoji",
},
}
<
------------------------------------------------------------------------------
*gitmoji-completion-opts*
The completion table consists of two simple fields as can be seen below:
Class~
{gitmoji.completion}
Fields~
{append_space} `(boolean)` append space after completion?
{complete_as} (gitmoji.complete_as) complete as emoji or text?
- see |gitmoji-complete-as|
------------------------------------------------------------------------------
*gitmoji-complete-as*
Currently there are two different completion types provided:
"emoji" -- inserts emojis
"text" -- insert text eg `:bug:`
vim:tw=78:ts=8:noet:ft=help:norl: