22
33# Asynchronous R completion for Neovim and vim 8
44
5- ![ fullscreen screencast ] ( https://user-images.githubusercontent.com/6551953/33690893-e896c35e-dae5-11e7-973d-cc1bffed1fcf.gif )
5+ [ ![ R completion for Neovim and vim 8 with ncm-R ] ( https://asciinema.org/a/lsy3CMrmrDAK0IW6ABtJD079n.png )] ( https://asciinema.org/a/lsy3CMrmrDAK0IW6ABtJD079n )
66
7- ncm-R extends the
7+ ncm-R provides asynchronous, as-you-type completion for the R language, as well
8+ as R documents such as RMarkdown.
9+
10+ It relies on the great plugin
11+ [ nvim-R] ( https://github.com/jalvesaq/Nvim-R ) to get the completion data and
12+ extends the
813[ nvim-completion-manager] ( https://github.com/roxma/nvim-completion-manager )
9- (NCM) framework to provide asynchronous completion for the R language. It relies on the great plugin
10- [ nvim-R] ( https://github.com/jalvesaq/Nvim-R ) to get the completion data.
14+ (NVM) framework for the completion.
1115
1216** Table of contents:**
1317<!-- vim-markdown-toc GFM -->
@@ -24,48 +28,46 @@ ncm-R extends the
2428* [ Contributing to ncm-R] ( #contributing-to-ncm-r )
2529 * [ Overview] ( #overview )
2630 * [ Debugging] ( #debugging )
31+ * [ Contributors] ( #contributors )
2732
2833<!-- vim-markdown-toc -->
2934
3035## Features
3136
3237### Completion
3338
34- ** Objects** from the global R environment :
35-
36- ![ variables] ( https://user-images.githubusercontent.com/6551953/33718172-ce45f746-db5c-11e7-878f-818f5a7059b3.gif )
37-
38- ** Functions** from loaded packages or from specific package with ` package:: ` :
39-
40- ![ functions] ( https://user-images.githubusercontent.com/6551953/33718180-d4510ff4-db5c-11e7-9536-8e8b52f9630f.gif )
41-
42- ** Packages** inside ` library() ` and ` require() ` :
43-
44- ![ library] ( https://user-images.githubusercontent.com/6551953/33718181-d47e22dc-db5c-11e7-9768-385b1c1558fe.gif )
45-
46- ** Datasets** inside ` data() ` :
47-
48- ![ data] ( https://user-images.githubusercontent.com/6551953/33718183-d49b9f06-db5c-11e7-8c97-a5a1793907a3.gif )
49-
50- ** Arguments** inside functions:
51-
52- ![ arguments] ( https://user-images.githubusercontent.com/6551953/33718185-d4b86816-db5c-11e7-8db8-28df7a95d456.gif )
53-
54- ** Variables inside data transformation pipelines** (` %>% ` ) ** and building ggplots** (` + ` ):
55-
56- ![ pipeline] ( https://user-images.githubusercontent.com/6551953/33718382-76ee990c-db5d-11e7-9a84-89e790c9e577.gif )
39+ + ** Objects** from the global R environment
40+ + ** Functions** from loaded packages or from specific package with ` package:: `
41+ + ** Packages** inside ` library() ` and ` require() `
42+ + ** Datasets** inside ` data() `
43+ + ** Arguments** inside functions
44+ + ** Variables inside data transformation pipelines** (` %>% ` ) ** and building ggplots** (` + ` )
5745
5846### Snippets
5947
6048If [ UltiSnips] ( https://github.com/sirver/UltiSnips ) is installed, pressing
6149<kbd >Tab</kbd > after selecting a completion suggestion will ** expand syntax
62- snippets** :
50+ snippets** . Snippets in ncm-R are designed to help you save a few keystrokes by
51+ writing some code for you. I find it particularly useful with function
52+ arguments.
53+
54+ You can see when a snippet is available for a suggestion when a ` [+] ` appears
55+ in the pop-up menu.
56+
57+ Here's a list of all available snippets:
6358
64- + ` dataframe ` -> ` dataframe %>% `
65- + ` function ` -> ` function(arg1, arg2, ...) ` (expands only arguments with no
66- default value)
67- + ` package ` -> ` package:: `
68- + ` argument ` -> ` argument = DEFAULT_VALUE `
59+ + ` dataframe ` -> ` dataframe %>%| `
60+ + ` function ` -> ` function([arg1], arg2) ` (expands only arguments with no
61+ default value, you can then <kbd >Tab</kbd > to go to the next argument)
62+ + ` package ` -> ` package::| `
63+ + ` argument ` (use <kbd >Tab</kbd > to go after the end of expanded text):
64+ + By default -> ` argument = [DEFAULT_VALUE] `
65+ + If default value is inside quotes -> ` argument = "[default]" `
66+ + If default value is a boolean, then use its negation. For instance, if
67+ ` TRUE ` by default then it will expand to ` argument = [FALSE] `
68+
69+ ` | ` stands for the cursor position and ` [] ` shows the cursor selection after snippet
70+ expansion.
6971
7072### R Markdown and Rnoweb
7173
@@ -176,10 +178,13 @@ Nvim-R's
176178README] ( https://github.com/jalvesaq/Nvim-R#the-communication-between-r-and-either-vim-or-neovim )
177179and ` :help NCM-API ` .
178180
179- Special thanks to @jalvesaq for making several improvements to Nvim-R's API.
180-
181181### Debugging
182182
183183You can run ` NVIM_PYTHON_LOG_FILE=nvim.log NVIM_PYTHON_LOG_LEVEL=INFO nvim `
184184then look at ` nvim.log_py3_cm_core ` . You can also `tail -f nvim.log_py3_cm_core
185185| grep ncm-R` to get only ncm-R messages.
186+
187+ ### Contributors
188+
189+ Special thanks to [ @jalvesaq ] ( https://github.com/jalvesaq ) for making several
190+ improvements to Nvim-R's API.
0 commit comments