{"action":"created","comment":{"url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/pulls/comments/190775774","pull_request_review_id":123226490,"id":190775774,"diff_hunk":"@@ -860,4 +860,50 @@ function! LanguageClient#cquery_vars(...) abort\n     return call('LanguageClient#find_locations', ['$cquery/vars'] + a:000)\n endfunction\n \n+function! LanguageClient_contextMenuItems() abort\n+  return {\n+  \\ 'Code Action': 'LanguageClient#textDocument_codeAction',\n+  \\ 'Definition': 'LanguageClient#textDocument_definition',\n+  \\ 'Document Symbol': 'LanguageClient#textDocument_documentSymbol',\n+  \\ 'Formatting': 'LanguageClient#textDocument_formatting',\n+  \\ 'Hover': 'LanguageClient#textDocument_hover',\n+  \\ 'Implementation': 'LanguageClient#textDocument_implementation',\n+  \\ 'Range Formatting': 'LanguageClient#textDocument_rangeFormatting',\n+  \\ 'References': 'LanguageClient#textDocument_references',\n+  \\ 'Rename': 'LanguageClient#textDocument_rename',\n+  \\ 'Signature Help': 'LanguageClient#textDocument_signatureHelp',\n+  \\ 'Type Definition': 'LanguageClient#textDocument_typeDefinition',\n+  \\ 'Workspace Symbol': 'LanguageClient#workspace_symbol',\n+  \\ }\n+endfunction\n+\n+function! LanguageClient_handleContextMenuItem(item) abort\n+  let l:items = LanguageClient_contextMenuItems()\n+  silent! exe 'redraw'\n+  return call(l:items[a:item], [])\n+endfunction\n+\n+function! LanguageClient_contextMenu() abort\n+  let l:options = keys(LanguageClient_contextMenuItems())\n+\n+  if get(g:, 'loaded_fzf') && get(g:, 'LanguageClient_FzfContextMenu', 1)\n+    return fzf#run(fzf#wrap({\n+    \\ 'source': l:options,\n+    \\ 'sink': function('LanguageClient_handleContextMenuItem'),\n+    \\ }))\n+  endif\n+\n+  let l:selections = map(copy(l:options), { key, val -> printf('%d) %s', key + 1, val ) })","path":"autoload/LanguageClient.vim","position":37,"original_position":37,"commit_id":"15f4765496eb1260a22e753fdb87b0dde343a17d","original_commit_id":"15f4765496eb1260a22e753fdb87b0dde343a17d","user":{"login":"autozimu","id":1453551,"avatar_url":"https://avatars1.githubusercontent.com/u/1453551?v=4","gravatar_id":"","url":"https://api.github.com/users/autozimu","html_url":"https://github.com/autozimu","followers_url":"https://api.github.com/users/autozimu/followers","following_url":"https://api.github.com/users/autozimu/following{/other_user}","gists_url":"https://api.github.com/users/autozimu/gists{/gist_id}","starred_url":"https://api.github.com/users/autozimu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autozimu/subscriptions","organizations_url":"https://api.github.com/users/autozimu/orgs","repos_url":"https://api.github.com/users/autozimu/repos","events_url":"https://api.github.com/users/autozimu/events{/privacy}","received_events_url":"https://api.github.com/users/autozimu/received_events","type":"User","site_admin":false},"body":"`copy()` is not necessary as far as I can see.","created_at":"2018-05-25T02:09:25Z","updated_at":"2018-05-25T02:11:00Z","html_url":"https://github.com/autozimu/LanguageClient-neovim/pull/446#discussion_r190775774","pull_request_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/pulls/446","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/autozimu/LanguageClient-neovim/pulls/comments/190775774"},"html":{"href":"https://github.com/autozimu/LanguageClient-neovim/pull/446#discussion_r190775774"},"pull_request":{"href":"https://api.github.com/repos/autozimu/LanguageClient-neovim/pulls/446"}}},"pull_request":{"url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/pulls/446","id":190424131,"html_url":"https://github.com/autozimu/LanguageClient-neovim/pull/446","diff_url":"https://github.com/autozimu/LanguageClient-neovim/pull/446.diff","patch_url":"https://github.com/autozimu/LanguageClient-neovim/pull/446.patch","issue_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/issues/446","number":446,"state":"open","locked":false,"title":"Add context menu with all available actions. #442","user":{"login":"kristijanhusak","id":1782860,"avatar_url":"https://avatars1.githubusercontent.com/u/1782860?v=4","gravatar_id":"","url":"https://api.github.com/users/kristijanhusak","html_url":"https://github.com/kristijanhusak","followers_url":"https://api.github.com/users/kristijanhusak/followers","following_url":"https://api.github.com/users/kristijanhusak/following{/other_user}","gists_url":"https://api.github.com/users/kristijanhusak/gists{/gist_id}","starred_url":"https://api.github.com/users/kristijanhusak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristijanhusak/subscriptions","organizations_url":"https://api.github.com/users/kristijanhusak/orgs","repos_url":"https://api.github.com/users/kristijanhusak/repos","events_url":"https://api.github.com/users/kristijanhusak/events{/privacy}","received_events_url":"https://api.github.com/users/kristijanhusak/received_events","type":"User","site_admin":false},"body":"Here's implementation of context menu discussed in https://github.com/autozimu/LanguageClient-neovim/issues/442. I think i put all available actions in the dictionary. If i missed some, let me know.\r\n\r\nBy default, it uses native `inputlist()` with the numbered list, where you can select the action by number. Like a second screenshot in issue.\r\n\r\nIf fzf iz available, it wraps prompt in it, like documentSymbol for example.\r\n\r\nFor Denite users, `contextMenu` source is added.","created_at":"2018-05-24T21:22:52Z","updated_at":"2018-05-25T02:11:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cd84ed8dd7988baad218f397bb2f2aa03a7fb42b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/pulls/446/commits","review_comments_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/pulls/446/comments","review_comment_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/issues/446/comments","statuses_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/statuses/15f4765496eb1260a22e753fdb87b0dde343a17d","head":{"label":"kristijanhusak:feature/context-menu","ref":"feature/context-menu","sha":"15f4765496eb1260a22e753fdb87b0dde343a17d","user":{"login":"kristijanhusak","id":1782860,"avatar_url":"https://avatars1.githubusercontent.com/u/1782860?v=4","gravatar_id":"","url":"https://api.github.com/users/kristijanhusak","html_url":"https://github.com/kristijanhusak","followers_url":"https://api.github.com/users/kristijanhusak/followers","following_url":"https://api.github.com/users/kristijanhusak/following{/other_user}","gists_url":"https://api.github.com/users/kristijanhusak/gists{/gist_id}","starred_url":"https://api.github.com/users/kristijanhusak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristijanhusak/subscriptions","organizations_url":"https://api.github.com/users/kristijanhusak/orgs","repos_url":"https://api.github.com/users/kristijanhusak/repos","events_url":"https://api.github.com/users/kristijanhusak/events{/privacy}","received_events_url":"https://api.github.com/users/kristijanhusak/received_events","type":"User","site_admin":false},"repo":{"id":134769669,"name":"LanguageClient-neovim","full_name":"kristijanhusak/LanguageClient-neovim","owner":{"login":"kristijanhusak","id":1782860,"avatar_url":"https://avatars1.githubusercontent.com/u/1782860?v=4","gravatar_id":"","url":"https://api.github.com/users/kristijanhusak","html_url":"https://github.com/kristijanhusak","followers_url":"https://api.github.com/users/kristijanhusak/followers","following_url":"https://api.github.com/users/kristijanhusak/following{/other_user}","gists_url":"https://api.github.com/users/kristijanhusak/gists{/gist_id}","starred_url":"https://api.github.com/users/kristijanhusak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristijanhusak/subscriptions","organizations_url":"https://api.github.com/users/kristijanhusak/orgs","repos_url":"https://api.github.com/users/kristijanhusak/repos","events_url":"https://api.github.com/users/kristijanhusak/events{/privacy}","received_events_url":"https://api.github.com/users/kristijanhusak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kristijanhusak/LanguageClient-neovim","description":"Language Server Protocol (LSP) support for vim and neovim.","fork":true,"url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim","forks_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/forks","keys_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/teams","hooks_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/hooks","issue_events_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/issues/events{/number}","events_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/events","assignees_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/assignees{/user}","branches_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/branches{/branch}","tags_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/tags","blobs_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/git/refs{/sha}","trees_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/statuses/{sha}","languages_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/languages","stargazers_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/stargazers","contributors_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/contributors","subscribers_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/subscribers","subscription_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/subscription","commits_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/commits{/sha}","git_commits_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/git/commits{/sha}","comments_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/comments{/number}","issue_comment_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/issues/comments{/number}","contents_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/contents/{+path}","compare_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/merges","archive_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/downloads","issues_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/issues{/number}","pulls_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/pulls{/number}","milestones_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/milestones{/number}","notifications_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/labels{/name}","releases_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/releases{/id}","deployments_url":"https://api.github.com/repos/kristijanhusak/LanguageClient-neovim/deployments","created_at":"2018-05-24T21:16:14Z","updated_at":"2018-05-24T21:16:16Z","pushed_at":"2018-05-24T21:19:57Z","git_url":"git://github.com/kristijanhusak/LanguageClient-neovim.git","ssh_url":"git@github.com:kristijanhusak/LanguageClient-neovim.git","clone_url":"https://github.com/kristijanhusak/LanguageClient-neovim.git","svn_url":"https://github.com/kristijanhusak/LanguageClient-neovim","homepage":"","size":43666,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"next"}},"base":{"label":"autozimu:next","ref":"next","sha":"8b3256315550af3f6222af033ea948a41d663630","user":{"login":"autozimu","id":1453551,"avatar_url":"https://avatars1.githubusercontent.com/u/1453551?v=4","gravatar_id":"","url":"https://api.github.com/users/autozimu","html_url":"https://github.com/autozimu","followers_url":"https://api.github.com/users/autozimu/followers","following_url":"https://api.github.com/users/autozimu/following{/other_user}","gists_url":"https://api.github.com/users/autozimu/gists{/gist_id}","starred_url":"https://api.github.com/users/autozimu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autozimu/subscriptions","organizations_url":"https://api.github.com/users/autozimu/orgs","repos_url":"https://api.github.com/users/autozimu/repos","events_url":"https://api.github.com/users/autozimu/events{/privacy}","received_events_url":"https://api.github.com/users/autozimu/received_events","type":"User","site_admin":false},"repo":{"id":81632022,"name":"LanguageClient-neovim","full_name":"autozimu/LanguageClient-neovim","owner":{"login":"autozimu","id":1453551,"avatar_url":"https://avatars1.githubusercontent.com/u/1453551?v=4","gravatar_id":"","url":"https://api.github.com/users/autozimu","html_url":"https://github.com/autozimu","followers_url":"https://api.github.com/users/autozimu/followers","following_url":"https://api.github.com/users/autozimu/following{/other_user}","gists_url":"https://api.github.com/users/autozimu/gists{/gist_id}","starred_url":"https://api.github.com/users/autozimu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autozimu/subscriptions","organizations_url":"https://api.github.com/users/autozimu/orgs","repos_url":"https://api.github.com/users/autozimu/repos","events_url":"https://api.github.com/users/autozimu/events{/privacy}","received_events_url":"https://api.github.com/users/autozimu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/autozimu/LanguageClient-neovim","description":"Language Server Protocol (LSP) support for vim and neovim.","fork":false,"url":"https://api.github.com/repos/autozimu/LanguageClient-neovim","forks_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/forks","keys_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/teams","hooks_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/hooks","issue_events_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/issues/events{/number}","events_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/events","assignees_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/assignees{/user}","branches_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/branches{/branch}","tags_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/tags","blobs_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/git/refs{/sha}","trees_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/statuses/{sha}","languages_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/languages","stargazers_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/stargazers","contributors_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/contributors","subscribers_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/subscribers","subscription_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/subscription","commits_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/commits{/sha}","git_commits_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/git/commits{/sha}","comments_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/comments{/number}","issue_comment_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/issues/comments{/number}","contents_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/contents/{+path}","compare_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/merges","archive_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/downloads","issues_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/issues{/number}","pulls_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/pulls{/number}","milestones_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/milestones{/number}","notifications_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/labels{/name}","releases_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/releases{/id}","deployments_url":"https://api.github.com/repos/autozimu/LanguageClient-neovim/deployments","created_at":"2017-02-11T05:04:30Z","updated_at":"2018-05-25T02:03:30Z","pushed_at":"2018-05-25T02:03:33Z","git_url":"git://github.com/autozimu/LanguageClient-neovim.git","ssh_url":"git@github.com:autozimu/LanguageClient-neovim.git","clone_url":"https://github.com/autozimu/LanguageClient-neovim.git","svn_url":"https://github.com/autozimu/LanguageClient-neovim","homepage":"","size":43665,"stargazers_count":1065,"watchers_count":1065,"language":"Rust","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":102,"mirror_url":null,"archived":false,"open_issues_count":25,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":102,"open_issues":25,"watchers":1065,"default_branch":"next"}},"_links":{"self":{"href":"https://api.github.com/repos/autozimu/LanguageClient-neovim/pulls/446"},"html":{"href":"https://github.com/autozimu/LanguageClient-neovim/pull/446"},"issue":{"href":"https://api.github.com/repos/autozimu/LanguageClient-neovim/issues/446"},"comments":{"href":"https://api.github.com/repos/autozimu/LanguageClient-neovim/issues/446/comments"},"review_comments":{"href":"https://api.github.com/repos/autozimu/LanguageClient-neovim/pulls/446/comments"},"review_comment":{"href":"https://api.github.com/repos/autozimu/LanguageClient-neovim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/autozimu/LanguageClient-neovim/pulls/446/commits"},"statuses":{"href":"https://api.github.com/repos/autozimu/LanguageClient-neovim/statuses/15f4765496eb1260a22e753fdb87b0dde343a17d"}},"author_association":"NONE"}}
{"actor":{"display_login":"autozimu"}}