From 173dd593ae59b2722753a90348becd556abc0be1 Mon Sep 17 00:00:00 2001 From: Nydragon Date: Sun, 20 Oct 2024 10:41:01 +0000 Subject: [PATCH] revert: reintroduce nvim-cmp --- flake.lock | 17 +++++++++++++++++ lazy-lock.json | 35 ++++++++++++++++++++++------------- lua/nvim-cmp-config.lua | 12 +++++++++++- lua/plugins.lua | 19 +++++++++++++++++-- 4 files changed, 67 insertions(+), 16 deletions(-) diff --git a/flake.lock b/flake.lock index 3de7356..03d8611 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "direnv/direnv.vim": { + "flake": false, + "locked": { + "lastModified": 1701514458, + "narHash": "sha256-Lwwm95UEkS8Q0Qsoh10o3sFn48wf7v7eCX/FJJV1HMI=", + "owner": "direnv", + "repo": "direnv.vim", + "rev": "ab2a7e08dd630060cd81d7946739ac7442a4f269", + "type": "github" + }, + "original": { + "owner": "direnv", + "repo": "direnv.vim", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1728888510, @@ -18,6 +34,7 @@ }, "root": { "inputs": { + "direnv/direnv.vim": "direnv/direnv.vim", "nixpkgs": "nixpkgs" } } diff --git a/lazy-lock.json b/lazy-lock.json index c3a38ba..b0c009a 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,30 +1,39 @@ { - "barbar.nvim": { "branch": "master", "commit": "a3ebfe0c382fc5393b3c0cef96d58c6c49492562" }, + "barbar.nvim": { "branch": "master", "commit": "7c28de8c22f4c00ed43a78ae16c13dd6a248fe1a" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, + "cmp-git": { "branch": "main", "commit": "50d526dff0f6bc441b51fc269d9fdc99a50c76af" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, + "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" }, "direnv.vim": { "branch": "master", "commit": "ab2a7e08dd630060cd81d7946739ac7442a4f269" }, "dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" }, - "formatter.nvim": { "branch": "master", "commit": "ad246d34ce7a32f752071ed81b09b94e6b127fad" }, - "gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" }, + "formatter.nvim": { "branch": "master", "commit": "04547bdfe89035731a2815a3875b87f77d43e36d" }, + "gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" }, "incline.nvim": { "branch": "main", "commit": "16fc9c073e3ea4175b66ad94375df6d73fc114c0" }, - "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" }, - "lsp-zero.nvim": { "branch": "v4.x", "commit": "b8411704591ae8e1501f1b9b31c801c09927baac" }, + "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, + "lsp-zero.nvim": { "branch": "v4.x", "commit": "19a8b90340c6c522219c84f7befe784d657ab28e" }, "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, - "mini.completion": { "branch": "main", "commit": "2b877876ec7c77973a512083e2aa3f13c61c2abe" }, "mini.cursorword": { "branch": "main", "commit": "7d1b38a17834acbbc4feff8e42aedc4ed0c6ff06" }, "mini.indentscope": { "branch": "main", "commit": "da9af64649e114aa79480c238fd23f6524bc0903" }, "mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" }, "nerdcommenter": { "branch": "master", "commit": "3f860f2d981547c18f2c9599e3c358ea488c3be4" }, - "nvim-lspconfig": { "branch": "master", "commit": "b064131428f6bbbbc905f4451ba6779fda334a3a" }, - "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, - "nvim-treesitter": { "branch": "master", "commit": "b8ad0473f4d5d7b59e17a67ad0b68711b0232486" }, - "nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" }, + "nvim-cmp": { "branch": "main", "commit": "82bd4b59432d44cf5e2a5ce3a40a037a575a6623" }, + "nvim-lspconfig": { "branch": "master", "commit": "b58d56c0c7b3dfb1c71797013ad7b4aca5e6b898" }, + "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, + "nvim-treesitter": { "branch": "master", "commit": "a3ca2e60563064cea008555d0b7d031430305b09" }, + "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "3b8a1e17187cfeedb31decbd625da62398a8ff34" }, - "telescope.nvim": { "branch": "master", "commit": "b5fd7f7ae0ea4537511077ed8ef4a6021cedba2f" }, + "telescope.nvim": { "branch": "master", "commit": "df534c3042572fb958586facd02841e10186707c" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "toggleterm.nvim": { "branch": "main", "commit": "48be57eaba817f038d61bbf64d2c597f578c0827" }, "tokyonight.nvim": { "branch": "main", "commit": "2c85fad417170d4572ead7bf9fdd706057bd73d7" }, - "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, + "trouble.nvim": { "branch": "main", "commit": "254145ffd528b98eb20be894338e2d5c93fa02c2" }, + "vim-vsnip": { "branch": "master", "commit": "02a8e79295c9733434aab4e0e2b8c4b7cea9f3a9" }, "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" }, - "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" } + "which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" } } diff --git a/lua/nvim-cmp-config.lua b/lua/nvim-cmp-config.lua index 58ddde9..1653be7 100644 --- a/lua/nvim-cmp-config.lua +++ b/lua/nvim-cmp-config.lua @@ -39,7 +39,7 @@ cmp.setup({ nvim_lsp = "λ", vsnip = "⋗", buffer = "Ω", - path = "🖫", + path = "/", } item.menu = menu_icon[entry.source.name] return item @@ -47,6 +47,16 @@ cmp.setup({ }, }) +cmp.setup.filetype("gitcommit", { + sources = cmp.config.sources({ + { name = "git" }, + }, { + { name = "buffer" }, + }), +}) + +require("cmp_git").setup() + -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline({ "/", "?" }, { mapping = cmp.mapping.preset.cmdline(), diff --git a/lua/plugins.lua b/lua/plugins.lua index 03154ea..d2de990 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -15,6 +15,23 @@ vim.opt.rtp:prepend(lazypath) require("lazy").setup({ --: Behaviour {{{ + { + "hrsh7th/nvim-cmp", + dependencies = { + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-cmdline", + "hrsh7th/cmp-path", + "hrsh7th/cmp-nvim-lua", + "hrsh7th/cmp-nvim-lsp-signature-help", + "hrsh7th/cmp-vsnip", + "hrsh7th/vim-vsnip", + "petertriho/cmp-git", + }, + init = function() + require("nvim-cmp-config") + end, + }, "VonHeikemen/lsp-zero.nvim", { "nvim-treesitter/nvim-treesitter", @@ -84,7 +101,6 @@ require("lazy").setup({ require("telescope").load_extension("file_browser") end, }, - { "echasnovski/mini.completion", opts = {} }, { "folke/trouble.nvim", dependencies = { "nvim-tree/nvim-web-devicons" }, @@ -140,7 +156,6 @@ require("lazy").setup({ require("toggleterm").setup(opts) end, }, - "echasnovski/mini.pairs", --:}}} --: Visuals {{{ {