Skip to content

Commit

Permalink
chore: add keymaps
Browse files Browse the repository at this point in the history
  • Loading branch information
BBboy01 committed Jan 7, 2024
1 parent 23cb2e2 commit c9818f9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"nui.nvim": { "branch": "main", "commit": "35da9ca1de0fc4dda96c2e214d93d363c145f418" },
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
"nvim-lspconfig": { "branch": "master", "commit": "796394fd19fb878e8dbc4fd1e9c9c186ed07a5f4" },
"nvim-tree.lua": { "branch": "master", "commit": "6a99f5af78b5dd531d49ec0a5158dd0f9a7c992b" },
"nvim-treesitter": { "branch": "master", "commit": "49f1b9a7efc794be143f7ddcd60ce18e8164a7f8" },
"nvim-tree.lua": { "branch": "master", "commit": "78a5836092617205a999aefc75be1d842c299cbc" },
"nvim-treesitter": { "branch": "master", "commit": "5032f9952ad2a3a7f7792ac438c4f9e2bd53e0b9" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "85b9d0cbd4ff901abcda862b50dbb34e0901848b" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" },
"nvim-ufo": { "branch": "main", "commit": "c6d88523f574024b788f1c3400c5d5b9bb1a0407" },
Expand Down
3 changes: 3 additions & 0 deletions lua/config/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ keymap.set('n', '<leader>l', '<Cmd>set hlsearch!<CR>', {
desc = 'Toggle matched highlight status',
})

-- paste but not yank
keymap.set('x', 'p', [["_dP]])

keymap.set({ 'i', 'x', 'n', 's' }, '<C-c>', '<Esc>')

-- better up/down
Expand Down
8 changes: 2 additions & 6 deletions lua/plugins/coding.lua
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,13 @@ return {
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-q>'] = cmp.mapping.close(),
['<Tab>'] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Insert,
select = true,
}),
['<Tab>'] = cmp.mapping.confirm({ select = true }),
['<C-y>'] = cmp.mapping.confirm({ select = true }),
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
}, {
{ name = 'buffer', keyword_length = 3 },
}),
formatting = {
Expand Down Expand Up @@ -177,7 +174,6 @@ return {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' },
}, {
{ name = 'cmdline' },
}),
})
Expand Down

0 comments on commit c9818f9

Please sign in to comment.