瀏覽代碼

Add a commented out example of the classic complete keymaps. Fixes #866 (#868)

Damjan 9000 2 年之前
父節點
當前提交
2e68a2c253
共有 1 個文件被更改,包括 6 次插入 和 0 次删除
  1. 6 0
      init.lua

+ 6 - 0
init.lua

@@ -720,6 +720,12 @@ require('lazy').setup({
           --  This will expand snippets if the LSP sent a snippet.
           ['<C-y>'] = cmp.mapping.confirm { select = true },
 
+          -- If you prefer more traditional completion keymaps,
+          -- you can uncomment the following lines
+          --['<CR>'] = cmp.mapping.confirm { select = true },
+          --['<Tab>'] = cmp.mapping.select_next_item(),
+          --['<S-Tab>'] = cmp.mapping.select_prev_item(),
+
           -- Manually trigger a completion from nvim-cmp.
           --  Generally you don't need this, because nvim-cmp will display
           --  completions whenever it has completion options available.