8 files changed,
45 insertions(+),
261 deletions(-)
Author:
Oleksandr Smirnov
olexsmir@gmail.com
Committed at:
2025-06-01 02:37:21 +0300
Parent:
29fd4de
M
lazy-lock.json
@@ -1,14 +1,8 @@
{ "CopilotChat.nvim": { "branch": "main", "commit": "16d897fd43d07e3b54478ccdb2f8a16e4df4f45a" }, - "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, - "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, - "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, - "cmp-hledger": { "branch": "main", "commit": "ea2211cdd4f5d171ad2bdb0d66197173ce384ddd" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, - "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" }, - "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" }, - "copilot.lua": { "branch": "master", "commit": "0929c92097a49b6ae3565aab157fa2bce398d953" }, + "blink-copilot": { "branch": "main", "commit": "bdc45bbbed2ec252b3a29f4adecf031e157b5573" }, + "blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" }, + "copilot.lua": { "branch": "master", "commit": "5f726c8e6bbcd7461ee0b870d4e6c8a973b55b64" }, "curl.nvim": { "branch": "main", "commit": "fe07677a2a24bc8793b90fa2c0da626ea6c9e47d" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "fidget.nvim": { "branch": "main", "commit": "b61e8af9b8b68ee0ec7da5fb7a8c203aae854f2e" },
M
lua/plugins/completion.lua
@@ -1,119 +1,50 @@
----@type LazySpec return { - "hrsh7th/nvim-cmp", - event = "InsertEnter", + "saghen/blink.cmp", dependencies = { - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - { "hrsh7th/cmp-cmdline", keys = { ":" } }, - { "kirasok/cmp-hledger", ft = "ledger" }, + "rafamadriz/friendly-snippets", + "fang2hou/blink-copilot", }, - config = function(_, opts) - local cmp = require "cmp" - - for _, setup_fn in ipairs(opts.custom_setups) do - setup_fn(cmp) - end - - cmp.setup(opts) - end, - opts = function() - local cmp = require "cmp" - - ---@type cmp.Config - ---@diagnostic disable-next-line: missing-fields - return { - custom_setups = { - function(c) - c.setup.filetype("ledger", { - sources = { - { name = "hledger" }, - { name = "buffer" }, - }, - }) - end, - function(c) - c.setup.cmdline(":", { - mapping = c.mapping.preset.cmdline(), - sources = { - { name = "path" }, - { name = "cmdline" }, - }, - }) - end, + version = "1.*", + event = "InsertEnter", + ---@module 'blink.cmp' + ---@type blink.cmp.Config + opts = { + keymap = { + preset = "enter", + ["<C-u>"] = { "scroll_documentation_up", "fallback" }, + ["<C-d>"] = { "scroll_documentation_down", "fallback" }, + -- prob should remove but i just got too used to accepting snippets this way + ["<C-l>"] = { "snippet_forward", "accept", "fallback" }, + }, + appearance = { nerd_font_variant = "mono" }, + completion = { + documentation = { + auto_show = true, + auto_show_delay_ms = 300, }, - - -- snippets are set up in [luasnip.lua] - - enabled = function() - local bt = vim.api.nvim_get_option_value("buftype", { buf = 0 }) - return not (bt == "nofile" or bt == "prompt") - end, - - ---@diagnostic disable-next-line: missing-fields - view = { entries = { follow_cursor = true } }, - experimental = { ghost_text = true }, - ---@diagnostic disable-next-line: missing-fields - formatting = { - format = function(_, vim_item) - vim_item.kind = ({ - Text = "", - Method = "", - Function = "", - Constructor = "", - Field = "", - Variable = "", - Class = "", - Interface = "", - Module = "", - Property = "", - Unit = "", - Value = "", - Enum = "", - Keyword = "", - Snippet = "", - Color = "", - File = "", - Reference = "", - Folder = "", - EnumMember = "", - Constant = "", - Struct = "", - Event = "", - Operator = "", - TypeParameter = "", - Copilot = "", - })[vim_item.kind] - return vim_item - end, + }, + sources = { + default = { "copilot", "lsp", "path", "snippets", "buffer" }, + per_filetype = { + lua = { inherit_defaults = true, "lazydev" }, }, - mapping = cmp.mapping.preset.insert { - ["<C-u>"] = cmp.mapping.scroll_docs(-4), - ["<C-d>"] = cmp.mapping.scroll_docs(4), - ["<C-Space>"] = cmp.mapping.complete {}, - ["<CR>"] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Insert, - select = false, + providers = { + lazydev = { + name = "LazyDev", + module = "lazydev.integrations.blink", + score_offset = 100, }, - ["<Tab>"] = function(fallback) - if cmp.visible() then - cmp.select_next_item() - else - fallback() - end - end, - ["<S-Tab>"] = function(fallback) - if cmp.visible() then - cmp.select_prev_item() - else - fallback() - end - end, + copilot = { + name = "copilot", + module = "blink-copilot", + score_offset = 100, + async = true, + }, }, - sources = { - { name = "buffer", group_index = 1, max_item_count = 4 }, - { name = "path", group_index = 1, max_item_count = 2 }, - }, - } - end, + }, + fuzzy = { -- :h blink-cmp-config-fuzzy + implementation = "prefer_rust_with_warning", + }, + }, + opts_extend = { "sources.default" }, }
M
lua/plugins/copilot.lua
@@ -57,21 +57,4 @@ show_help = { normal = "?" },
}, }, }, - { - "nvim-cmp", - enabled = enabled, - dependencies = { - "copilot.lua", - { "zbirenbaum/copilot-cmp", config = true }, - }, - ---@module "cmp" - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - table.insert(opts.sources, 1, { - name = "copilot", - group_index = 0, - max_item_count = 3, - }) - end, - }, }
M
lua/plugins/git.lua
@@ -81,18 +81,4 @@ },
}, }, }, - - { - "nvim-cmp", - ---@module "cmp" - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - ---@diagnostic disable-next-line:undefined-field - table.insert(opts.custom_setups, function(cmp) - cmp.setup.filetype({ "gitcommit", "NeogitCommitMessage" }, { - sources = { { name = "buffer" }, { name = "luasnip" } }, - }) - end) - end, - }, }
M
lua/plugins/lsp/init.lua
@@ -31,27 +31,4 @@ config = function(_, opts)
require("illuminate").configure(opts) end, }, - - { - "nvim-cmp", - dependencies = { - { - "hrsh7th/cmp-nvim-lsp", - config = function() - vim.lsp.config("*", { - capabilities = require("cmp_nvim_lsp").default_capabilities(), - }) - end, - }, - }, - ---@module "cmp" - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - table.insert(opts.sources, 1, { - name = "nvim_lsp", - group_index = 0, - max_item_count = 12, - }) - end, - }, }
M
lua/plugins/lsp/lazydev.lua
@@ -3,19 +3,6 @@ return {
"folke/lazydev.nvim", ft = "lua", cmd = "LazyDev", - dependencies = { - { - "nvim-cmp", - ---@module "cmp" - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - table.insert(opts.sources, 1, { - name = "lazydev", - group_index = 0, - }) - end, - }, - }, ---@module "lazydev" ---@type lazydev.Config opts = {
D
@@ -1,63 +0,0 @@
----@type LazySpec -return { - "L3MON4D3/LuaSnip", - dependencies = { - "rafamadriz/friendly-snippets", - { - "nvim-cmp", - dependencies = { "saadparwaiz1/cmp_luasnip" }, - ---@module "cmp" - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - opts.snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - } - table.insert(opts.sources, 1, { - name = "luasnip", - group_index = 1, - max_item_count = 3, - }) - end, - }, - }, - build = "make install_jsregexp", - keys = { - { - "<C-l>", - function() - local ls = require "luasnip" - if ls.choice_active() then - ls.change_choice(1) - elseif ls.expand_or_jumpable() then - ls.expand_or_jump() - end - end, - mode = { "s", "i" }, - }, - }, - config = function() - local ls = require "luasnip" - local types = require "luasnip.util.types" - - require("luasnip.loaders.from_vscode").lazy_load() - - ls.setup { - ext_opts = { - [types.choiceNode] = { - passive = { - virt_text = { { "●", "Operator" } }, - hl_group = "LuaSnipChoiceNode", - }, - }, - [types.insertNode] = { - active = { - virt_text = { { "●", "Type" } }, - hl_group = "LuaSnipInsertNode", - }, - }, - }, - } - end, -}
M
lua/plugins/orgmode.lua
@@ -44,17 +44,6 @@ { "<leader>oa", action "agenda.prompt" },
}, dependencies = { { "akinsho/org-bullets.nvim", config = true }, - { - "nvim-cmp", - ---@module "cmp" - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - table.insert(opts.sources, { - name = "orgmode", - group_index = 0, - }) - end, - }, }, ---@module "orgmode" ---@type OrgConfigOpts