chore: Update keymaps

This commit is contained in:
Fabio Lenherr / DashieTM 2023-11-18 14:19:36 +01:00
parent 6f617bce52
commit 1e6f107d00
4 changed files with 78 additions and 54 deletions

View file

@ -13,17 +13,32 @@
| \<A-k\> | window up |
| \<A-l\> | window down |
| \<A-;\> | window right |
| \<A-f\> | open file tree (root |
| \<A-F\> | open file tree (cwd) |
## Debugging
| key | Description |
| ----------- | ------------------------- |
| <leader>dt | toggle breakpoint |
| <leader>do | step over breakpoint |
| <leader>di | step into breakpoint |
| <leader>dc | continue from breakpoint |
| <leader>dt | start debugging |
| <leader>dq | close debug UI |
| ----------- | --------------------- |
| <leader>da | run with args |
| <leader>db | toggle breakpoint |
| <leader>dB | breakpoint condition |
| <leader>dC | run to cursoor |
| <leader>dc | continue |
| <leader>de | eval |
| <leader>dg | go to line |
| <leader>di | step into |
| <leader>k | down |
| <leader>l | up |
| <leader>; | run last |
| <leader>dO | step over |
| <leader>do | step out |
| <leader>dp | pause |
| <leader>dr | toggle repl |
| <leader>ds | session |
| <leader>dt | terminate |
| <leader>du | DAP UI |
| <leader>dw | widgets |
## neotest
| key | Description |
@ -31,22 +46,6 @@
| <leader>tt | execute all tests |
| <leader>tT | execute nearest test |
## Nvim-Tree
| key | Description |
| --- | -------------------------- |
| f | toggle open |
| a | create new file |
| d | remove file |
| r | rename file |
| y | copy name |
| Y | copy path |
| x | cut file |
| c | copy file |
| p | paste file |
| f | filter (inside nvim tree) |
| E | expand all folders |
| W | collapse all folders |
## buffer switching
| key | Description |
| --- | ------------------------- |
@ -72,9 +71,10 @@
| ---------- | ------------------------- |
| <leader>gq | show commits |
| <leader>gw | show commits with diff |
| <leader>ge | show branches |
| <leader>gb | show branches |
| <leader>gr | show git status |
| <leader>ga | show git stash |
| <leader>ge | git file tree |
### project telescope
<table> <tr> <th> normal mode </th> <th> insert mode </th></tr>
@ -94,30 +94,30 @@
| key | Description |
| -------- | --------------------------------- |
| Ctrl + d | delete project |
| Ctrl + v | rename project |
| Ctrl + a | create project |
| Ctrl + s | search files in project |
| Ctrl + b | browse files in project |
| Ctrl + l | change directory to project |
| Ctrl + r | recently opened files in project |
| Ctrl + f | find file within project |
| <C-d> | delete project |
| <C-v> | rename project |
| <C-a> | create project |
| <C-s> | search files in project |
| <C-b> | browse files in project |
| <C-l> | change directory to project |
| <C-r> | recently opened files in project |
| <C-f> | find file within project |
</td> </tr> </table>
## toggletrouble
| key | Description |
| -------- | ------------------------- |
| Ctrl + f | show errors and warnings |
| ---------- | ------------------------- |
| <leader>t | show errors and warnings |
## cmp
Note, these require the cmp list view to be open to do anything!
| key | Description |
| ----------- | --------------------------------------------------------- |
| Ctrl + b | scroll docs up |
| Ctrl + f | scroll docs down |
| Ctrl + e | cancel cmp |
| <C-b> | scroll docs up |
| <C-f> | scroll docs down |
| <C-e> | cancel cmp |
| Enter | write selected suggestion (does nothing if not selected) |
| Tab |scroll down through suggestion list |
| Shift + Tab | scroll up through suggestion list |
@ -125,22 +125,23 @@ Note, these require the cmp list view to be open to do anything!
## LSP
| key | Description |
| ------------ | ---------------------- |
| Leader + ca | go to declaration |
| Leader + cs | go to definition |
| Leader + cd | go to type definitions |
| Leader + cf | go to references |
| Leader + cq | fix code action |
| Leader + cQ | refactor code action |
| Leader + cw | signature help |
| Leader + ce | hover |
| Leader + cr | rename |
| <leader>ca | go to definition |
| <leader>ca | go to declaration |
| <leader>cs | find references |
| <leader>cd | go to type definition |
| <leader>cf | go to implementation |
| <leader>cq | fix code action |
| <leader>cQ | refactor code action |
| <leader>cw | signature help |
| <leader>ce | hover |
| <leader>cr | rename |
## snippets
These require you to be inside a snippet!
| key | Description |
| -------- | ------------------------- |
| Ctrl + j | jump to next entry |
| Ctrl + k | jump to previous entry |
| <C-j> | jump to next entry |
| <C-k> | jump to previous entry |
## Leap
| key | Description |

View file

@ -67,7 +67,7 @@ end, { desc = "Commits" })
map("n", "<leader>gw", function()
require("telescope.builtin").git_bcommits()
end, { desc = "Commits in branch" })
map("n", "<leader>ge", function()
map("n", "<leader>gb", function()
require("telescope.builtin").git_branches()
end, { desc = "Branches" })
map("n", "<leader>gr", function()

View file

@ -52,9 +52,6 @@ return {
"typ",
},
},
gopls = {
staticcheck = true,
},
sqlls = {},
taplo = {},
lemminx = {},

View file

@ -262,4 +262,30 @@ return {
},
},
},
{
"rcarriga/nvim-dap-ui",
keys = {
{
"<leader>dk",
function()
require("dap").down()
end,
desc = "Down",
},
{
"<leader>dl",
function()
require("dap").up()
end,
desc = "Up",
},
{
"<leader>d;",
function()
require("dap").run_last()
end,
desc = "Run Last",
},
},
},
}