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-k\> | window up |
| \<A-l\> | window down | | \<A-l\> | window down |
| \<A-;\> | window right | | \<A-;\> | window right |
| \<A-f\> | open file tree (root |
| \<A-F\> | open file tree (cwd) |
## Debugging ## Debugging
| key | Description | | key | Description |
| ----------- | ------------------------- | | ----------- | --------------------- |
| <leader>dt | toggle breakpoint | | <leader>da | run with args |
| <leader>do | step over breakpoint | | <leader>db | toggle breakpoint |
| <leader>di | step into breakpoint | | <leader>dB | breakpoint condition |
| <leader>dc | continue from breakpoint | | <leader>dC | run to cursoor |
| <leader>dt | start debugging | | <leader>dc | continue |
| <leader>dq | close debug UI | | <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 ## neotest
| key | Description | | key | Description |
@ -31,22 +46,6 @@
| <leader>tt | execute all tests | | <leader>tt | execute all tests |
| <leader>tT | execute nearest test | | <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 ## buffer switching
| key | Description | | key | Description |
| --- | ------------------------- | | --- | ------------------------- |
@ -72,9 +71,10 @@
| ---------- | ------------------------- | | ---------- | ------------------------- |
| <leader>gq | show commits | | <leader>gq | show commits |
| <leader>gw | show commits with diff | | <leader>gw | show commits with diff |
| <leader>ge | show branches | | <leader>gb | show branches |
| <leader>gr | show git status | | <leader>gr | show git status |
| <leader>ga | show git stash | | <leader>ga | show git stash |
| <leader>ge | git file tree |
### project telescope ### project telescope
<table> <tr> <th> normal mode </th> <th> insert mode </th></tr> <table> <tr> <th> normal mode </th> <th> insert mode </th></tr>
@ -94,30 +94,30 @@
| key | Description | | key | Description |
| -------- | --------------------------------- | | -------- | --------------------------------- |
| Ctrl + d | delete project | | <C-d> | delete project |
| Ctrl + v | rename project | | <C-v> | rename project |
| Ctrl + a | create project | | <C-a> | create project |
| Ctrl + s | search files in project | | <C-s> | search files in project |
| Ctrl + b | browse files in project | | <C-b> | browse files in project |
| Ctrl + l | change directory to project | | <C-l> | change directory to project |
| Ctrl + r | recently opened files in project | | <C-r> | recently opened files in project |
| Ctrl + f | find file within project | | <C-f> | find file within project |
</td> </tr> </table> </td> </tr> </table>
## toggletrouble ## toggletrouble
| key | Description | | key | Description |
| -------- | ------------------------- | | ---------- | ------------------------- |
| Ctrl + f | show errors and warnings | | <leader>t | show errors and warnings |
## cmp ## cmp
Note, these require the cmp list view to be open to do anything! Note, these require the cmp list view to be open to do anything!
| key | Description | | key | Description |
| ----------- | --------------------------------------------------------- | | ----------- | --------------------------------------------------------- |
| Ctrl + b | scroll docs up | | <C-b> | scroll docs up |
| Ctrl + f | scroll docs down | | <C-f> | scroll docs down |
| Ctrl + e | cancel cmp | | <C-e> | cancel cmp |
| Enter | write selected suggestion (does nothing if not selected) | | Enter | write selected suggestion (does nothing if not selected) |
| Tab |scroll down through suggestion list | | Tab |scroll down through suggestion list |
| Shift + Tab | scroll up 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 ## LSP
| key | Description | | key | Description |
| ------------ | ---------------------- | | ------------ | ---------------------- |
| Leader + ca | go to declaration | | <leader>ca | go to definition |
| Leader + cs | go to definition | | <leader>ca | go to declaration |
| Leader + cd | go to type definitions | | <leader>cs | find references |
| Leader + cf | go to references | | <leader>cd | go to type definition |
| Leader + cq | fix code action | | <leader>cf | go to implementation |
| Leader + cQ | refactor code action | | <leader>cq | fix code action |
| Leader + cw | signature help | | <leader>cQ | refactor code action |
| Leader + ce | hover | | <leader>cw | signature help |
| Leader + cr | rename | | <leader>ce | hover |
| <leader>cr | rename |
## snippets ## snippets
These require you to be inside a snippet! These require you to be inside a snippet!
| key | Description | | key | Description |
| -------- | ------------------------- | | -------- | ------------------------- |
| Ctrl + j | jump to next entry | | <C-j> | jump to next entry |
| Ctrl + k | jump to previous entry | | <C-k> | jump to previous entry |
## Leap ## Leap
| key | Description | | key | Description |

View file

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

View file

@ -52,9 +52,6 @@ return {
"typ", "typ",
}, },
}, },
gopls = {
staticcheck = true,
},
sqlls = {}, sqlls = {},
taplo = {}, taplo = {},
lemminx = {}, 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",
},
},
},
} }