CMD no longer aborts on ESC (was conflicting), added color scheme toggle <leader>m
This commit is contained in:
@@ -29,7 +29,9 @@ cmp.setup({
|
|||||||
['<PageUp>'] = cmp.mapping.scroll_docs(-4),
|
['<PageUp>'] = cmp.mapping.scroll_docs(-4),
|
||||||
['<PageDown>'] = cmp.mapping.scroll_docs(4),
|
['<PageDown>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
|
||||||
['<Esc>'] = cmp.mapping.abort(),
|
-- ESC messes with standard ESC mapping, don't use
|
||||||
|
-- ['<Esc>'] = cmp.mapping.abort(),
|
||||||
|
['<C-e>'] = cmp.mapping.abort(),
|
||||||
|
|
||||||
-- Use <CR>(Enter) to confirm selection
|
-- Use <CR>(Enter) to confirm selection
|
||||||
-- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
-- 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 }
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -26,6 +26,15 @@ vim.keymap.set('n', '<leader>c', ":Calendar -split=horizontal -position=below -h
|
|||||||
-- Open current file in browser (chromium)
|
-- Open current file in browser (chromium)
|
||||||
vim.keymap.set('n', '<space>o', ":silent !chromium '%'<cr>", { desc = "Open in browser" })
|
vim.keymap.set('n', '<space>o', ":silent !chromium '%'<cr>", { desc = "Open in browser" })
|
||||||
|
|
||||||
|
-- toggle colorscheme between dark and light
|
||||||
|
vim.keymap.set('n', '<leader>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
|
-- configure workspaces
|
||||||
-- also add a custom picker to fzf
|
-- also add a custom picker to fzf
|
||||||
|
|||||||
Reference in New Issue
Block a user