2024-03-02 20:49:44 +01:00
|
|
|
[
|
2024-02-16 20:10:20 +01:00
|
|
|
# Quickfix
|
2024-03-02 20:49:44 +01:00
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>qo";
|
|
|
|
action = "<cmd>Copen<CR>";
|
|
|
|
options.desc = "Quickfix Open";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>qq";
|
|
|
|
action = "<cmd>cclose<CR>";
|
|
|
|
options.desc = "Quickfix Quit";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>qj";
|
|
|
|
action = "<cmd>cnext<CR>";
|
|
|
|
options.desc = "Quickfix next [J]";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>qk";
|
|
|
|
action = "<cmd>cprev<CR>";
|
|
|
|
options.desc = "Quickfix previous [K]";
|
|
|
|
}
|
2024-02-16 20:10:20 +01:00
|
|
|
# Open or create file
|
2024-03-02 20:49:44 +01:00
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>gf";
|
|
|
|
action = "<cmd>e <cfile><CR>";
|
|
|
|
options.desc = "Go to File";
|
|
|
|
}
|
2024-02-16 20:10:20 +01:00
|
|
|
# Keep Selection when indenting
|
2024-03-02 20:49:44 +01:00
|
|
|
{
|
|
|
|
mode = "x";
|
|
|
|
key = ">";
|
|
|
|
action = ">gv";
|
|
|
|
options.desc = "Indent Selection";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "x";
|
|
|
|
key = "<";
|
|
|
|
action = "<gv";
|
|
|
|
options.desc = "Deindent Selection";
|
|
|
|
}
|
2024-02-16 20:10:20 +01:00
|
|
|
# Diagnostics
|
2024-03-02 20:49:44 +01:00
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>dj";
|
2024-02-16 20:10:20 +01:00
|
|
|
action = "vim.diagnostic.goto_next";
|
2024-03-02 20:49:44 +01:00
|
|
|
lua = true;
|
|
|
|
options.desc = "Diagnostics next [J]";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>dk";
|
2024-02-16 20:10:20 +01:00
|
|
|
action = "vim.diagnostic.goto_prev";
|
2024-03-02 20:49:44 +01:00
|
|
|
lua = true;
|
|
|
|
options.desc = "Diagnostics previous [K]";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>xx";
|
2024-02-16 20:10:20 +01:00
|
|
|
action = "require('trouble').toggle";
|
2024-03-02 20:49:44 +01:00
|
|
|
lua = true;
|
|
|
|
options.desc = "Toggle trouble";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>xw";
|
2024-02-16 20:10:20 +01:00
|
|
|
action = "function() require('trouble').toggle('workspace_diagnostics') end";
|
2024-03-02 20:49:44 +01:00
|
|
|
lua = true;
|
|
|
|
options.desc = "Toggle Workspace trouble";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>xd";
|
2024-02-16 20:10:20 +01:00
|
|
|
action = "function() require('trouble').toggle('document_diagnostics') end";
|
2024-03-02 20:49:44 +01:00
|
|
|
lua = true;
|
|
|
|
options.desc = "Toggle Document trouble";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>xq";
|
2024-02-16 20:10:20 +01:00
|
|
|
action = "function() require('trouble').toggle('quickfix') end";
|
2024-03-02 20:49:44 +01:00
|
|
|
lua = true;
|
|
|
|
options.desc = "Toggle Quickfix trouble";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>xl";
|
2024-02-16 20:10:20 +01:00
|
|
|
action = "function() require('trouble').toggle('loclist') end";
|
2024-03-02 20:49:44 +01:00
|
|
|
lua = true;
|
|
|
|
options.desc = "Toggle Loclist trouble";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "gR";
|
2024-02-16 20:10:20 +01:00
|
|
|
action = "function() require('trouble').toggle('lsp_references') end";
|
2024-03-02 20:49:44 +01:00
|
|
|
lua = true;
|
|
|
|
options.desc = "Toggle lsp References trouble";
|
|
|
|
}
|
2024-02-16 20:10:20 +01:00
|
|
|
# Telescope
|
2024-03-02 20:49:44 +01:00
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>ff";
|
2024-02-16 20:10:20 +01:00
|
|
|
action = "require('telescope.builtin').find_files";
|
2024-03-02 20:49:44 +01:00
|
|
|
lua = true;
|
|
|
|
options.desc = "Find Files";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>fg";
|
2024-02-16 20:10:20 +01:00
|
|
|
action = "require('telescope.builtin').live_grep";
|
2024-03-02 20:49:44 +01:00
|
|
|
lua = true;
|
|
|
|
options.desc = "Find Grep";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>fh";
|
2024-02-16 20:10:20 +01:00
|
|
|
action = "require('telescope.builtin').help_tags";
|
2024-03-02 20:49:44 +01:00
|
|
|
lua = true;
|
|
|
|
options.desc = "Find Help";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>fb";
|
2024-02-16 20:10:20 +01:00
|
|
|
action = "require('telescope.builtin').buffers";
|
2024-03-02 20:49:44 +01:00
|
|
|
lua = true;
|
|
|
|
options.desc = "Find Buffer";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>fd";
|
2024-02-16 20:10:20 +01:00
|
|
|
action = "require('telescope.builtin').diagnostics";
|
2024-03-02 20:49:44 +01:00
|
|
|
lua = true;
|
|
|
|
options.desc = "Find Diagnostics";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>fq";
|
2024-02-16 20:10:20 +01:00
|
|
|
action = "require('telescope.builtin').quickfix";
|
2024-03-02 20:49:44 +01:00
|
|
|
lua = true;
|
|
|
|
options.desc = "Find Quickfix";
|
|
|
|
}
|
|
|
|
]
|