{"id":21493135,"url":"https://github.com/jayli/vim-easycomplete","last_synced_at":"2025-04-05T14:09:36.890Z","repository":{"id":34004381,"uuid":"149473874","full_name":"jayli/vim-easycomplete","owner":"jayli","description":"杭州市余杭区最好用的 VIM/NVIM 代码补全插件","archived":false,"fork":false,"pushed_at":"2024-04-15T02:35:37.000Z","size":1963,"stargazers_count":397,"open_issues_count":42,"forks_count":26,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-04-15T13:55:29.074Z","etag":null,"topics":["ai","aicoding","complete","completion","deoplete","language-server-protocol","lsp","vim","vim-configs","vim-easycomplete","vim-plugin","viml","vimrc","youcompleteme"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jayli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-19T15:39:58.000Z","updated_at":"2024-04-15T00:54:28.000Z","dependencies_parsed_at":"2023-11-27T01:31:16.004Z","dependency_job_id":"65a942d4-edf4-4586-ac2e-82c49bd2accf","html_url":"https://github.com/jayli/vim-easycomplete","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayli%2Fvim-easycomplete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayli%2Fvim-easycomplete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayli%2Fvim-easycomplete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayli%2Fvim-easycomplete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jayli","download_url":"https://codeload.github.com/jayli/vim-easycomplete/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345856,"owners_count":20924102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","aicoding","complete","completion","deoplete","language-server-protocol","lsp","vim","vim-configs","vim-easycomplete","vim-plugin","viml","vimrc","youcompleteme"],"created_at":"2024-11-23T15:38:49.554Z","updated_at":"2025-04-05T14:09:36.870Z","avatar_url":"https://github.com/jayli.png","language":"Vim Script","readme":"# Vim-EasyComplete\n\nIt's a Fast and Minimalism Style Completion Plugin for vim/nvim. There are many excellent vim auto-completion plugins such as [nvim-cmp](https://github.com/hrsh7th/nvim-cmp), [vim-lsp](https://github.com/prabirshrestha/vim-lsp), [YouCompleteMe](https://github.com/ycm-core/YouCompleteMe) and [coc.nvim](https://github.com/neoclide/coc.nvim) etc. However I still want a simpler plugin without any redundant configurations. And it's a good idea to incorporate AI coding assistants as well.\n\n![](https://img.shields.io/badge/VimScript-Only-orange.svg?style=flat-square) ![](https://img.shields.io/badge/MacOS-available-brightgreen.svg?style=flat-square) ![](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square) ![](https://img.shields.io/github/workflow/status/jayli/vim-easycomplete/easycomplete.CI?style=flat-square)\n\n## What\n\nVim-easycomplete is a fast and minimalism style completion plugin for vim/nvim. It aims to be available out of the box on linux and mac. It is implemented in pure VimScript and is extremely simple to configure without installing Node and a bunch of Node modules.\n\nhttps://github.com/jayli/vim-easycomplete/assets/188244/5fdef6cb-ef1d-4428-960e-d9802cbc2a84\n\nIt contains these features:\n\n- AI coding assistant via [tabnine](#TabNine-Support). (Highly Recommend!)\n- Buffer Keywords/Directory support\n- LSP([language-server-protocol](https://github.com/microsoft/language-server-protocol)) support. Easy to install LSP Server with one command\n- Written in pure vim script for vim8 and neovim\n- Snippet support\n- Fast performance\n\n## Installation\n\nEasycomplete requires Vim 8.2 or higher version with MacOS/Linux/FreeBSD. For neovim users, 0.6.0 or higher is required.\n\nVimscript config with vim-plug:\n\n```vim\nPlug 'jayli/vim-easycomplete'\nPlug 'SirVer/ultisnips'\n```\nRun `:PlugInstall`.\n\nLua config with Packer.nvim:\n\n```lua\nuse { 'jayli/vim-easycomplete', requires = {'SirVer/ultisnips'}}\n```\nRun `:PackerInstall`\n\n[Full configuration example](custom-config.md).\n\n## Commands\n\nAll commands:\n\n| Command                           | Description                                         |\n|-----------------------------------|-----------------------------------------------------|\n| `:EasyCompleteInstallServer`      | Install LSP server for current fileytpe             |\n| `:InstallLspServer`               | Same as `EasyCompleteInstallServer`                 |\n| `:EasyCompleteDisable`            | Disable EasyComplete                                |\n| `:EasyCompleteEnable`             | Enable EasyComplete                                 |\n| `:EasyCompleteGotoDefinition`     | Goto definition position                            |\n| `:EasyCompleteReference`          | Find references                                     |\n| `:EasyCompleteRename`             | Rename                                              |\n| `:EasyCompleteCheck`              | Checking LSP server                                 |\n| `:EasyCompletePreviousDiagnostic` | Goto Previous diagnostic                            |\n| `:EasyCompleteNextDiagnostic`     | Goto Next diagnostic                                |\n| `:EasyCompleteProfileStart`       | Start record diagnostics message                    |\n| `:EasyCompleteProfileStop`        | Stop record diagnostics  message                    |\n| `:EasyCompleteLint`               | Do diagnostic                                       |\n| `:LintEasyComplete`               | Do diagnostic                                       |\n| `:BackToOriginalBuffer`           | Return to the position before the reference jump    |\n| `:DenoCache`                      | Do Deno Cache for downloading modules               |\n| `:CleanLog`                       | close quickfix window                               |\n\n## Configuration\n\nThe plugin is out of box and config nothing. (If you want full features, please refer to [my full configuration](./custom-config.md)). Use `Tab` to trigger the completion suggestions and select matched items. By default use `Ctrl-]` for definition jumping, `Ctrl-t` for jumping back (Same as tags jumping).\n\nLua configuration:\n\n```lua\n-- Highlight the symbol when holding the cursor if you need it\nvim.g.easycomplete_cursor_word_hl = 1\n-- Using nerdfont is highly recommended\nvim.g.easycomplete_nerd_font = 1\n\n-- GoTo code navigation\nvim.keymap.set('n', 'gr', ':EasyCompleteReference\u003cCR\u003e')\nvim.keymap.set('n', 'gd', ':EasyCompleteGotoDefinition\u003cCR\u003e')\nvim.keymap.set('n', 'rn', ':EasyCompleteRename\u003cCR\u003e')\nvim.keymap.set('n', 'gb', ':BackToOriginalBuffer\u003cCR\u003e')\n```\n\nVimscript configuration:\n\n```vim\n\" Highlight the symbol when holding the cursor\nlet g:easycomplete_cursor_word_hl = 1\n\" Using nerdfont is highly recommended\nlet g:easycomplete_nerd_font = 1\n\n\" GoTo code navigation\nnoremap gr :EasyCompleteReference\u003cCR\u003e\nnoremap gd :EasyCompleteGotoDefinition\u003cCR\u003e\nnoremap rn :EasyCompleteRename\u003cCR\u003e\nnoremap gb :BackToOriginalBuffer\u003cCR\u003e\n```\n\nOther optional configurations:\n\n- `set updatetime=300` (lua: `vim.opt.updatetime = 300`) is highly recommended.\n- Menu noselected by default: `setlocal completeopt+=noselect`, (lua: `vim.cmd('setlocal completeopt+=noselect')`)\n\nGlobal configurations:\n\n| Global Configure                     | Default       | Description                                                   |\n|--------------------------------------|---------------|---------------------------------------------------------------|\n| `g:easycomplete_nerd_font`           | 0             | Using nerdfont for lsp icons                                  |\n| `g:easycomplete_menu_skin`           | `{}`          | Menu skin.                                                    |\n| `g:easycomplete_sign_text`           | `{}`          | Sign icons.                                                   |\n| `g:easycomplete_lsp_type_font`       | ...           | lsp icons configuration                                       |\n| `g:easycomplete_tabnine_suggestion`  | 1             | Tabnine inline suggestion(for nvim only)                      |\n| `g:easycomplete_lsp_checking`        | 1             | Check whether the lsp is installed while opening a file       |\n| `g:easycomplete_tabnine_enable`      | 1             | Enable Tabnine                                                |\n| `g:easycomplete_directory_enable`    | 1             | Directory complete                                            |\n| `g:easycomplete_tabnine_config`      | `{}`          | [TabNine Configuration](#ai-coding-via-tabnine-support)       |\n| `g:easycomplete_filetypes`           | `{}`          | [Custom filetyps configuration](#language-support)            |\n| `g:easycomplete_enable`              | 1             | Enable this plugin                                            |\n| `g:easycomplete_tab_trigger`         | `\u003cTab\u003e`       | Use tab to trigger completion and select next item            |\n| `g:easycomplete_shift_tab_trigger`   | `\u003cS-Tab\u003e`     | Use s-tab to select previous item                             |\n| `g:easycomplete_cursor_word_hl`      | 0             | Highlight the symbol when holding the cursor                  |\n| `g:easycomplete_signature_offset`    | 0             | Signature offset                                              |\n| `g:easycomplete_diagnostics_next`    | `\u003cC-N\u003e`       | Goto next diagnostic position                                 |\n| `g:easycomplete_diagnostics_prev`    | `\u003cS-C-n\u003e`     | Goto previous diagnostic position                             |\n| `g:easycomplete_diagnostics_enable`  | 1             | Enable diagnostics                                            |\n| `g:easycomplete_signature_enable`    | 1             | Enable signature                                              |\n| `g:easycomplete_diagnostics_hover`   | 1             | Gives a diagnostic prompt when the cursor holds               |\n| `g:easycomplete_pum_format`          | `[\"abbr\", \"kind\", \"menu\"]`| Pmenu format                                      |\n\nTyping `:h easycomplete` for help.\n\n## Language Support\n\nThere are tow ways to install lsp server.\n\n1. For vim/nvim: via integrated installer by `:InstallLspServer`.\n2. For nvim only: via [nvim-lsp-installer](https://github.com/williamboman/nvim-lsp-installer) by `:LspInstall`\n\n```vim\nPlug 'williamboman/nvim-lsp-installer'\n```\n\nLSP Server will all be installed in `~/.config/vim-easycomplete/servers`.\n\nYou can give a specified plugin name for `InstallLspServer` command. Both of the following useage are avilable:\n\n- `:InstallLspServer`\n- `:InstallLspServer lua`\n\nAll supported languages:\n\n| Plugin Name | Languages | Language Server          | Installer          | Requirements | nvim-lsp-installer support|\n|-------------|-----------|:------------------------:|:------------------:|:------------:|:-------------------------:|\n| directory   | directory | No Need                  | Integrated         | None         | -                         |\n| buf         | buf \u0026 dict| No Need                  | Integrated         | None         | -                         |\n| snips       | Snippets  | ultisnips                | Integrated         | python3      | -                         |\n| ts          | js/ts     | tsserver                 | Yes                | node/npm     | Yes                       |\n| deno        | js/ts     | denols                   | Yes                | deno         | Yes                       |\n| tn          | TabNine   | TabNine                  | Yes                | None         | No                        |\n| vim         | Vim       | vimls                    | Yes                | node/npm     | Yes                       |\n| cpp         | C/C++/OC  | clangd                   | Yes                | None         | Yes                       |\n| css         | CSS       | cssls                    | Yes                | node/npm     | Yes                       |\n| html        | HTML      | html                     | Yes                | node/npm     | Yes                       |\n| yml         | YAML      | yamlls                   | Yes                | node/npm     | Yes                       |\n| xml         | Xml       | lemminx                  | Yes                | java/jdk     | Yes                       |\n| sh          | Bash      | bashls                   | Yes                | node/npm     | Yes                       |\n| json        | JSON      | json-languageserver      | Yes                | node/npm     | No                        |\n| php         | php       | intelephense             | Yes                | node/npm     | Yes                       |\n| dart        | dart      | dartls                   | Yes                | None         | Yes                       |\n| py          | Python    | pylsp                    | Yes                | python3/pip3 | Yes                       |\n| java        | Java      | jdtls                    | Yes                | java11/jdk   | Yes                       |\n| go          | Go        | gopls                    | Yes                | go           | Yes                       |\n| r           | R         | r-languageserver         | Yes                | R            | No                        |\n| rb          | Ruby      | solargraph               | Yes                | ruby/bundle  | No                        |\n| lua         | Lua       | `sumneko_lua`            | Yes                | Lua          | Yes                       |\n| nim         | Nim       | nimls                    | Yes                | nim/nimble   | Yes                       |\n| rust        | Rust      | `rust_analyzer`          | Yes                | None         | Yes                       |\n| kt          | Kotlin    | `kotlin_language_server` | Yes                | java/jdk     | Yes                       |\n| grvy        | Groovy    | groovyls                 | Yes                | java/jdk     | Yes                       |\n| cmake       | cmake     | cmake                    | Yes                | python3/pip3 | Yes                       |\n| c#          | C#        | omnisharp-lsp            | Yes                | None         | No                        |\n\nMore info about semantic completion for each supported language:\n\n- JavaScript \u0026 TypeScript: [tsserver](https://github.com/microsoft/TypeScript) required.\n- Python: There are 2 avilable python-language-server branches:\n    - [pyls](https://github.com/palantir/python-language-server) support python 3.5 ~ 3.10 ([pyls breaks autocomplete on Python 3.11](https://github.com/palantir/python-language-server/issues/959)), `pip3 install python-language-server`\n    - [pylsp](https://github.com/python-lsp/python-lsp-server) work well with python 3.11, `pip3 install python-lsp-server`, (Recommend)\n- Go: [gopls](https://github.com/golang/tools/tree/master/gopls) required. (`go get golang.org/x/tools/gopls`)\n- Vim Script: [vimls](https://github.com/iamcco/vim-language-server) required.\n- C++/C/OC：[Clangd](https://github.com/clangd/clangd) required.\n- CSS: [cssls](https://github.com/vscode-langservers/vscode-css-languageserver-bin) required. (css-languageserver)，Css-languageserver dose not support CompletionProvider by default as it requires [Snippets](https://github.com/neovim/nvim-lspconfig/wiki/Snippets)，You must install it manually.\n- JSON: [json-languageserver](https://github.com/vscode-langservers/vscode-json-languageserver-bin) required.\n- PHP: [intelephense](https://www.npmjs.com/package/intelephense)\n- Dart: [dartls](https://storage.googleapis.com/dart-archive/)\n- HTML: [html](https://github.com/vscode-langservers/vscode-html-languageserver-bin) required. html-languageserver dose not support CompletionProvider by default. You must install [Snippets](https://github.com/neovim/nvim-lspconfig/wiki/Snippets) manually.\n- Shell: [bashls](https://github.com/bash-lsp/bash-language-server) required.\n- Java: [jdtls](https://github.com/eclipse/eclipse.jdt.ls/), java 11 and upper version required.\n- Cmake: [cmake](https://github.com/regen100/cmake-language-server) required.\n- Kotlin: [kotlin language server](https://github.com/fwcd/kotlin-language-server) required.\n- Rust: [rust-analyzer](https://github.com/rust-analyzer/rust-analyzer) required.\n- Lua: [sumneko lua](https://github.com/sumneko/lua-language-server) required. Local configuration file path is `~/.config/vim-easycomplete/servers/lua/config.json`. Get more information [here](https://github.com/xiyaowong/coc-sumneko-lua/blob/main/settings.md).\n- Xml: [lemminx](https://github.com/eclipse/lemminx) required.\n- Groovy: [groovyls](https://github.com/prominic/groovy-language-server) required.\n- Yaml: [yamlls](https://github.com/redhat-developer/yaml-language-server) required.\n- Ruby: [solargraph](https://github.com/castwide/solargraph) required.\n- Nim: [nimlsp](https://github.com/PMunch/nimlsp) required. [packages.json](https://github.com/nim-lang/packages/blob/master/packages.json) downloading is very slow, You'd better intall minlsp manually via `choosenim` follow [this guide](https://github.com/jayli/vim-easycomplete/issues/155#issuecomment-1041581629).\n- Deno: [denols](https://morioh.com/p/84a54d70a7fa) required. Use `:DenoCache` command for `deno cache` current ts/js file.\n- C# : [omnisharp](http://www.omnisharp.net/) required.\n- R: [r-languageserver](https://github.com/REditorSupport/languageserver) required.\n- TabNine: [TabNine](https://www.tabnine.com/)\n\nAdd filetypes whitelist for specified language plugin:\n\n```vim\nlet g:easycomplete_filetypes = {\n      \\   \"sh\": {\n      \\     \"whitelist\": [\"shell\"]\n      \\   },\n      \\   \"r\": {\n      \\     \"whitelist\": [\"rmd\", \"rmarkdown\"]\n      \\   },\n      \\ }\n```\n\n### Snippet Support\n\nVim-EasyComplete does not support snippets by default. If you want snippet integration, you will first have to install `ultisnips`. UltiSnips is compatible with Vim-EasyComplete out of the box. UltiSnips required python3 installed.\n\n\u003e [Solution of \"E319: No python3 provider found\" Error in neovim 0.4.4 with ultisnips](https://github.com/jayli/vim-easycomplete/issues/171)\n\n## AI Coding via TabNine Support\n\nInstall TabNine: `:InstallLspServer tabnine`. Then restart your vim/nvim.\n\n\u003cimg src=\"https://gw.alicdn.com/imgextra/i2/O1CN01Qjk2tV2A20Ss9jtcq_!!6000000008144-0-tps-792-470.jpg\" width=\"500px\" /\u003e\n\nSet `let g:easycomplete_tabnine_enable = 0` to disable TabNine. You can config TabNine by `g:easycomplete_tabnine_config` witch contains two properties:\n\n- *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)\n- *max_num_result*: Max results from TabNine. (default: 3)\n\n```vim\nlet g:easycomplete_tabnine_config = {\n    \\ 'line_limit': 1000,\n    \\ 'max_num_result' : 3,\n    \\ }\n```\n\nTabNine 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.\n\nDisable TabNine inline suggestion: `let g:easycomplete_tabnine_suggestion = 0`.\n\n---------------------\n\n## Beautify completion menu\n\nSet `g:easycomplete_nerd_font = 1` to enable default nerdfonts configuration.\n\nIf you want to customize the kind icon, you can modify the configuration with \u003chttps://nerdfonts.com\u003e installed. [Examples](custom-config.md).\n\nYou can add custom Pmenu styles by defining these highlight groups:\n\n- `EasyFuzzyMatch`: highlight fuzzy matching character. It links to \"Constant\" by default if it's not defined.\n- `EasyPmenu`: Pmenu style. It links to \"Pmenu\" by default.\n- `EasyPmenuKind`: PmenuKind style. It links to \"PmenuKind\" by default.\n- `EasyPmenuExtra`: PmenuExtra style. It links to \"PmenuExtra\" by default.\n- `EasyFunction`: Function kind icon style. links to \"Conditional\" by default.\n- `EasySnippet`: Snippet kind icon style. links to \"Number\" by default.\n- `EasyTabNine`: TabNine kind icon style. links to \"Character\" by default.\n- `EasySnippets`: TabNine snippets suggestion style. links to \"LineNr\" by default\n\nMore examples here: [full config example](custom-config.md)\n\nMy custom config:[my-custom-config](my-custom-config.md)\n\n![截屏2023-12-30 20 25 06](https://github.com/jayli/vim-easycomplete/assets/188244/597db686-d4fe-4b25-8c39-d9b90db184cb)\n\n## Add custom completion plugin\n\n→ [add custom completion plugin](add-custom-plugin.md)\n\n## Issues\n\n[WIP] If you have bug reports or feature suggestions, please use the [issue tracker](https://github.com/jayli/vim-easycomplete/issues/new). In the meantime feel free to read some of my thoughts at \u003chttps://zhuanlan.zhihu.com/p/366496399\u003e, \u003chttps://zhuanlan.zhihu.com/p/425555993\u003e, [https://medium.com/@lijing00333/vim-easycomplete](https://dev.to/jayli/how-to-improve-your-vimnvim-coding-experience-with-vim-easycomplete-29o0)\n\n## More Examples:\n\nTabNine snippets inline suggestion\n\n\u003cimg src=\"https://gw.alicdn.com/imgextra/i2/O1CN01vESZ6G1h3j5u4hmN4_!!6000000004222-1-tps-1189-606.gif\" width=\"600\" /\u003e\n\nUpdate Deno Cache via `:DenoCache`\n\n\u003cimg src=\"https://img.alicdn.com/imgextra/i4/O1CN01kjPu4M1FVNbRKVrUD_!!6000000000492-1-tps-943-607.gif\" width=600 /\u003e\n\nDirectory selecting:\n\n\u003cimg src=\"https://img.alicdn.com/imgextra/i2/O1CN01FciC1Q1WHV4HJ79qn_!!6000000002763-1-tps-1027-663.gif\" width=600 /\u003e\n\nHandle backsapce typing\n\n\u003cimg src=\"https://img.alicdn.com/imgextra/i3/O1CN01obuQnJ1tIAoUNv8Up_!!6000000005878-1-tps-880-689.gif\" width=600 /\u003e\n\nSnip Support\n\n\u003cimg src=\"https://img.alicdn.com/imgextra/i3/O1CN01dGIJZW204A0MpESbI_!!6000000006795-1-tps-750-477.gif\" width=600 /\u003e\n\nDiagnostics jumping\n\n\u003cimg src=\"https://img.alicdn.com/imgextra/i1/O1CN01g7PWjZ1q7EVKVpxno_!!6000000005448-1-tps-902-188.gif\" width=600 /\u003e\n\nSignature\n\n\u003cimg src=\"https://img.alicdn.com/imgextra/i4/O1CN01kNd19n1k7nINy4SQT_!!6000000004637-1-tps-862-228.gif\" width=600 /\u003e\n\nTabNine supporting:\n\n\u003cimg src=\"https://img.alicdn.com/imgextra/i3/O1CN013nBG6n1WjRE8rgMNi_!!6000000002824-1-tps-933-364.gif\" width=600 /\u003e\n\n### License\n\nMIT\n","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayli%2Fvim-easycomplete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjayli%2Fvim-easycomplete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayli%2Fvim-easycomplete/lists"}