diff --git a/lua/config/nvim-cmp.lua b/lua/config/nvim-cmp.lua index e28dd19..637ef04 100644 --- a/lua/config/nvim-cmp.lua +++ b/lua/config/nvim-cmp.lua @@ -29,7 +29,9 @@ cmp.setup({ [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.abort(), + -- ESC messes with standard ESC mapping, don't use + -- [''] = cmp.mapping.abort(), + [''] = cmp.mapping.abort(), -- Use (Enter) to confirm selection -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. @@ -95,21 +97,3 @@ cmp.setup({ --- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline({ '/', '?' }, { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = 'buffer' } - } -}) - --- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }), - matching = { disallow_symbol_nonprefix_matching = false } -}) diff --git a/lua/keybindings.lua b/lua/keybindings.lua index 75f29f5..8cedb8d 100644 --- a/lua/keybindings.lua +++ b/lua/keybindings.lua @@ -26,6 +26,15 @@ vim.keymap.set('n', 'c', ":Calendar -split=horizontal -position=below -h -- Open current file in browser (chromium) vim.keymap.set('n', 'o', ":silent !chromium '%'", { desc = "Open in browser" }) +-- toggle colorscheme between dark and light +vim.keymap.set('n', 'm', function() + if vim.opt.background:get() == "dark" then + vim.o.background = "light" + else + vim.o.background = "dark" + end +end, { desc = "Toggle dark/light mode" }) + -- -- configure workspaces -- also add a custom picker to fzf @@ -47,7 +56,7 @@ local workspaces_fzf_picker = function(opts) for i = 1, #ws do fzf_cb(ws[i].name) end - fzf_cb() -- EOF + fzf_cb() -- EOF end, opts) end vim.keymap.set('n', 'w', workspaces_fzf_picker, { desc = "Workspaces" })