1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-12-23 00:18:00 +00:00

[neovim] Remove unused lua plugins

This commit is contained in:
Daniel Carrillo 2022-10-08 18:26:59 +02:00
parent e086949aaf
commit bc0ff82244
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16
2 changed files with 0 additions and 25 deletions

View File

@ -3,13 +3,6 @@ if not cmp_status_ok then
return return
end 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 check_backspace = function()
local col = vim.fn.col(".") - 1 local col = vim.fn.col(".") - 1
return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") return col == 0 or vim.fn.getline("."):sub(col, col):match("%s")
@ -44,12 +37,6 @@ local kind_icons = {
} }
cmp.setup({ cmp.setup({
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body) -- For `luasnip` users.
end,
},
mapping = cmp.mapping.preset.insert({ mapping = cmp.mapping.preset.insert({
["<C-k>"] = cmp.mapping.select_prev_item(), ["<C-k>"] = cmp.mapping.select_prev_item(),
["<C-j>"] = cmp.mapping.select_next_item(), ["<C-j>"] = cmp.mapping.select_next_item(),
@ -66,10 +53,6 @@ cmp.setup({
["<Tab>"] = cmp.mapping(function(fallback) ["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() then
cmp.select_next_item() cmp.select_next_item()
elseif luasnip.expandable() then
luasnip.expand()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif check_backspace() then elseif check_backspace() then
fallback() fallback()
else else
@ -82,8 +65,6 @@ cmp.setup({
["<S-Tab>"] = cmp.mapping(function(fallback) ["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() then
cmp.select_prev_item() cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else else
fallback() fallback()
end end
@ -98,8 +79,6 @@ cmp.setup({
vim_item.kind = kind_icons[vim_item.kind] vim_item.kind = kind_icons[vim_item.kind]
vim_item.menu = ({ vim_item.menu = ({
nvim_lsp = "", nvim_lsp = "",
nvim_lua = "",
luasnip = "",
buffer = "", buffer = "",
path = "", path = "",
emoji = "", emoji = "",
@ -109,8 +88,6 @@ cmp.setup({
}, },
sources = { sources = {
{ name = "nvim_lsp" }, { name = "nvim_lsp" },
{ name = "nvim_lua" },
{ name = "luasnip" },
{ name = "buffer" }, { name = "buffer" },
{ name = "path" }, { name = "path" },
}, },

View File

@ -71,9 +71,7 @@ return packer.startup(function(use)
use({ "hrsh7th/nvim-cmp", commit = "0e436ee23abc6c3fe5f3600145d2a413703e7272" }) use({ "hrsh7th/nvim-cmp", commit = "0e436ee23abc6c3fe5f3600145d2a413703e7272" })
use({ "hrsh7th/cmp-buffer", commit = "3022dbc9166796b644a841a02de8dd1cc1d311fa" }) use({ "hrsh7th/cmp-buffer", commit = "3022dbc9166796b644a841a02de8dd1cc1d311fa" })
use({ "hrsh7th/cmp-path", commit = "91ff86cd9c29299a64f968ebb45846c485725f23" }) use({ "hrsh7th/cmp-path", commit = "91ff86cd9c29299a64f968ebb45846c485725f23" })
use({ "saadparwaiz1/cmp_luasnip", commit = "a9de941bcbda508d0a45d28ae366bb3f08db2e36" })
use({ "hrsh7th/cmp-nvim-lsp", commit = "affe808a5c56b71630f17aa7c38e15c59fd648a8" }) use({ "hrsh7th/cmp-nvim-lsp", commit = "affe808a5c56b71630f17aa7c38e15c59fd648a8" })
use({ "hrsh7th/cmp-nvim-lua", commit = "d276254e7198ab7d00f117e88e223b4bd8c02d21" })
-- snippets -- snippets
use({ "L3MON4D3/LuaSnip", tag = "v1.*" }) use({ "L3MON4D3/LuaSnip", tag = "v1.*" })