From e15415a204d88a83f88a1d75943e83b9424d589f Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 23 Dec 2025 11:26:42 +0100 Subject: nvim: Disable snippets and completion Current supply chain attacks highlight the risk of using a lot of plugins. This commit is just a test how much I need snippets and completion by disabling them. Maybe this is rolled back or replaced by a custom Lua implementation. --- nvim/init.lua | 31 ---------------------------- nvim/pack/L3MON4D3/start/LuaSnip | 1 - nvim/pack/hrsh7th/start/cmp-nvim-lsp | 1 - nvim/pack/hrsh7th/start/nvim-cmp | 1 - nvim/pack/rafamadriz/start/friendly-snippets | 1 - nvim/pack/saadparwaiz1/start/cmp_luasnip | 1 - 6 files changed, 36 deletions(-) delete mode 160000 nvim/pack/L3MON4D3/start/LuaSnip delete mode 160000 nvim/pack/hrsh7th/start/cmp-nvim-lsp delete mode 160000 nvim/pack/hrsh7th/start/nvim-cmp delete mode 160000 nvim/pack/rafamadriz/start/friendly-snippets delete mode 160000 nvim/pack/saadparwaiz1/start/cmp_luasnip (limited to 'nvim') diff --git a/nvim/init.lua b/nvim/init.lua index db290b3..be737dc 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -1,32 +1,4 @@ --- completion configuration -local cmp = require'cmp' -cmp.setup({ - snippet = { - expand = function(args) - require('luasnip').lsp_expand(args.body) - end, - }, - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm({ select = true }), - }), - sources = cmp.config.sources({ - { name = 'nvim_lsp' }, - { name = 'luasnip' }, - }, { - { name = 'buffer' }, - }) -}) - -- Language Server Protocol server configuration -local capabilities = require('cmp_nvim_lsp').default_capabilities() local lsp = require'lspconfig' local servers = { 'clangd', @@ -40,9 +12,6 @@ for _, server in ipairs(servers) do lsp[server].setup{capabilities = capabilities} end --- snippet loading configuration -require("luasnip.loaders.from_vscode").lazy_load() - -- setup telescope local telescope_builtin = require('telescope.builtin') diff --git a/nvim/pack/L3MON4D3/start/LuaSnip b/nvim/pack/L3MON4D3/start/LuaSnip deleted file mode 160000 index 8ae1ded..0000000 --- a/nvim/pack/L3MON4D3/start/LuaSnip +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8ae1dedd988eb56441b7858bd1e8554dfadaa46d diff --git a/nvim/pack/hrsh7th/start/cmp-nvim-lsp b/nvim/pack/hrsh7th/start/cmp-nvim-lsp deleted file mode 160000 index 5af77f5..0000000 --- a/nvim/pack/hrsh7th/start/cmp-nvim-lsp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5af77f54de1b16c34b23cba810150689a3a90312 diff --git a/nvim/pack/hrsh7th/start/nvim-cmp b/nvim/pack/hrsh7th/start/nvim-cmp deleted file mode 160000 index 8c82d0b..0000000 --- a/nvim/pack/hrsh7th/start/nvim-cmp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8c82d0bd31299dbff7f8e780f5e06d2283de9678 diff --git a/nvim/pack/rafamadriz/start/friendly-snippets b/nvim/pack/rafamadriz/start/friendly-snippets deleted file mode 160000 index dcd4a58..0000000 --- a/nvim/pack/rafamadriz/start/friendly-snippets +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dcd4a586439a1c81357d5b9d26319ae218cc9479 diff --git a/nvim/pack/saadparwaiz1/start/cmp_luasnip b/nvim/pack/saadparwaiz1/start/cmp_luasnip deleted file mode 160000 index 05a9ab2..0000000 --- a/nvim/pack/saadparwaiz1/start/cmp_luasnip +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 05a9ab28b53f71d1aece421ef32fee2cb857a843 -- cgit v1.2.3-70-g09d2