From 7111388965e01e9c712dfc2288028952fe78b664 Mon Sep 17 00:00:00 2001 From: Nanderty Date: Mon, 20 Mar 2023 16:29:49 +0100 Subject: lazyvim --- plugin/zerolsp.lua | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 plugin/zerolsp.lua (limited to 'plugin/zerolsp.lua') diff --git a/plugin/zerolsp.lua b/plugin/zerolsp.lua deleted file mode 100644 index a37bee4..0000000 --- a/plugin/zerolsp.lua +++ /dev/null @@ -1,54 +0,0 @@ -local lsp = require('lsp-zero').preset({ - name = 'minimal', - set_lsp_keymaps = true, - manage_nvim_cmp = true, - suggest_lsp_servers = false, -}) - -local luasnip = require("luasnip") -local cmp = require("cmp") - -lsp.setup_nvim_cmp({ - formatting = { - fields = {'abbr', 'menu', 'kind'}, - - mapping = lsp.defaults.cmp_mappings({ - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - elseif has_words_before() then - cmp.complete() - else - fallback() - end - end, { "i", "s" }), - - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { "i", "s" }), - }), - - format = function(entry, item) - local menu_icon = { - nvim_lsp = 'λ', - luasnip = '⋗', - buffer = 'Ω', - path = '🖫', - nvim_lua = 'Π', - } - - item.menu = menu_icon[entry.source.name] - return item - end, - }, -}) - -lsp.setup() -- cgit v1.2.3