Skip to content

Commit

Permalink
bugfix for add example link
Browse files Browse the repository at this point in the history
  • Loading branch information
jayli committed Apr 15, 2024
1 parent 5545fcb commit d385f64
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 12 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ It contains these features:

Easycomplete requires Vim 8.2 or higher version with MacOS/Linux/FreeBSD. For neovim users, 0.6.0 or higher is required.

Vim config via vim-plug with vimscript:
Vimscript config with vim-plug:

```vim
Plug 'jayli/vim-easycomplete'
Plug 'SirVer/ultisnips'
```
Run `:PlugInstall`.

Nvim config via Packer.nvim with lua:
Lua config with Packer.nvim:

```lua
use { 'jayli/vim-easycomplete', requires = {'SirVer/ultisnips'}}
```
Run `:PackerInstall`

[Full configuration](custom-config.md) in lua.
[Full configuration example](custom-config.md).

## Commands

Expand Down Expand Up @@ -72,7 +72,7 @@ All commands:

The 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).

Example configuration with lua:
Lua configuration:

```lua
-- Highlight the symbol when holding the cursor if you need it
Expand All @@ -87,7 +87,7 @@ vim.keymap.set('n', 'rn', ':EasyCompleteRename<CR>')
vim.keymap.set('n', 'gb', ':BackToOriginalBuffer<CR>')
```

Example configuration with vim script:
Vimscript configuration:

```vim
" Highlight the symbol when holding the cursor
Expand All @@ -104,13 +104,13 @@ noremap gb :BackToOriginalBuffer<CR>

`set updatetime=300` (in lua `vim.opt.updatetime = 300`) is highly recommended.

Global configurations
Global configurations:

| Global Configure | Default | Description |
|--------------------------------------|---------------|---------------------------------------------------------------|
| `g:easycomplete_nerd_font` | 0 | Using nerdfont for lsp icons |
| `g:easycomplete_menu_skin` | `{}` | Menu skin. [Examples](beautify-menu-items.md) |
| `g:easycomplete_sign_text` | `{}` | Sign icons. [Examples](beautify-menu-items.md) |
| `g:easycomplete_menu_skin` | `{}` | Menu skin. |
| `g:easycomplete_sign_text` | `{}` | Sign icons. |
| `g:easycomplete_lsp_type_font` | ... | lsp icons configuration |
| `g:easycomplete_tabnine_suggestion` | 1 | Tabnine inline suggestion(for nvim only) |
| `g:easycomplete_lsp_checking` | 1 | Check whether the lsp is installed while opening a file |
Expand Down Expand Up @@ -273,7 +273,9 @@ You can add custom Pmenu styles by defining these highlight groups:
- `EasyTabNine`: TabNine kind icon style. links to "Character" by default.
- `EasySnippets`: TabNine snippets suggestion style. links to "LineNr" by default

More examples here: [full custom config](custom-config.md)
More examples here: [full config example](custom-config.md)

My custom config:[my-custom-config](my-custom-config.md)

![截屏2023-12-30 20 25 06](https://github.com/jayli/vim-easycomplete/assets/188244/597db686-d4fe-4b25-8c39-d9b90db184cb)

Expand Down
5 changes: 3 additions & 2 deletions custom-config.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Full config in lua script:
Full config in lua script with Packer.nvim:

```lua
-- Packer.nvim
use { 'jayli/vim-easycomplete', requires = {'SirVer/ultisnips'}}

-- Enable the plugin. Default is on.
Expand Down Expand Up @@ -67,7 +68,7 @@ vim.g.easycomplete_pum_format = {"kind", "abbr", "menu"}
-- EasyTabNine
-- EasySnippets
vim.cmd[[
hi EasyFuzzyMatch guifg=lightblue
hi EasyFuzzyMatch guifg=lightblue
]]

-- Enable Tabnine, default is on, install tabnine lsp via `:InstallLspServer tn`
Expand Down
25 changes: 24 additions & 1 deletion my-custom-config.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## my custom config with lua
## my custom lua config with Packer.nvim

```lua
use { 'jayli/vim-easycomplete', requires = {'SirVer/ultisnips'}}
Expand All @@ -15,3 +15,26 @@ vim.keymap.set('n', 'rn', ':EasyCompleteRename<CR>')
vim.keymap.set('n', 'gb', ':BackToOriginalBuffer<CR>')
vim.g.easycomplete_pum_format = {"kind", "abbr", "menu"}
```

With Lazy.nvim

```lua
{
"jayli/vim-easycomplete",
dependencies={"SirVer/ultisnips"},
config = function()
vim.g.easycomplete_diagnostics_enable = 1
vim.g.easycomplete_signature_enable = 1
vim.g.easycomplete_tabnine_enable = 1
vim.g.easycomplete_tabnine_suggestion = 1
vim.g.easycomplete_cursor_word_hl = 1
vim.g.easycomplete_nerd_font = 1
vim.g.easycomplete_enable = 1
vim.keymap.set('n', 'gr', ':EasyCompleteReference<CR>')
vim.keymap.set('n', 'gd', ':EasyCompleteGotoDefinition<CR>')
vim.keymap.set('n', 'rn', ':EasyCompleteRename<CR>')
vim.keymap.set('n', 'gb', ':BackToOriginalBuffer<CR>')
vim.g.easycomplete_pum_format = {"kind", "abbr", "menu"}
end
}
```

0 comments on commit d385f64

Please sign in to comment.