feat!(completion): replace completion engine: cmp-nvim → blink.cmp
BREAKING CHANGE: Change behaviour concerning the completion engine. BREAKING CHANGE: Re-Enabling auto-show again
This commit is contained in:
@@ -49,22 +49,75 @@ require('lazy').setup({
|
||||
|
||||
-- DAP: Debug Adapter Protocol
|
||||
'mfussenegger/nvim-dap',
|
||||
|
||||
{
|
||||
-- Autocompletion
|
||||
'hrsh7th/nvim-cmp',
|
||||
-- [[ Autocompletion ]]
|
||||
'saghen/blink.cmp',
|
||||
-- optional: provides snippets for the snippet source
|
||||
dependencies = {
|
||||
-- Snippet Engine & its associated nvim-cmp source
|
||||
'L3MON4D3/LuaSnip',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
|
||||
-- Adds LSP completion capabilities
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-path',
|
||||
|
||||
-- Adds a number of user-friendly snippets
|
||||
'rafamadriz/friendly-snippets',
|
||||
'L3MON4D3/LuaSnip',
|
||||
},
|
||||
|
||||
-- use a release tag to download pre-built binaries
|
||||
version = '1.*',
|
||||
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
|
||||
-- build = 'cargo build --release',
|
||||
-- If you use nix, you can build from source using latest nightly rust with:
|
||||
-- build = 'nix run .#build-plugin',
|
||||
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
|
||||
-- 'super-tab' for mappings similar to vscode (tab to accept)
|
||||
-- 'enter' for enter to accept
|
||||
-- 'none' for no mappings
|
||||
--
|
||||
-- All presets have the following mappings:
|
||||
-- C-space: Open menu or open docs if already open
|
||||
-- C-n/C-p or Up/Down: Select next/previous item
|
||||
-- C-e: Hide menu
|
||||
-- C-k: Toggle signature help (if signature.enabled = true)
|
||||
--
|
||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||
keymap = { preset = 'super-tab' },
|
||||
|
||||
appearance = {
|
||||
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
||||
-- Adjusts spacing to ensure icons are aligned
|
||||
nerd_font_variant = 'mono'
|
||||
},
|
||||
|
||||
snippets = { preset = 'luasnip' },
|
||||
|
||||
signature = { enabled = true },
|
||||
|
||||
-- (Default) Only show the documentation popup when manually triggered
|
||||
completion = {
|
||||
documentation = { auto_show = true },
|
||||
list = {
|
||||
selection = {
|
||||
preselect = true,
|
||||
auto_insert = false,
|
||||
},
|
||||
},
|
||||
-- menu = { auto_show = false },
|
||||
},
|
||||
|
||||
-- Default list of enabled providers defined so that you can extend it
|
||||
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
||||
sources = {
|
||||
default = { 'lsp', 'path', 'snippets', 'buffer', },
|
||||
},
|
||||
|
||||
-- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
|
||||
-- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation,
|
||||
-- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"`
|
||||
--
|
||||
-- See the fuzzy documentation for more information
|
||||
fuzzy = { implementation = "prefer_rust_with_warning" }
|
||||
},
|
||||
opts_extend = { "sources.default" }
|
||||
},
|
||||
|
||||
-- Useful plugin to show you pending keybinds.
|
||||
@@ -259,7 +312,7 @@ require('lazy').setup({
|
||||
},
|
||||
{
|
||||
"nvim-neorg/neorg",
|
||||
dependencies = { "luarocks.nvim", { "nvim-lua/plenary.nvim" }, { "nvim-neorg/neorg-telescope" } },
|
||||
dependencies = { "luarocks.nvim", { "nvim-lua/plenary.nvim" }, { "nvim-neorg/neorg-telescope" }, "benlubas/neorg-interim-ls" },
|
||||
lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
|
||||
-- version = "*", -- Pin Neorg to the latest stable release
|
||||
config = function()
|
||||
@@ -269,7 +322,7 @@ require('lazy').setup({
|
||||
["core.keybinds"] = {},
|
||||
["core.completion"] = {
|
||||
config = {
|
||||
engine = "nvim-cmp",
|
||||
engine = { module_name = "external.lsp-completion" }
|
||||
},
|
||||
},
|
||||
["core.concealer"] = {
|
||||
|
Reference in New Issue
Block a user