From b36a473877108e8f767abb8c24af3561a65661ec Mon Sep 17 00:00:00 2001 From: Aotrix Date: Fri, 14 Feb 2025 14:46:43 +0100 Subject: changed some mappings --- lua/autocomplete/autocomplete.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lua/autocomplete/autocomplete.lua') diff --git a/lua/autocomplete/autocomplete.lua b/lua/autocomplete/autocomplete.lua index f5329e1..1e2687b 100644 --- a/lua/autocomplete/autocomplete.lua +++ b/lua/autocomplete/autocomplete.lua @@ -11,17 +11,19 @@ end -- NOTE: Use command ':verbose imap ' to make sure Tab is not mapped by -- other plugins before putting this into your config local opts = {silent = true, noremap = true, expr = true, replace_keycodes = false} -keyset("i", "", 'coc#pum#visible() ? coc#pum#next(1) : v:lua.check_back_space() ? "" : coc#refresh()', opts) -keyset("i", "", [[coc#pum#visible() ? coc#pum#prev(1) : "\"]], opts) +keyset("i", "", 'coc#pum#visible() ? coc#pum#next(1) : v:lua.check_back_space() ? "" : coc#refresh()', opts) +keyset("i", "", [[coc#pum#visible() ? coc#pum#prev(1) : "\"]], opts) vim.opt.pumheight = 12 -- Make to accept selected completion item or notify coc.nvim to format -- u breaks current undo, please make your own choice keyset("i", "", [[coc#pum#visible() ? coc#pum#confirm() : "\u\\=coc#on_enter()\"]], opts) --- Use to trigger snippets -keyset("i", "", "(coc-snippets-expand-jump)") +-- keyset("i", "", "(coc-snippets-expand-jump)") +-- keyset("i", "", "(coc-snippets-expand-jump)") -- Use to trigger completion +vim.g.coc_snippet_next = "" +vim.g.coc_snippet_prev = "" keyset("i", "", "coc#refresh()", {silent = true, expr = true}) -- Use `[g` and `]g` to navigate diagnostics @@ -118,9 +120,9 @@ local opts = {silent = true, nowait = true, expr = true} keyset("n", "", 'coc#float#has_scroll() ? coc#float#scroll(1) : ""', opts) keyset("n", "", 'coc#float#has_scroll() ? coc#float#scroll(0) : ""', opts) keyset("i", "", - 'coc#float#has_scroll() ? "=coc#float#scroll(1)" : ""', opts) +'coc#float#has_scroll() ? "=coc#float#scroll(1)" : ""', opts) keyset("i", "", - 'coc#float#has_scroll() ? "=coc#float#scroll(0)" : ""', opts) +'coc#float#has_scroll() ? "=coc#float#scroll(0)" : ""', opts) keyset("v", "", 'coc#float#has_scroll() ? coc#float#scroll(1) : ""', opts) keyset("v", "", 'coc#float#has_scroll() ? coc#float#scroll(0) : ""', opts) -- cgit v1.2.3