This commit is contained in:
Ivar Fatland
2025-01-03 17:23:08 +01:00
parent 3be42341e7
commit e78a4cc539
+23 -8
View File
@@ -19,11 +19,15 @@ vim.cmd [[
nnoremap ,co :copen<CR> nnoremap ,co :copen<CR>
nnoremap ,cc :cclose<CR> nnoremap ,cc :cclose<CR>
nnoremap ,cq :call setqflist([])<CR>:cclose<CR>
nnoremap ,ct :call setqflist([{'filename': expand('%'), 'lnum': line('.'), 'col': col('.'), 'text': 'TODO'}], 'a')<CR>
nnoremap ,cf :cfirst<CR> nnoremap ,cf :cfirst<CR>
nnoremap ,cl :clast<CR> nnoremap ,cl :clast<CR>
nnoremap ,cn :cnext<CR> nnoremap <c-n> :cnext<CR>
nnoremap ,cp :cprevious<CR> nnoremap <c-p> :cprevious<CR>
nnoremap ,cd :cd %:p:h<CR> nnoremap ,cd :cd %:p:h<CR>
nnoremap ,cu :colder<CR>
nnoremap ,cr :cnewer<CR>
tnoremap <esc> <c-\><c-n> tnoremap <esc> <c-\><c-n>
autocmd BufEnter * if &buftype == 'terminal' | :startinsert | endif autocmd BufEnter * if &buftype == 'terminal' | :startinsert | endif
@@ -274,6 +278,15 @@ require'lazy'.setup{
tag = '0.1.8', tag = '0.1.8',
dependencies = { 'nvim-lua/plenary.nvim', }, dependencies = { 'nvim-lua/plenary.nvim', },
config = function() config = function()
local a = require'telescope.actions'
require'telescope'.setup{
defaults = {
mappings = {
i = { ["<C-Q>"] = a.smart_send_to_qflist + a.open_qflist, },
n = { ["<C-Q>"] = a.smart_send_to_qflist + a.open_qflist, },
}
}
}
vim.cmd [[ vim.cmd [[
noremap ,ff :lua require'telescope.builtin'.find_files()<CR> noremap ,ff :lua require'telescope.builtin'.find_files()<CR>
noremap ,fo :lua require'telescope.builtin'.oldfiles()<CR> noremap ,fo :lua require'telescope.builtin'.oldfiles()<CR>
@@ -354,12 +367,14 @@ require'lazy'.setup{
['<C-n>'] = cmp.mapping.select_next_item(), ['<C-n>'] = cmp.mapping.select_next_item(),
['<C-p>'] = cmp.mapping.select_prev_item(), ['<C-p>'] = cmp.mapping.select_prev_item(),
}, },
sources = cmp.config.sources{ sources = cmp.config.sources(
{ name = 'snippy' }, {
{ name = 'nvim_lsp' }, { name = 'snippy', priority = 100000000000000000000 },
{ name = 'buffer' }, { name = 'nvim_lsp', priority = 100},
{ name = 'path' }, { name = 'path', priority = 1},
}, }
),
preselect = cmp.PreselectMode.None,
} }
end, end,
}, },