From 4fb498c3ec70705a84855da696afe93e9f04f07e Mon Sep 17 00:00:00 2001 From: Masayuki Izumi Date: Sat, 7 Dec 2024 11:31:46 +0900 Subject: [PATCH] feat(neovim): add `Snikimonkd/cmp-go-pkgs` (#636) --- config/.config/nvim/lazy-lock.json | 1 + config/.config/nvim/lua/plugins/edit/config/nvim-cmp.lua | 5 +++++ config/.config/nvim/lua/plugins/edit/init.lua | 1 + 3 files changed, 7 insertions(+) diff --git a/config/.config/nvim/lazy-lock.json b/config/.config/nvim/lazy-lock.json index e98f34dc..7b0185f3 100644 --- a/config/.config/nvim/lazy-lock.json +++ b/config/.config/nvim/lazy-lock.json @@ -5,6 +5,7 @@ "bufdelete.nvim": { "branch": "master", "commit": "f6bcea78afb3060b198125256f897040538bcb81" }, "catppuccin": { "branch": "main", "commit": "c9e205fe035d622b3c2d66ee42edf368c0c31fd5" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-go-pkgs": { "branch": "main", "commit": "7a76e1f9c8d5f40fe27b8d6fcac04de4456875bb" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" }, diff --git a/config/.config/nvim/lua/plugins/edit/config/nvim-cmp.lua b/config/.config/nvim/lua/plugins/edit/config/nvim-cmp.lua index ab4e1046..df97128e 100644 --- a/config/.config/nvim/lua/plugins/edit/config/nvim-cmp.lua +++ b/config/.config/nvim/lua/plugins/edit/config/nvim-cmp.lua @@ -95,6 +95,7 @@ function M.setup() sources = cmp.config.sources({ { name = "copilot", group_index = 1, priority = 1000 }, { name = "nvim_lsp", group_index = 1, priority = 100 }, + { name = "go_pkgs", group_index = 1, priority = 100 }, { name = "path", group_index = 1, priority = 10 }, { name = "buffer", group_index = 1, priority = 1 }, { name = "lazydev", group_index = 0 }, @@ -107,6 +108,10 @@ function M.setup() side_padding = 0, }, }, + matching = { + -- for go_pkgs + disallow_symbol_nonprefix_matching = false, + }, formatting = { fields = { "kind", "abbr", "menu" }, format = function(entry, vim_item) diff --git a/config/.config/nvim/lua/plugins/edit/init.lua b/config/.config/nvim/lua/plugins/edit/init.lua index 88ee9ad9..1e27ae27 100644 --- a/config/.config/nvim/lua/plugins/edit/init.lua +++ b/config/.config/nvim/lua/plugins/edit/init.lua @@ -22,6 +22,7 @@ return { method = "getCompletionsCycling", }, }, + "Snikimonkd/cmp-go-pkgs", { "onsails/lspkind.nvim", config = function()