-
Notifications
You must be signed in to change notification settings - Fork 2
/
ddc-github.txt
128 lines (98 loc) · 4.06 KB
/
ddc-github.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
*ddc-github.txt* GitHub completion for ddc.vim via gh
Author: Hibiki <mail@4513echo.dev>
License: MIT License
URL: https://github.com/4513ECHO/ddc-github
Last change: 2023 May 16
==============================================================================
CONTENTS *ddc-github-contents*
Introduction |ddc-github-introduction|
Install |ddc-github-install|
Examples |ddc-github-examples|
Params |ddc-github-params|
github_issue |ddc-github_issue-params|
github_pull_request |ddc-github_pull_request-params|
About |ddc-github-about|
==============================================================================
INTRODUCTION *ddc-github-introduction*
These sources collect something related to GitHub (e.g. issues, pull requests)
via gh, which is GitHub’s official command line tool.
Now *ddc-github* provides below sources:
github_issue *ddc-github_issue*
github_pull_request *ddc-github_pull_request*
==============================================================================
INSTALL *ddc-github-install*
Please install "gh", "|ddc|.vim" and "|denops.vim|".
https://github.com/cli/cli (gh)
https://github.com/Shougo/ddc.vim
https://github.com/vim-denops/denops.vim
==============================================================================
EXAMPLES *ddc-github-examples*
>
" Use github sources
call ddc#custom#patch_global('sources', ['github_issue', 'github_pull_request'])
" Change source options
call ddc#custom#patch_global('souceOptions', {
\ 'github_issue': {
\ 'mark': 'issue',
\ 'forceCompletionPattern': '#\d*',
\ },
\ })
" Use on specific filetype
call ddc#custom#patch_filetype(['gitcommit'], {
\ 'sources': ['github_issue', 'github_pull_request'],
\ 'keywordPattern': '[a-zA-Z_:#]\k*',
\ })
" Use on `gh (issue|pr) create` buffer
function! s:on_gh() abort
" Check whether the file is gh's buffer
let tmpdir = empty($TMPDIR) ? '/tmp' : expand('$TMPDIR')
if fnamemodify(bufname(), ':h') != tmpdir || getcwd() == tmpdir
return
endif
" Over sources
call ddc#custom#patch_buffer({
\ 'sources': ['github_issue', 'github_pull_request'],
\ 'keywordPattern': '[a-zA-Z_:#]\k*',
\ })
inoremap <silent><expr><buffer> <C-x><C-g>
\ ddc#map#manual_complete('github_issue', 'github_pull_request')
endfunction
autocmd FileType markdown call <SID>on_gh()
<
==============================================================================
PARAMS *ddc-github-params*
------------------------------------------------------------------------------
GITHUB_ISSUE *ddc-github_issue-params*
state "all" | "closed" | "open" (default: "all")
Filter of issue state.
menuItem "state" | "title" | "body" (default: "title")
Displayed item in |ddc-item-attribute-menu|. Following values are
available:
value description~
"state" issue state
"title" issue title
"body" issue doby
infoItem "state" | "title" | "body" (default: "body")
Displayed item in |ddc-item-attribute-info|. Following values are same
as `menuItem`.
------------------------------------------------------------------------------
GITHUB_PULL_REQUEST *ddc-github_pull_request-params*
state "all" | "closed" | "merged" | "open" (default: "all")
Filter of pull request state.
menuItem "state" | "title" | "body" (default: "title")
Displayed item in |ddc-item-attribute-menu|. Following values are
available:
value description~
"state" pull request state
"title" pull request title
"body" pull request doby
infoItem "state" | "title" | "body" (default: "body")
Displayed item in |ddc-item-attribute-info|. Following values are same
as `menuItem`.
==============================================================================
ABOUT *ddc-github-about*
|ddc-github| is developed by Hibiki(4513ECHO) and licensed under the
MIT License. Visit the project page for the latest version:
https://github.com/4513ECHO/ddc-github
==============================================================================
vim:tw=78:ts=8:ft=help:norl:noet:fen: