@@ -15,7 +15,7 @@ Vim-easycomplete is a fast and minimalism style completion plugin for both vim a
1515It contains these features:
1616
1717- Full [ lsp] ( [language-server-protocol](https://github.com/microsoft/language-server-protocol) ) support. Easy to install LSP Server with one command
18- - Keywords/Directory support
18+ - Keywords/path support
1919- Implemented based on pure vimscript
2020- Snippet support.
2121- Fast performance
@@ -26,7 +26,38 @@ It contains these features:
2626
2727Requires Vim 8.2 or higher version on MacOS/Linux/FreeBSD. Neovim 0.7.0 or higher.
2828
29- Lua config with Packer.nvim:
29+ Lua config with Packer.nvim via ` require("easycomplete").config(opt) ` :
30+
31+ ``` lua
32+ use { ' jayli/vim-easycomplete' , requires = {' L3MON4D3/LuaSnip' }}
33+ -- For snippet support, 'SirVer/ultisnips' is an alternative option
34+ -- `tabnine_enable = 0` alias `vim.g.easycomplete_tabnine_enable = 0`
35+ require (" easycomplete" ).config ({
36+ cmdline = 1 ,
37+ pum_noselect = 0 ,
38+ tabnine_enable = 0 ,
39+ nerd_font = 1 ,
40+ enable = 1 ,
41+ winborder = 1 ,
42+ ghost_text = 1 ,
43+ menu_abbr = 0 ,
44+ pum_format = {" abbr" , " kind" , " menu" },
45+ setup = function ()
46+ vim .keymap .set (' n' , ' gr' , ' :EasyCompleteReference<CR>' )
47+ vim .keymap .set (' n' , ' gd' , ' :EasyCompleteGotoDefinition<CR>' )
48+ vim .keymap .set (' n' , ' rn' , ' :EasyCompleteRename<CR>' )
49+ -- Plugin has already bind shift-k to `:EasyCompleteHover`
50+ -- vim.keymap.set('n', 'gh', ':EasyCompleteHover<CR>')
51+ vim .keymap .set (' n' , ' gb' , ' :BackToOriginalBuffer<CR>' )
52+ end
53+ })
54+ ```
55+
56+ Run ` :PackerInstall `
57+
58+ [ Full configuration] ( https://github.com/jayli/vim-easycomplete/wiki/2.-%E5%AE%89%E8%A3%85%E5%92%8C%E9%85%8D%E7%BD%AE#%E5%9F%BA%E4%BA%8E-lua-%E7%9A%84%E5%AE%8C%E6%95%B4%E9%85%8D%E7%BD%AE )
59+
60+ You can configure it through global variables like this which is exactly the same as the above configuration:
3061
3162``` lua
3263-- lua
@@ -65,6 +96,7 @@ vim.g.easycomplete_cmdline = 1
6596-- vim.g.easycomplete_use_default_cr = 0
6697-- vim.keymap.set('i', '<C-L>', '<Plug>EasycompleteCR')
6798```
99+
68100Run ` :PackerInstall `
69101
70102Vimscript config with vim-plug:
@@ -110,24 +142,6 @@ Run `:PlugInstall`.
110142
111143[ Full configuration example] ( custom-config.md ) .
112144
113- Lua style setup with ` require("easycomplete").setup() ` :
114-
115- ``` lua
116- -- lua style setup
117- -- `tabnine_enable = 0` alias `vim.g.easycomplete_tabnine_enable = 0`
118- require (" easycomplete" ).setup ({
119- cmdline = 1 ,
120- pum_noselect = 0 ,
121- tabnine_enable = 0 ,
122- nerd_font = 1 ,
123- enable = 1 ,
124- winborder = 1 ,
125- ghost_text = 1 ,
126- menu_abbr = 0 ,
127- pum_format = {" abbr" , " kind" , " menu" }
128- })
129- ```
130-
131145## Useage
132146
133147- ` Tab ` /` S-Tab ` : select next/previous matched items.
@@ -177,7 +191,7 @@ Global configurations:
177191| ` g:easycomplete_tabnine_suggestion ` | 0 | Tabnine inline suggestion(for nvim only) |
178192| ` g:easycomplete_lsp_checking ` | 1 | Check whether the lsp is installed while opening a file |
179193| ` g:easycomplete_tabnine_enable ` | 1 | Enable Tabnine |
180- | ` g:easycomplete_directory_enable ` | 1 | Directory complete |
194+ | ` g:easycomplete_path_enable ` | 1 | Path complete |
181195| ` g:easycomplete_tabnine_config ` | ` {} ` | [ TabNine Configuration] ( #ai-coding-via-tabnine-support ) |
182196| ` g:easycomplete_filetypes ` | ` {} ` | [ Custom filetyps configuration] ( #language-support ) |
183197| ` g:easycomplete_enable ` | 1 | Enable this plugin |
@@ -222,7 +236,7 @@ All supported languages:
222236
223237| Plugin Name | Languages | Language Server | Installer | Requirements | URL |
224238| -------------| -----------| :------------------------:| :------------------:| :------------:| :---:|
225- | directory | directory | No Need | Integrated | None | |
239+ | path | path | No Need | Integrated | None | |
226240| buf | buf & dict| No Need | Integrated | None | |
227241| snips | Snippets | ultisnips/LuaSnip | Integrated | python3/lua | |
228242| ts | js/ts | tsserver | Yes | node/npm | |
0 commit comments