diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-01-16 10:35:58 +0100 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-01-16 10:35:58 +0100 |
| commit | 74d64eb80b81ef2fa8aeb1abbd36af2e6fc86819 (patch) | |
| tree | a7f064bc35a8b25871a782c2461d9eb196923edf /nvim/lua/config/keymaps.lua | |
| parent | ddd9176e4608e1e34f0befe1315adae515672c2e (diff) | |
| download | dotfiles-74d64eb80b81ef2fa8aeb1abbd36af2e6fc86819.tar.gz dotfiles-74d64eb80b81ef2fa8aeb1abbd36af2e6fc86819.tar.bz2 dotfiles-74d64eb80b81ef2fa8aeb1abbd36af2e6fc86819.zip | |
neovim: reformat code, keybindings für pytest, und spell=false
Diffstat (limited to 'nvim/lua/config/keymaps.lua')
| -rw-r--r-- | nvim/lua/config/keymaps.lua | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/nvim/lua/config/keymaps.lua b/nvim/lua/config/keymaps.lua index a665e82..4b280ef 100644 --- a/nvim/lua/config/keymaps.lua +++ b/nvim/lua/config/keymaps.lua | |||
| @@ -22,9 +22,24 @@ function M.lsp(buffer, client) | |||
| 22 | }) | 22 | }) |
| 23 | end, opts) | 23 | end, opts) |
| 24 | 24 | ||
| 25 | if client and client.name == "clangd" then | 25 | local function set_c_bindings() |
| 26 | map("n", "<leader>hs", "<cmd>ClangdSwitchSourceHeader<cr>", opts) | 26 | if client and client.name == "clangd" then map("n", "<leader>hs", "<cmd>ClangdSwitchSourceHeader<cr>", opts) end |
| 27 | end | 27 | end |
| 28 | |||
| 29 | local function set_python_bindings() | ||
| 30 | if client and (client.name == "basedpyright" or client.name == "pyright" or client.name == "pylsp") then | ||
| 31 | local function run_pytest() | ||
| 32 | vim.cmd("botright split | terminal pytest") | ||
| 33 | end | ||
| 34 | |||
| 35 | map("n", "<F6>", run_pytest, { | ||
| 36 | desc = "Run pytest (nur Python-Projekt)", | ||
| 37 | }) | ||
| 38 | end | ||
| 39 | end | ||
| 40 | |||
| 41 | set_c_bindings() | ||
| 42 | set_python_bindings() | ||
| 28 | end | 43 | end |
| 29 | 44 | ||
| 30 | function M.telescope() | 45 | function M.telescope() |
| @@ -110,14 +125,14 @@ function M.global() | |||
| 110 | map("n", "[e", function() | 125 | map("n", "[e", function() |
| 111 | vim.diagnostic.jump_prev({ | 126 | vim.diagnostic.jump_prev({ |
| 112 | severity = vim.diagnostic.severity.ERROR, | 127 | severity = vim.diagnostic.severity.ERROR, |
| 113 | wrap = false | 128 | wrap = false, |
| 114 | }) | 129 | }) |
| 115 | end, opts) | 130 | end, opts) |
| 116 | 131 | ||
| 117 | map("n", "]e", function() | 132 | map("n", "]e", function() |
| 118 | vim.diagnostic.jump_next({ | 133 | vim.diagnostic.jump_next({ |
| 119 | severity = vim.diagnostic.severity.ERROR, | 134 | severity = vim.diagnostic.severity.ERROR, |
| 120 | wrap = false | 135 | wrap = false, |
| 121 | }) | 136 | }) |
| 122 | end, opts) | 137 | end, opts) |
| 123 | end | 138 | end |
