Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions doc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,80 @@ MiniDeps.add({
},
})
```

## vim-plug

This section shows how to perform the equivalent default setup as demonstrated in the [lazy.nvim](#lazy.nvim) section using `vim-plug`.
To install, add `blink.cmp` and its optional dependencies, then manually call `setup()` for further configuration:

VimScript:

```vim
call plug#begin()
" use a release tag to download pre-built binaries.
" To build from source, use { 'do': 'cargo build --release' } instead
" If you use nix, use { 'do': 'nix run .#build-plugin' }
Plug 'saghen/blink.cmp', { 'tag': 'v1.*' }

" optional: provides snippets for the snippet source
Plug 'rafamadriz/friendly-snippets'
call plug#end()

lua << EOF
require('blink.cmp').setup({
keymap = { preset = 'default' },
appearance = {
nerd_font_variant = 'mono'
},
completion = {
documentation = { auto_show = false }
},
sources = {
default = { 'lsp', 'path', 'snippets', 'buffer' },
},
fuzzy = {
implementation = "prefer_rust_with_warning"
}
})
EOF
```

Lua:

```lua
local Plug = vim.fn['plug#']

-- Plugin installation
vim.call('plug#begin')

-- use a release tag to download pre-built binaries.
-- To build from source, use { ['do'] = 'cargo build --release' } instead
-- If you use nix, use { ['do'] = 'nix run .#build-plugin' }
Plug('saghen/blink.cmp', { ['tag'] = 'v1.*' })

-- optional: provides snippets for the snippet source
Plug('rafamadriz/friendly-snippets')

vim.call('plug#end')

-- Plugin configuration
require('blink.cmp').setup({
keymap = { preset = 'default' },

appearance = {
nerd_font_variant = 'mono'
},

completion = {
documentation = { auto_show = false }
},

sources = {
default = { 'lsp', 'path', 'snippets', 'buffer' },
},

fuzzy = {
implementation = "prefer_rust_with_warning"
}
})
```