From bc0ff82244fdc22a60f5c06ffd93975a26ba8d58 Mon Sep 17 00:00:00 2001 From: Daniel Carrillo Date: Sat, 8 Oct 2022 18:26:59 +0200 Subject: [PATCH] [neovim] Remove unused lua plugins --- .config/nvim/lua/user/cmp.lua | 23 ----------------------- .config/nvim/lua/user/plugins.lua | 2 -- 2 files changed, 25 deletions(-) diff --git a/.config/nvim/lua/user/cmp.lua b/.config/nvim/lua/user/cmp.lua index 1eb816b..a70e590 100644 --- a/.config/nvim/lua/user/cmp.lua +++ b/.config/nvim/lua/user/cmp.lua @@ -3,13 +3,6 @@ if not cmp_status_ok then return end -local snip_status_ok, luasnip = pcall(require, "luasnip") -if not snip_status_ok then - return -end - -require("luasnip/loaders/from_vscode").lazy_load() - local check_backspace = function() local col = vim.fn.col(".") - 1 return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") @@ -44,12 +37,6 @@ local kind_icons = { } cmp.setup({ - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) -- For `luasnip` users. - end, - }, - mapping = cmp.mapping.preset.insert({ [""] = cmp.mapping.select_prev_item(), [""] = cmp.mapping.select_next_item(), @@ -66,10 +53,6 @@ cmp.setup({ [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() - elseif luasnip.expandable() then - luasnip.expand() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() elseif check_backspace() then fallback() else @@ -82,8 +65,6 @@ cmp.setup({ [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) else fallback() end @@ -98,8 +79,6 @@ cmp.setup({ vim_item.kind = kind_icons[vim_item.kind] vim_item.menu = ({ nvim_lsp = "", - nvim_lua = "", - luasnip = "", buffer = "", path = "", emoji = "", @@ -109,8 +88,6 @@ cmp.setup({ }, sources = { { name = "nvim_lsp" }, - { name = "nvim_lua" }, - { name = "luasnip" }, { name = "buffer" }, { name = "path" }, }, diff --git a/.config/nvim/lua/user/plugins.lua b/.config/nvim/lua/user/plugins.lua index a606196..28a84aa 100644 --- a/.config/nvim/lua/user/plugins.lua +++ b/.config/nvim/lua/user/plugins.lua @@ -71,9 +71,7 @@ return packer.startup(function(use) use({ "hrsh7th/nvim-cmp", commit = "0e436ee23abc6c3fe5f3600145d2a413703e7272" }) use({ "hrsh7th/cmp-buffer", commit = "3022dbc9166796b644a841a02de8dd1cc1d311fa" }) use({ "hrsh7th/cmp-path", commit = "91ff86cd9c29299a64f968ebb45846c485725f23" }) - use({ "saadparwaiz1/cmp_luasnip", commit = "a9de941bcbda508d0a45d28ae366bb3f08db2e36" }) use({ "hrsh7th/cmp-nvim-lsp", commit = "affe808a5c56b71630f17aa7c38e15c59fd648a8" }) - use({ "hrsh7th/cmp-nvim-lua", commit = "d276254e7198ab7d00f117e88e223b4bd8c02d21" }) -- snippets use({ "L3MON4D3/LuaSnip", tag = "v1.*" })