You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+83-39Lines changed: 83 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,17 +18,18 @@ It contains these features:
18
18
- Full [lsp]([language-server-protocol](https://github.com/microsoft/language-server-protocol)) support. Easy to install LSP Server with one command
19
19
- Keywords/Directory support
20
20
- Implemented based on pure vimscript
21
-
- Snippet support via [Snippets](https://github.com/neovim/nvim-lspconfig/wiki/Snippets).
21
+
- Snippet support.
22
22
- Fast performance
23
23
- AI coding assistant via [tabnine](#TabNine-Support).
24
24
25
25
## Installation
26
26
27
-
Requires Vim 8.2 or higher version on MacOS/Linux/FreeBSD. Neovim 0.6.0 or higher.
27
+
Requires Vim 8.2 or higher version on MacOS/Linux/FreeBSD. Neovim 0.7.0 or higher.
28
28
29
29
Lua config with Packer.nvim:
30
30
31
31
```lua
32
+
-- lua
32
33
use { 'jayli/vim-easycomplete', requires= {'L3MON4D3/LuaSnip'}}
33
34
-- For snippet support, 'SirVer/ultisnips' is an alternative option
34
35
-- Tabnine aicoding support, default is 1
@@ -57,6 +58,7 @@ L3MON4D3/LuaSnip
57
58
58
59
59
60
```vim
61
+
" vim
60
62
Plug 'jayli/vim-easycomplete'
61
63
Plug 'L3MON4D3/LuaSnip' " 'SirVer/ultisnips' is a backup option
62
64
" Tabnine aicoding support, default is 1
@@ -82,9 +84,11 @@ Run `:PlugInstall`.
82
84
83
85
## Useage
84
86
85
-
Use `Tab` to trigger the completion suggestions and select matched items. Use `Ctrl-]` for definition jumping, `Ctrl-t` for jumping back (Same as tags jumping).
86
-
87
-
Use `Ctrl-N`/`Shift-Ctrl-N` to jump to the next/previous diagnostic position.
@@ -227,7 +231,10 @@ More info about supported language:
227
231
228
232
You can add filetypes whitelist for specified language plugin. In most cases, it is not necessary to do so:
229
233
234
+
vimscript
235
+
230
236
```vim
237
+
" vim
231
238
let g:easycomplete_filetypes = {
232
239
\ "sh": {
233
240
\ "whitelist": ["shell"]
@@ -238,17 +245,41 @@ let g:easycomplete_filetypes = {
238
245
\ }
239
246
```
240
247
248
+
luascript
249
+
250
+
```lua
251
+
-- lua
252
+
vim.g.easycomplete_filetypes= {
253
+
sh= {
254
+
whitelist= {"shell"}
255
+
},
256
+
r= {
257
+
whitelist= {"rmd", "rmarkdown"}
258
+
}
259
+
}
260
+
```
261
+
241
262
### Snippet Support
242
263
243
264
The snippet completion of Vim-EasyComplete relies on ultisnip or luasnip. They are both compatible with Vim-EasyComplete by simply place it in the dependent field. UltiSnips required python3 installed. You can use your own snippets path to replace the default snippets.
244
265
266
+
vimscript
267
+
245
268
```vim
269
+
" vim
246
270
let g:easycomplete_custom_snippet = "./path/to/your/snippets"
247
271
```
248
272
249
-
[LuaSnip](https://github.com/L3MON4D3/LuaSnip) is better choice for nvim.
You can add your own snippet directory to `&runtimepath`.
280
+
You can alse add your own snippet directory to `&runtimepath`.
281
+
282
+
[LuaSnip](https://github.com/L3MON4D3/LuaSnip) is better choice for nvim.
252
283
253
284
## AI Coding Inline Suggestion
254
285
@@ -265,13 +296,26 @@ Config TabNine via `g:easycomplete_tabnine_config` witch contains two properties
265
296
-*line_limit*: The number of lines before and after the cursor to send to TabNine. If the option is smaller, the performance may be improved. (default: 1000)
266
297
-*max_num_result*: Max results from TabNine showing in the complete menu. (default: 3)
267
298
299
+
vimscript
300
+
268
301
```vim
302
+
" vim
269
303
let g:easycomplete_tabnine_config = {
270
304
\ 'line_limit': 1000,
271
305
\ 'max_num_result' : 3,
272
306
\ }
273
307
```
274
308
309
+
luascript
310
+
311
+
```lua
312
+
-- lua
313
+
vim.g.easycomplete_tabnine_config= {
314
+
line_limit=1000,
315
+
max_num_result=3
316
+
}
317
+
```
318
+
275
319
TabNine works well without APIKey. If you have a Tabnine's Pro API key or purchased a subscription license. To configure, you'll need to use the [TabNine' magic string](https://www.tabnine.com/faq#special_commands) (Type `Tabnine::config` in insert mode) to open the configuration panel.
0 commit comments