1 parent
95dc3b686a
commit
b1a92f479d
4 files changed
+190
-149
No files matched your search
+135
-134
@@ -1,124 +1,125 @@
|
||||
return {
|
||||
'saghen/blink.cmp',
|
||||
-- optional: provides snippets for the snippet source
|
||||
dependencies = { 'rafamadriz/friendly-snippets', "onsails/lspkind.nvim", "xzbdmw/colorful-menu.nvim", "nvim-tree/nvim-web-devicons"},
|
||||
'saghen/blink.cmp',
|
||||
-- optional: provides snippets for the snippet source
|
||||
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
|
||||
version = "v1.10.2",
|
||||
-- AND/OR build from source
|
||||
-- build = 'cargo build --release',
|
||||
-- If you use nix, you can build from source with:
|
||||
-- build = 'nix run .#build-plugin',
|
||||
-- use a release tag to download pre-built binaries
|
||||
version = "v1.10.2",
|
||||
-- AND/OR build from source
|
||||
-- build = 'cargo build --release',
|
||||
-- If you use nix, you can build from source 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
|
||||
---@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
|
||||
-- in your blink configuration
|
||||
keymap = {
|
||||
preset = 'none',
|
||||
keymap = {
|
||||
preset = 'none',
|
||||
|
||||
-- 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-e>'] = { 'hide', 'fallback' },
|
||||
-- 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-e>'] = { 'hide', 'fallback' },
|
||||
|
||||
["<Tab>"] = { "select_next", "snippet_forward", "fallback" },
|
||||
["<S-Tab>"] = { "select_prev", "snippet_backward", "fallback" },
|
||||
["<Tab>"] = { "select_next", "snippet_forward", "fallback" },
|
||||
["<S-Tab>"] = { "select_prev", "snippet_backward", "fallback" },
|
||||
|
||||
-- Selection with Enter
|
||||
["<CR>"] = { "accept", "fallback" },
|
||||
-- Selection with Enter
|
||||
["<CR>"] = { "accept", "fallback" },
|
||||
|
||||
['<Up>'] = { 'select_prev', 'fallback' },
|
||||
['<Down>'] = { 'select_next', 'fallback' },
|
||||
['<C-p>'] = { 'select_prev', 'fallback_to_mappings' },
|
||||
['<C-n>'] = { 'select_next', 'fallback_to_mappings' },
|
||||
['<Up>'] = { 'select_prev', 'fallback' },
|
||||
['<Down>'] = { 'select_next', 'fallback' },
|
||||
['<C-p>'] = { 'select_prev', 'fallback_to_mappings' },
|
||||
['<C-n>'] = { 'select_next', 'fallback_to_mappings' },
|
||||
|
||||
['<C-b>'] = { 'scroll_documentation_up', 'fallback' },
|
||||
['<C-f>'] = { 'scroll_documentation_down', 'fallback' },
|
||||
['<C-b>'] = { 'scroll_documentation_up', 'fallback' },
|
||||
['<C-f>'] = { 'scroll_documentation_down', '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
|
||||
['<C-k>'] = { 'show_signature', 'hide_signature', 'fallback' },
|
||||
},
|
||||
accept = {
|
||||
create_undo_point = true,
|
||||
auto_brackets = {
|
||||
enabled = true,
|
||||
kind_resolution = {
|
||||
enabled = true,
|
||||
},
|
||||
semantic_token_resolution = {
|
||||
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 = {
|
||||
create_undo_point = true,
|
||||
auto_brackets = {
|
||||
enabled = true,
|
||||
kind_resolution = {
|
||||
enabled = true,
|
||||
},
|
||||
semantic_token_resolution = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
menu = {
|
||||
direction_priority = function()
|
||||
local ctx = require('blink.cmp').get_context()
|
||||
local item = require('blink.cmp').get_selected_item()
|
||||
if ctx == nil or item == nil then return { 's', 'n' } end
|
||||
menu = {
|
||||
direction_priority = function()
|
||||
local ctx = require('blink.cmp').get_context()
|
||||
local item = require('blink.cmp').get_selected_item()
|
||||
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 is_multi_line = item_text:find('\n') ~= nil
|
||||
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
|
||||
|
||||
-- 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
|
||||
if is_multi_line or vim.g.blink_cmp_upwards_ctx_id == ctx.id then
|
||||
vim.g.blink_cmp_upwards_ctx_id = ctx.id
|
||||
return { 'n', 's' }
|
||||
end
|
||||
return { 's', 'n' }
|
||||
end,
|
||||
columns = { { "kind_icon" }, { "label", gap = 1 } },
|
||||
components = {
|
||||
-- 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
|
||||
if is_multi_line or vim.g.blink_cmp_upwards_ctx_id == ctx.id then
|
||||
vim.g.blink_cmp_upwards_ctx_id = ctx.id
|
||||
return { 'n', 's' }
|
||||
end
|
||||
return { 's', 'n' }
|
||||
end,
|
||||
draw = {
|
||||
columns = { { "kind_icon" }, { "label", gap = 1 } },
|
||||
components = {
|
||||
kind_icon = {
|
||||
text = function(ctx)
|
||||
local icon = ctx.kind_icon
|
||||
if vim.tbl_contains({ "Path" }, ctx.source_name) then
|
||||
local dev_icon, _ = require("nvim-web-devicons").get_icon(ctx.label)
|
||||
if dev_icon then
|
||||
icon = dev_icon
|
||||
end
|
||||
else
|
||||
icon = require("lspkind").symbol_map[ctx.kind] or ""
|
||||
end
|
||||
local icon = ctx.kind_icon
|
||||
if vim.tbl_contains({ "Path" }, ctx.source_name) then
|
||||
local dev_icon, _ = require("nvim-web-devicons").get_icon(ctx.label)
|
||||
if dev_icon then
|
||||
icon = dev_icon
|
||||
end
|
||||
else
|
||||
icon = require("lspkind").symbol_map[ctx.kind] or ""
|
||||
end
|
||||
|
||||
return icon .. ctx.icon_gap
|
||||
end,
|
||||
return icon .. ctx.icon_gap
|
||||
end,
|
||||
|
||||
-- Optionally, use the highlight groups from nvim-web-devicons
|
||||
-- You can also add the same function for `kind.highlight` if you want to
|
||||
-- keep the highlight groups in sync with the icons.
|
||||
highlight = function(ctx)
|
||||
local hl = ctx.kind_hl
|
||||
if vim.tbl_contains({ "Path" }, ctx.source_name) then
|
||||
local dev_icon, dev_hl = require("nvim-web-devicons").get_icon(ctx.label)
|
||||
if dev_icon then
|
||||
hl = dev_hl
|
||||
end
|
||||
end
|
||||
return hl
|
||||
end,
|
||||
-- Optionally, use the highlight groups from nvim-web-devicons
|
||||
-- You can also add the same function for `kind.highlight` if you want to
|
||||
-- keep the highlight groups in sync with the icons.
|
||||
highlight = function(ctx)
|
||||
local hl = ctx.kind_hl
|
||||
if vim.tbl_contains({ "Path" }, ctx.source_name) then
|
||||
local dev_icon, dev_hl = require("nvim-web-devicons").get_icon(ctx.label)
|
||||
if dev_icon then
|
||||
hl = dev_hl
|
||||
end
|
||||
end
|
||||
return hl
|
||||
end,
|
||||
},
|
||||
label = {
|
||||
width = { fill = true, max = 60 },
|
||||
@@ -144,40 +145,40 @@ return {
|
||||
return highlights
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
draw = function(opts)
|
||||
if opts.item and opts.item.documentation and opts.item.documentation.value then
|
||||
local out = require("pretty_hover.parser").parse(opts.item.documentation.value)
|
||||
opts.item.documentation.value = out:string()
|
||||
end
|
||||
},
|
||||
}
|
||||
},
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
draw = function(opts)
|
||||
if opts.item and opts.item.documentation and opts.item.documentation.value then
|
||||
local out = require("pretty_hover.parser").parse(opts.item.documentation.value)
|
||||
opts.item.documentation.value = out:string()
|
||||
end
|
||||
|
||||
opts.default_implementation(opts)
|
||||
end,
|
||||
},
|
||||
list = {
|
||||
selection = {
|
||||
preselect = false,
|
||||
auto_insert = false
|
||||
opts.default_implementation(opts)
|
||||
end,
|
||||
},
|
||||
list = {
|
||||
selection = {
|
||||
preselect = 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
|
||||
-- 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" },
|
||||
signature = { enabled = true }
|
||||
},
|
||||
|
||||
-- (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" }
|
||||
}
|
||||
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 {
|
||||
"romus204/tree-sitter-manager.nvim",
|
||||
dependencies = {}, -- tree-sitter CLI must be installed system-wide
|
||||
config = function()
|
||||
require("tree-sitter-manager").setup({
|
||||
-- Default Options
|
||||
ensure_installed = {"cpp", "cmake"}, -- 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.
|
||||
auto_install = true, -- if enabled, install missing parsers when editing a new file
|
||||
highlight = true, -- treesitter highlighting is enabled by default
|
||||
-- languages = {}, -- override or add new parser sources
|
||||
-- parser_dir = vim.fn.stdpath("data") .. "/site/parser",
|
||||
-- query_dir = vim.fn.stdpath("data") .. "/site/queries",
|
||||
})
|
||||
end
|
||||
}
|
||||
"romus204/tree-sitter-manager.nvim",
|
||||
dependencies = {}, -- tree-sitter CLI must be installed system-wide
|
||||
config = function()
|
||||
require("tree-sitter-manager").setup({
|
||||
-- Default Options
|
||||
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.
|
||||
auto_install = true, -- if enabled, install missing parsers when editing a new file
|
||||
highlight = true, -- treesitter highlighting is enabled by default
|
||||
-- languages = {}, -- override or add new parser sources
|
||||
-- parser_dir = vim.fn.stdpath("data") .. "/site/parser",
|
||||
-- query_dir = vim.fn.stdpath("data") .. "/site/queries",
|
||||
languages = {
|
||||
norg = {
|
||||
install_info = {
|
||||
url = "https://github.com/nvim-neorg/tree-sitter-norg",
|
||||
use_repo_queries = true
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -61,10 +61,18 @@
|
||||
"rev": "562d9724e3869ffd1801c572dd149cc9f8d0cc36",
|
||||
"src": "https://github.com/nvimdev/lspsaga.nvim"
|
||||
},
|
||||
"lua-utils.nvim": {
|
||||
"rev": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd",
|
||||
"src": "https://github.com/nvim-neorg/lua-utils.nvim"
|
||||
},
|
||||
"mini.indentscope": {
|
||||
"rev": "e0601f75aa5137a5a13bb92a988c9a300f5bd3de",
|
||||
"src": "https://github.com/echasnovski/mini.indentscope"
|
||||
},
|
||||
"neorg": {
|
||||
"rev": "1f14d72aad7165eac307a2a2f6be0fb97a04b3c2",
|
||||
"src": "https://github.com/nvim-neorg/neorg"
|
||||
},
|
||||
"noice.nvim": {
|
||||
"rev": "7bfd942445fb63089b59f97ca487d605e715f155",
|
||||
"src": "https://github.com/folke/noice.nvim"
|
||||
@@ -81,6 +89,10 @@
|
||||
"rev": "8a9378a822719346a0288fa004dab302ca3c0a8f",
|
||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||
},
|
||||
"nvim-nio": {
|
||||
"rev": "21f5324bfac14e22ba26553caf69ec76ae8a7662",
|
||||
"src": "https://github.com/nvim-neotest/nvim-nio"
|
||||
},
|
||||
"nvim-notify": {
|
||||
"rev": "8701bece920b38ea289b457f902e2ad184131a5d",
|
||||
"src": "https://github.com/rcarriga/nvim-notify"
|
||||
@@ -93,6 +105,10 @@
|
||||
"rev": "a7ba74849a00546a311f8c146320b433900393e7",
|
||||
"src": "https://github.com/nyoom-engineering/oxocarbon.nvim"
|
||||
},
|
||||
"pathlib.nvim": {
|
||||
"rev": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1",
|
||||
"src": "https://github.com/pysan3/pathlib.nvim"
|
||||
},
|
||||
"plenary.nvim": {
|
||||
"rev": "74b06c6c75e4eeb3108ec01852001636d85a932b",
|
||||
"src": "https://github.com/nvim-lua/plenary.nvim"
|
||||
@@ -121,6 +137,14 @@
|
||||
"rev": "fa63bc63ae08b661843d9976a43becfbd3daf76c",
|
||||
"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": {
|
||||
"rev": "3aab2147e74890957785941f0c1ad87d0a44c15a",
|
||||
"src": "https://github.com/folke/which-key.nvim"
|
||||
|
||||
Reference in new issue
Block a user