1 parent
95dc3b686a
commit
b1a92f479d
4 files changed
+190
-149
No files matched your search
+135
-134
@@ -1,124 +1,125 @@
|
|||||||
return {
|
return {
|
||||||
'saghen/blink.cmp',
|
'saghen/blink.cmp',
|
||||||
-- optional: provides snippets for the snippet source
|
-- optional: provides snippets for the snippet source
|
||||||
dependencies = { 'rafamadriz/friendly-snippets', "onsails/lspkind.nvim", "xzbdmw/colorful-menu.nvim", "nvim-tree/nvim-web-devicons"},
|
dependencies = { 'rafamadriz/friendly-snippets', "onsails/lspkind.nvim", "xzbdmw/colorful-menu.nvim", "nvim-tree/nvim-web-devicons" },
|
||||||
|
|
||||||
-- use a release tag to download pre-built binaries
|
-- use a release tag to download pre-built binaries
|
||||||
version = "v1.10.2",
|
version = "v1.10.2",
|
||||||
-- AND/OR build from source
|
-- AND/OR build from source
|
||||||
-- build = 'cargo build --release',
|
-- build = 'cargo build --release',
|
||||||
-- If you use nix, you can build from source with:
|
-- If you use nix, you can build from source with:
|
||||||
-- build = 'nix run .#build-plugin',
|
-- build = 'nix run .#build-plugin',
|
||||||
|
|
||||||
---@module 'blink.cmp'
|
---@module 'blink.cmp'
|
||||||
---@type blink.cmp.Config
|
---@type blink.cmp.Config
|
||||||
opts = {
|
opts = {
|
||||||
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
|
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
|
||||||
-- 'super-tab' for mappings similar to vscode (tab to accept)
|
-- 'super-tab' for mappings similar to vscode (tab to accept)
|
||||||
-- 'enter' for enter to accept
|
-- 'enter' for enter to accept
|
||||||
-- 'none' for no mappings
|
-- 'none' for no mappings
|
||||||
--
|
--
|
||||||
-- All presets have the following mappings:
|
-- All presets have the following mappings:
|
||||||
-- C-space: Open menu or open docs if already open
|
-- C-space: Open menu or open docs if already open
|
||||||
-- C-n/C-p or Up/Down: Select next/previous item
|
-- C-n/C-p or Up/Down: Select next/previous item
|
||||||
-- C-e: Hide menu
|
-- C-e: Hide menu
|
||||||
-- C-k: Toggle signature help (if signature.enabled = true)
|
-- C-k: Toggle signature help (if signature.enabled = true)
|
||||||
--
|
--
|
||||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||||
-- in your blink configuration
|
-- in your blink configuration
|
||||||
keymap = {
|
keymap = {
|
||||||
preset = 'none',
|
preset = 'none',
|
||||||
|
|
||||||
-- If completion hasn't been triggered yet, insert the first suggestion; if it has, cycle to the next suggestion.
|
-- If completion hasn't been triggered yet, insert the first suggestion; if it has, cycle to the next suggestion.
|
||||||
['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
|
['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
|
||||||
['<C-e>'] = { 'hide', 'fallback' },
|
['<C-e>'] = { 'hide', 'fallback' },
|
||||||
|
|
||||||
["<Tab>"] = { "select_next", "snippet_forward", "fallback" },
|
["<Tab>"] = { "select_next", "snippet_forward", "fallback" },
|
||||||
["<S-Tab>"] = { "select_prev", "snippet_backward", "fallback" },
|
["<S-Tab>"] = { "select_prev", "snippet_backward", "fallback" },
|
||||||
|
|
||||||
-- Selection with Enter
|
-- Selection with Enter
|
||||||
["<CR>"] = { "accept", "fallback" },
|
["<CR>"] = { "accept", "fallback" },
|
||||||
|
|
||||||
['<Up>'] = { 'select_prev', 'fallback' },
|
['<Up>'] = { 'select_prev', 'fallback' },
|
||||||
['<Down>'] = { 'select_next', 'fallback' },
|
['<Down>'] = { 'select_next', 'fallback' },
|
||||||
['<C-p>'] = { 'select_prev', 'fallback_to_mappings' },
|
['<C-p>'] = { 'select_prev', 'fallback_to_mappings' },
|
||||||
['<C-n>'] = { 'select_next', 'fallback_to_mappings' },
|
['<C-n>'] = { 'select_next', 'fallback_to_mappings' },
|
||||||
|
|
||||||
['<C-b>'] = { 'scroll_documentation_up', 'fallback' },
|
['<C-b>'] = { 'scroll_documentation_up', 'fallback' },
|
||||||
['<C-f>'] = { 'scroll_documentation_down', 'fallback' },
|
['<C-f>'] = { 'scroll_documentation_down', 'fallback' },
|
||||||
|
|
||||||
['<C-k>'] = { 'show_signature', 'hide_signature', 'fallback' },
|
['<C-k>'] = { 'show_signature', 'hide_signature', 'fallback' },
|
||||||
},
|
|
||||||
appearance = {
|
|
||||||
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
|
||||||
-- Adjusts spacing to ensure icons are aligned
|
|
||||||
nerd_font_variant = 'mono'
|
|
||||||
},
|
|
||||||
|
|
||||||
-- (Default) Only show the documentation popup when manually triggered
|
|
||||||
completion = {
|
|
||||||
ghost_text = {
|
|
||||||
enabled = true
|
|
||||||
},
|
},
|
||||||
accept = {
|
appearance = {
|
||||||
create_undo_point = true,
|
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
||||||
auto_brackets = {
|
-- Adjusts spacing to ensure icons are aligned
|
||||||
enabled = true,
|
nerd_font_variant = 'mono'
|
||||||
kind_resolution = {
|
},
|
||||||
enabled = true,
|
|
||||||
},
|
-- (Default) Only show the documentation popup when manually triggered
|
||||||
semantic_token_resolution = {
|
completion = {
|
||||||
|
ghost_text = {
|
||||||
|
enabled = true
|
||||||
|
},
|
||||||
|
accept = {
|
||||||
|
create_undo_point = true,
|
||||||
|
auto_brackets = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
|
kind_resolution = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
semantic_token_resolution = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
menu = {
|
||||||
menu = {
|
direction_priority = function()
|
||||||
direction_priority = function()
|
local ctx = require('blink.cmp').get_context()
|
||||||
local ctx = require('blink.cmp').get_context()
|
local item = require('blink.cmp').get_selected_item()
|
||||||
local item = require('blink.cmp').get_selected_item()
|
if ctx == nil or item == nil then return { 's', 'n' } end
|
||||||
if ctx == nil or item == nil then return { 's', 'n' } end
|
|
||||||
|
|
||||||
local item_text = item.textEdit ~= nil and item.textEdit.newText or item.insertText or item.label
|
local item_text = item.textEdit ~= nil and item.textEdit.newText or item.insertText or item.label
|
||||||
local is_multi_line = item_text:find('\n') ~= nil
|
local is_multi_line = item_text:find('\n') ~= nil
|
||||||
|
|
||||||
-- after showing the menu upwards, we want to maintain that direction
|
-- after showing the menu upwards, we want to maintain that direction
|
||||||
-- until we re-open the menu, so store the context id in a global variable
|
-- until we re-open the menu, so store the context id in a global variable
|
||||||
if is_multi_line or vim.g.blink_cmp_upwards_ctx_id == ctx.id then
|
if is_multi_line or vim.g.blink_cmp_upwards_ctx_id == ctx.id then
|
||||||
vim.g.blink_cmp_upwards_ctx_id = ctx.id
|
vim.g.blink_cmp_upwards_ctx_id = ctx.id
|
||||||
return { 'n', 's' }
|
return { 'n', 's' }
|
||||||
end
|
end
|
||||||
return { 's', 'n' }
|
return { 's', 'n' }
|
||||||
end,
|
end,
|
||||||
columns = { { "kind_icon" }, { "label", gap = 1 } },
|
draw = {
|
||||||
components = {
|
columns = { { "kind_icon" }, { "label", gap = 1 } },
|
||||||
|
components = {
|
||||||
kind_icon = {
|
kind_icon = {
|
||||||
text = function(ctx)
|
text = function(ctx)
|
||||||
local icon = ctx.kind_icon
|
local icon = ctx.kind_icon
|
||||||
if vim.tbl_contains({ "Path" }, ctx.source_name) then
|
if vim.tbl_contains({ "Path" }, ctx.source_name) then
|
||||||
local dev_icon, _ = require("nvim-web-devicons").get_icon(ctx.label)
|
local dev_icon, _ = require("nvim-web-devicons").get_icon(ctx.label)
|
||||||
if dev_icon then
|
if dev_icon then
|
||||||
icon = dev_icon
|
icon = dev_icon
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
icon = require("lspkind").symbol_map[ctx.kind] or ""
|
icon = require("lspkind").symbol_map[ctx.kind] or ""
|
||||||
end
|
end
|
||||||
|
|
||||||
return icon .. ctx.icon_gap
|
return icon .. ctx.icon_gap
|
||||||
end,
|
end,
|
||||||
|
|
||||||
-- Optionally, use the highlight groups from nvim-web-devicons
|
-- Optionally, use the highlight groups from nvim-web-devicons
|
||||||
-- You can also add the same function for `kind.highlight` if you want to
|
-- You can also add the same function for `kind.highlight` if you want to
|
||||||
-- keep the highlight groups in sync with the icons.
|
-- keep the highlight groups in sync with the icons.
|
||||||
highlight = function(ctx)
|
highlight = function(ctx)
|
||||||
local hl = ctx.kind_hl
|
local hl = ctx.kind_hl
|
||||||
if vim.tbl_contains({ "Path" }, ctx.source_name) then
|
if vim.tbl_contains({ "Path" }, ctx.source_name) then
|
||||||
local dev_icon, dev_hl = require("nvim-web-devicons").get_icon(ctx.label)
|
local dev_icon, dev_hl = require("nvim-web-devicons").get_icon(ctx.label)
|
||||||
if dev_icon then
|
if dev_icon then
|
||||||
hl = dev_hl
|
hl = dev_hl
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return hl
|
return hl
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
label = {
|
label = {
|
||||||
width = { fill = true, max = 60 },
|
width = { fill = true, max = 60 },
|
||||||
@@ -144,40 +145,40 @@ return {
|
|||||||
return highlights
|
return highlights
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
documentation = {
|
},
|
||||||
auto_show = true,
|
documentation = {
|
||||||
draw = function(opts)
|
auto_show = true,
|
||||||
if opts.item and opts.item.documentation and opts.item.documentation.value then
|
draw = function(opts)
|
||||||
local out = require("pretty_hover.parser").parse(opts.item.documentation.value)
|
if opts.item and opts.item.documentation and opts.item.documentation.value then
|
||||||
opts.item.documentation.value = out:string()
|
local out = require("pretty_hover.parser").parse(opts.item.documentation.value)
|
||||||
end
|
opts.item.documentation.value = out:string()
|
||||||
|
end
|
||||||
|
|
||||||
opts.default_implementation(opts)
|
opts.default_implementation(opts)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
list = {
|
list = {
|
||||||
selection = {
|
selection = {
|
||||||
preselect = false,
|
preselect = false,
|
||||||
auto_insert = false
|
auto_insert = 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 list of enabled providers defined so that you can extend it
|
-- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
|
||||||
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
-- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation,
|
||||||
sources = {
|
-- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"`
|
||||||
default = { 'lsp', 'path', 'snippets', 'buffer' },
|
--
|
||||||
|
-- See the fuzzy documentation for more information
|
||||||
|
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||||
|
signature = { enabled = true }
|
||||||
},
|
},
|
||||||
|
opts_extend = { "sources.default" }
|
||||||
-- (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" },
|
|
||||||
signature = { enabled = true }
|
|
||||||
},
|
|
||||||
opts_extend = { "sources.default" }
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
-- "nvim-neorg/neorg",
|
||||||
|
-- dependencies = { "nvim-neorg/lua-utils.nvim", "nvim-neotest/nvim-nio", "pysan3/pathlib.nvim",
|
||||||
|
-- 'nvim-neorg/tree-sitter-norg',
|
||||||
|
-- 'nvim-neorg/tree-sitter-norg-meta', },
|
||||||
|
-- lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
|
||||||
|
-- config = true,
|
||||||
|
}
|
||||||
+23
-15
@@ -5,18 +5,26 @@
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"romus204/tree-sitter-manager.nvim",
|
"romus204/tree-sitter-manager.nvim",
|
||||||
dependencies = {}, -- tree-sitter CLI must be installed system-wide
|
dependencies = {}, -- tree-sitter CLI must be installed system-wide
|
||||||
config = function()
|
config = function()
|
||||||
require("tree-sitter-manager").setup({
|
require("tree-sitter-manager").setup({
|
||||||
-- Default Options
|
-- Default Options
|
||||||
ensure_installed = {"cpp", "cmake"}, -- list of parsers to install at the start of a neovim session
|
ensure_installed = { "cpp", "cmake", "json", "bash" }, -- list of parsers to install at the start of a neovim session
|
||||||
-- border = nil, -- border style for the window (e.g. "rounded", "single"), if nil, use the default border style defined by 'vim.o.winborder'. See :h 'winborder' for more info.
|
-- border = nil, -- border style for the window (e.g. "rounded", "single"), if nil, use the default border style defined by 'vim.o.winborder'. See :h 'winborder' for more info.
|
||||||
auto_install = true, -- if enabled, install missing parsers when editing a new file
|
auto_install = true, -- if enabled, install missing parsers when editing a new file
|
||||||
highlight = true, -- treesitter highlighting is enabled by default
|
highlight = true, -- treesitter highlighting is enabled by default
|
||||||
-- languages = {}, -- override or add new parser sources
|
-- languages = {}, -- override or add new parser sources
|
||||||
-- parser_dir = vim.fn.stdpath("data") .. "/site/parser",
|
-- parser_dir = vim.fn.stdpath("data") .. "/site/parser",
|
||||||
-- query_dir = vim.fn.stdpath("data") .. "/site/queries",
|
-- query_dir = vim.fn.stdpath("data") .. "/site/queries",
|
||||||
})
|
languages = {
|
||||||
end
|
norg = {
|
||||||
}
|
install_info = {
|
||||||
|
url = "https://github.com/nvim-neorg/tree-sitter-norg",
|
||||||
|
use_repo_queries = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
@@ -61,10 +61,18 @@
|
|||||||
"rev": "562d9724e3869ffd1801c572dd149cc9f8d0cc36",
|
"rev": "562d9724e3869ffd1801c572dd149cc9f8d0cc36",
|
||||||
"src": "https://github.com/nvimdev/lspsaga.nvim"
|
"src": "https://github.com/nvimdev/lspsaga.nvim"
|
||||||
},
|
},
|
||||||
|
"lua-utils.nvim": {
|
||||||
|
"rev": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd",
|
||||||
|
"src": "https://github.com/nvim-neorg/lua-utils.nvim"
|
||||||
|
},
|
||||||
"mini.indentscope": {
|
"mini.indentscope": {
|
||||||
"rev": "e0601f75aa5137a5a13bb92a988c9a300f5bd3de",
|
"rev": "e0601f75aa5137a5a13bb92a988c9a300f5bd3de",
|
||||||
"src": "https://github.com/echasnovski/mini.indentscope"
|
"src": "https://github.com/echasnovski/mini.indentscope"
|
||||||
},
|
},
|
||||||
|
"neorg": {
|
||||||
|
"rev": "1f14d72aad7165eac307a2a2f6be0fb97a04b3c2",
|
||||||
|
"src": "https://github.com/nvim-neorg/neorg"
|
||||||
|
},
|
||||||
"noice.nvim": {
|
"noice.nvim": {
|
||||||
"rev": "7bfd942445fb63089b59f97ca487d605e715f155",
|
"rev": "7bfd942445fb63089b59f97ca487d605e715f155",
|
||||||
"src": "https://github.com/folke/noice.nvim"
|
"src": "https://github.com/folke/noice.nvim"
|
||||||
@@ -81,6 +89,10 @@
|
|||||||
"rev": "8a9378a822719346a0288fa004dab302ca3c0a8f",
|
"rev": "8a9378a822719346a0288fa004dab302ca3c0a8f",
|
||||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||||
},
|
},
|
||||||
|
"nvim-nio": {
|
||||||
|
"rev": "21f5324bfac14e22ba26553caf69ec76ae8a7662",
|
||||||
|
"src": "https://github.com/nvim-neotest/nvim-nio"
|
||||||
|
},
|
||||||
"nvim-notify": {
|
"nvim-notify": {
|
||||||
"rev": "8701bece920b38ea289b457f902e2ad184131a5d",
|
"rev": "8701bece920b38ea289b457f902e2ad184131a5d",
|
||||||
"src": "https://github.com/rcarriga/nvim-notify"
|
"src": "https://github.com/rcarriga/nvim-notify"
|
||||||
@@ -93,6 +105,10 @@
|
|||||||
"rev": "a7ba74849a00546a311f8c146320b433900393e7",
|
"rev": "a7ba74849a00546a311f8c146320b433900393e7",
|
||||||
"src": "https://github.com/nyoom-engineering/oxocarbon.nvim"
|
"src": "https://github.com/nyoom-engineering/oxocarbon.nvim"
|
||||||
},
|
},
|
||||||
|
"pathlib.nvim": {
|
||||||
|
"rev": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1",
|
||||||
|
"src": "https://github.com/pysan3/pathlib.nvim"
|
||||||
|
},
|
||||||
"plenary.nvim": {
|
"plenary.nvim": {
|
||||||
"rev": "74b06c6c75e4eeb3108ec01852001636d85a932b",
|
"rev": "74b06c6c75e4eeb3108ec01852001636d85a932b",
|
||||||
"src": "https://github.com/nvim-lua/plenary.nvim"
|
"src": "https://github.com/nvim-lua/plenary.nvim"
|
||||||
@@ -121,6 +137,14 @@
|
|||||||
"rev": "fa63bc63ae08b661843d9976a43becfbd3daf76c",
|
"rev": "fa63bc63ae08b661843d9976a43becfbd3daf76c",
|
||||||
"src": "https://github.com/romus204/tree-sitter-manager.nvim"
|
"src": "https://github.com/romus204/tree-sitter-manager.nvim"
|
||||||
},
|
},
|
||||||
|
"tree-sitter-norg": {
|
||||||
|
"rev": "d89d95af13d409f30a6c7676387bde311ec4a2c8",
|
||||||
|
"src": "https://github.com/nvim-neorg/tree-sitter-norg"
|
||||||
|
},
|
||||||
|
"tree-sitter-norg-meta": {
|
||||||
|
"rev": "729d4e54fb881ba0ddf0f925ec78401354c7c6db",
|
||||||
|
"src": "https://github.com/nvim-neorg/tree-sitter-norg-meta"
|
||||||
|
},
|
||||||
"which-key.nvim": {
|
"which-key.nvim": {
|
||||||
"rev": "3aab2147e74890957785941f0c1ad87d0a44c15a",
|
"rev": "3aab2147e74890957785941f0c1ad87d0a44c15a",
|
||||||
"src": "https://github.com/folke/which-key.nvim"
|
"src": "https://github.com/folke/which-key.nvim"
|
||||||
|
|||||||
Reference in new issue
Block a user