Skip to content

Commit

Permalink
mappings: add TodoTelescope for better todo searchability
Browse files Browse the repository at this point in the history
Signed-off-by: aserowy <serowy@hotmail.com>
  • Loading branch information
aserowy committed Nov 19, 2024
1 parent 1d7f202 commit 7ae70a4
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions lua/mappings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,21 +131,6 @@ local function editor_dap()
})
end

mappings.editor_completion = function(cmp, handle)
return {
["<C-p>"] = cmp.mapping.select_prev_item(),
["<C-n>"] = cmp.mapping.select_next_item(),
["<C-u>"] = cmp.mapping.scroll_docs(-4),
["<C-d>"] = cmp.mapping.scroll_docs(4),
["<CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Insert,
select = false,
}),
["<Tab>"] = cmp.mapping(handle.jump_next, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(handle.jump_previous, { "i", "s" }),
}
end

local function navigations()
keymaps.register({ "n", "t" }, {
["<C-f><C-a>"] = [[<cmd>lua require'telescope.builtin'.lsp_workspace_symbols()<cr>]],
Expand All @@ -166,10 +151,11 @@ local function navigations()
})

keymaps.register("n", {
["<leader>t"] = [[<cmd>TodoTrouble toggle<cr>]],
["<leader>tt"] = [[<cmd>TodoTrouble toggle<cr>]],
["<leader>tf"] = [[<cmd>TodoTelescope<cr>]],
["<leader>lw"] = [[<cmd>Trouble diagnostics toggle filter.severity=vim.diagnostic.severity.WARN<cr>]],
["<leader>le"] = [[<cmd>Trouble diagnostics toggle filter.severity=vim.diagnostic.severity.ERROR<cr>]],
["<leader>la"] = [[<cmd>Trouble diagnostics toggle<cr>]],
["<leader>ll"] = [[<cmd>Trouble diagnostics toggle<cr>]],
})
end

Expand Down

0 comments on commit 7ae70a4

Please sign in to comment.