aboutsummaryrefslogtreecommitdiff
path: root/nvim/lua/plugins/nvim-cmp.lua
diff options
context:
space:
mode:
authormirenn <me@mirenn.dev>2026-09-21 23:09:33 +0200
committermirenn <me@mirenn.dev>2026-10-06 14:13:32 +0200
commit8f9c77878f8742a47d34a50748023d1b552cfbf1 (patch)
treef749dff061451ab8427100c452f8175de8e39c53 /nvim/lua/plugins/nvim-cmp.lua
parent8501a38d7c3bbc2e99466e6658be134c72d4f47a (diff)
downloaddotfiles-8f9c77878f8742a47d34a50748023d1b552cfbf1.tar.gz
dotfiles-8f9c77878f8742a47d34a50748023d1b552cfbf1.zip
guix primer
Diffstat (limited to 'nvim/lua/plugins/nvim-cmp.lua')
-rw-r--r--nvim/lua/plugins/nvim-cmp.lua64
1 files changed, 0 insertions, 64 deletions
diff --git a/nvim/lua/plugins/nvim-cmp.lua b/nvim/lua/plugins/nvim-cmp.lua
deleted file mode 100644
index b7d71a3..0000000
--- a/nvim/lua/plugins/nvim-cmp.lua
+++ /dev/null
@@ -1,64 +0,0 @@
-local config = function()
- local cmp = require("cmp")
- vim.opt.completeopt = "menu,menuone"
-
- cmp.setup({
- formatting = {
- expandable_indicator = false,
- fields = { "abbr", "kind" },
- format = require("lspkind").cmp_format({
- mode = "text_symbol",
- maxwidth = function() return math.floor(0.45 * vim.o.columns) end,
- ellipsis_char = "...", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
- before = function(_, vim_item)
- vim_item.menu = ""
- return vim_item
- end
- })
- },
- snippet = {
- expand = function(args)
- vim.snippet.expand(args.body)
- end,
- },
- window = {
- completion = cmp.config.window.bordered(),
- documentation = cmp.config.window.bordered(),
- },
- mapping = {
- ["<TAB>"] = cmp.mapping.select_next_item(),
- ["<C-b>"] = cmp.mapping.scroll_docs(-4),
- ["<C-f>"] = cmp.mapping.scroll_docs(4),
- ["<C-Space>"] = cmp.mapping.complete(),
- ["<C-e>"] = cmp.mapping.abort(),
- ["<CR>"] = cmp.mapping.confirm({ select = true }),
- },
- sources = cmp.config.sources(
- {
- { name = "lazydev", group_index = 0 }
- }, {
- { name = "neorg" }
- }, {
- { name = "nvim_lsp" },
- }, {
- { name = "path" },
- }, {
- { name = "buffer" },
- }
- )
- })
-end
-
-return {
- "hrsh7th/nvim-cmp",
- lazy = true,
- event = "InsertEnter",
- config = config,
- dependencies = {
- "neovim/nvim-lspconfig",
- "onsails/lspkind.nvim",
- "hrsh7th/cmp-nvim-lsp",
- "hrsh7th/cmp-buffer",
- "hrsh7th/cmp-path",
- },
-}