From 83cd13c60ba2b8de7b5a50affa0e110c2a608cd6 Mon Sep 17 00:00:00 2001 From: "Simen A. W. Olsen" Date: Sat, 21 Mar 2026 13:45:43 +0100 Subject: refactor: modernize plugins and reorganize LSP configuration --- lua/simenandre/plugins/completion.lua | 51 ++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 15 deletions(-) (limited to 'lua/simenandre/plugins/completion.lua') diff --git a/lua/simenandre/plugins/completion.lua b/lua/simenandre/plugins/completion.lua index f9cfb0a..0da6ab9 100644 --- a/lua/simenandre/plugins/completion.lua +++ b/lua/simenandre/plugins/completion.lua @@ -1,23 +1,44 @@ return { - { - "saghen/blink.cmp", - dependencies = "rafamadriz/friendly-snippets", - version = "*", + "saghen/blink.cmp", + event = "VimEnter", + version = "1.*", + dependencies = { + { + "L3MON4D3/LuaSnip", + version = "2.*", + build = (function() + if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then + return + end + return "make install_jsregexp" + end)(), + }, + "rafamadriz/friendly-snippets", + "folke/lazydev.nvim", + }, - ---@module 'blink.cmp' - ---@type blink.cmp.Config - opts = { - keymap = { preset = "default" }, + ---@module 'blink.cmp' + ---@type blink.cmp.Config + opts = { + keymap = { preset = "default" }, - appearance = { - use_nvim_cmp_as_default = true, - nerd_font_variant = "mono", - }, + appearance = { + nerd_font_variant = "mono", + }, - sources = { - default = { "lsp", "path", "snippets", "buffer" }, + completion = { + documentation = { auto_show = false, auto_show_delay_ms = 500 }, + }, + + sources = { + default = { "lsp", "path", "snippets", "lazydev" }, + providers = { + lazydev = { module = "lazydev.integrations.blink", score_offset = 100 }, }, }, - opts_extend = { "sources.default" }, + + snippets = { preset = "luasnip" }, + fuzzy = { implementation = "lua" }, + signature = { enabled = true }, }, } -- cgit v1.3.1