From 68678b9666b670235a4ad6ef695b3049c7fdf4a1 Mon Sep 17 00:00:00 2001 From: jayli Date: Wed, 6 Dec 2023 17:48:23 +0800 Subject: [PATCH] update readme doc file --- doc/easycomplete.txt | 92 +++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 53 deletions(-) diff --git a/doc/easycomplete.txt b/doc/easycomplete.txt index 820e0895..97ff96db 100644 --- a/doc/easycomplete.txt +++ b/doc/easycomplete.txt @@ -1,6 +1,6 @@ *easycomplete.txt* Vim-EasyComplete Plugin - Copyright (c) 2020-2022 @Jayli + Copyright (c) 2020-2024 @Jayli More Info: https://github.com/jayli/vim-easycomplete EasyComplete *easycomplete* @@ -9,11 +9,10 @@ EasyComplete *easycomplete* Introduction -Vim-Easycomplete is a fast completion plugin for vim/nvim. The goal is to work -everywhere out of the box with high-speed performance. It requires pure Vim Script. -You don't need to configure anything. Especially, You don't have to install Node -and a bunch of Node Modules unless you're a js/ts developer. It's definitely a -minimalism style plugin. +Vim-easycomplete is a fast and minimalism style completion plugin for vim/nvim. +The goal is to work everywhere out of the box. It requires pure VimScript. It's +also super simple to configure. Especially, You don’t have to install Node and +a bunch of Node modules unless you’re a js/ts programmer. Vim-Easycomplete is easy to install and use. It contains these features: @@ -28,8 +27,7 @@ Vim-Easycomplete is easy to install and use. It contains these features: Requirements -Neovim >= 0.4.0 or Vim >= 8.0, for best experience, use neovim >= 0.5.0 -or vim >= 8.2. +Neovim >= 0.7.0 or Vim >= 8.2 =============================================================================== @@ -50,60 +48,48 @@ can be ignored in most cases. =============================================================================== -Useage - -You can use Tab to trigger the completion suggestions anywhere. Alse use Tab and -Shift-Tab to select matched items. Use `Ctrl-]` for definition jumping, `Ctrl-t` -for jumping back (Same as tags jumping). +Configuration -Or you can use `:EasyCompleteGotoDefinition` and `:EasyCompleteReference` command. > +The plugin is out of box and config nothing. 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). - nmap gr :EasyCompleteReference - nmap gd :EasyCompleteGotoDefinition -< +Example configuration with lua: > -Use `:EasyCompleteNextDiagnostic` and `:EasyCompletePreviousDiagnostic` for -diagnostics jumping. For example, map diagnostic jumping to `` and `` > + -- Highlight the symbol when holding the cursor if you need it + vim.g.easycomplete_cursor_word_hl = 1 + -- Using nerdfont is highly recommended + vim.g.easycomplete_nerd_font = 1 - nnoremap :EasyCompleteNextDiagnostic - nnoremap :EasyCompletePreviousDiagnostic + -- GoTo code navigation + vim.keymap.set('n', 'gr', ':EasyCompleteReference') + vim.keymap.set('n', 'gd', ':EasyCompleteGotoDefinition') + vim.keymap.set('n', 'rn', ':EasyCompleteRename') + vim.keymap.set('n', 'gb', ':BackToOriginalBuffer') < -In most cases, the plugin already map these tow HOTKEYs for you successfully. You -only have to set custom diagnostic HOTKEYs manually in case of there was a conflict. - -Checking if LSP server is installed via `:EasyCompleteCheck`. If current LSP -Server is not ready, Use `:EasyCompleteInstallServer` to install. - -Typing `./` or `../` to trigger directory completion suggestion. - -Dictionary suggestion support via `set dictionary=${Your_Dictionary_File}` if -you need. - -- Set `let g:easycomplete_diagnostics_enable = 0` to disable lsp diagnostics. -- Set `let g:easycomplete_lsp_checking = 0` to disable lsp checking for installation. - Typing `:h easycomplete` for help. All commands: -| Command | Description | -| --------------------------------- | ---------------------------------------- | -| `:EasyCompleteInstallServer` | Install LSP server for current fileytpe | -| `:InstallLspServer` | Same as `EasyCompleteInstallServer` | -| `:EasyCompleteDisable` | Disable EasyComplete | -| `:EasyCompleteEnable` | Enable EasyComplete | -| `:EasyCompleteGotoDefinition` | Goto definition position | -| `:EasyCompleteReference` | find references | -| `:EasyCompleteRename` | rename | -| `:EasyCompleteCheck` | Checking LSP server | -| `:EasyCompletePreviousDiagnostic` | Goto Previous diagnostic | -| `:EasyCompleteNextDiagnostic` | Goto Next diagnostic | -| `:EasyCompleteProfileStart` | Start record diagnostics message | -| `:EasyCompleteProfileStop` | Stop record diagnostics message | -| `:EasyCompleteLint` | Do diagnostic | -| `:LintEasyComplete` | Do diagnostic | -| `:DenoCache` | Do Deno Cache for downloading modules | -| `:CleanLog` | close quickfix window | +| Command | Description | +|-----------------------------------|-------------------------------------------------| +| `:EasyCompleteInstallServer` | Install LSP server for current fileytpe | +| `:InstallLspServer` | Same as `EasyCompleteInstallServer` | +| `:EasyCompleteDisable` | Disable EasyComplete | +| `:EasyCompleteEnable` | Enable EasyComplete | +| `:EasyCompleteGotoDefinition` | Goto definition position | +| `:EasyCompleteReference` | Find references | +| `:EasyCompleteRename` | Rename | +| `:EasyCompleteCheck` | Checking LSP server | +| `:EasyCompletePreviousDiagnostic` | Goto Previous diagnostic | +| `:EasyCompleteNextDiagnostic` | Goto Next diagnostic | +| `:EasyCompleteProfileStart` | Start record diagnostics message | +| `:EasyCompleteProfileStop` | Stop record diagnostics message | +| `:EasyCompleteLint` | Do diagnostic | +| `:LintEasyComplete` | Do diagnostic | +| `:BackToOriginalBuffer` | Return to the position before the reference jump| +| `:DenoCache` | Do Deno Cache for downloading modules | +| `:CleanLog` | close quickfix window | ===============================================================================