Skip to content

Add something to the cheatsheet without creating a mapping #2512

Closed Answered by siduck
acdoussan asked this question in Q&A
Discussion options

You must be logged in to vote

this usecase looks complex to me

{
    "hrsh7th/nvim-cmp",
    config = function(_, opts)
      local cmp  = require('cmp')

      -- nvchad mapping syntax! same way we manually load lspconfig mappings
      -- check lspconfig file
      local mappings = {
        plugin = true,

        i = {
          ["<C-p>"] = { cmp.mapping.select_prev_item(), "select prev item" },
          ["<C-Space>"] = { cmp.mapping.complete(), "show completions" },
        },
      }

      require("core.utils").mappings.cmp = mappings
      require("core.utils").load_mappings "cmp"
      -- require("core.utils").load_mappings("cmp", { buffer = number })

      require("cmp").setup(opts)
    end,
  },

only cave…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by siduck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants