diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-09-08 11:34:38 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-09-08 11:34:38 +0200 |
| commit | 40dd55d2fe0d927307ddf1b43b972fb53084e2be (patch) | |
| tree | bd5ac4ae93a36be2b86cff4db4346b1c7f267ca6 /nvim | |
| parent | 9c76122ad53cd6b2846e7349a11729ee2dbaa435 (diff) | |
| download | dotfiles-40dd55d2fe0d927307ddf1b43b972fb53084e2be.tar.gz dotfiles-40dd55d2fe0d927307ddf1b43b972fb53084e2be.tar.bz2 dotfiles-40dd55d2fe0d927307ddf1b43b972fb53084e2be.zip | |
Funktionsnamen für die Keymappings angepasst
Diffstat (limited to 'nvim')
| -rw-r--r-- | nvim/init.lua | 5 | ||||
| -rw-r--r-- | nvim/lua/config/autocmds.lua | 4 | ||||
| -rw-r--r-- | nvim/lua/config/keymaps.lua | 6 | ||||
| -rw-r--r-- | nvim/lua/plugins/git.lua | 2 | ||||
| -rw-r--r-- | nvim/lua/plugins/ui.lua | 30 |
5 files changed, 22 insertions, 25 deletions
diff --git a/nvim/init.lua b/nvim/init.lua index e65fc06..29c0e40 100644 --- a/nvim/init.lua +++ b/nvim/init.lua | |||
| @@ -1,10 +1,7 @@ | |||
| 1 | require("config.options") | 1 | require("config.options") |
| 2 | require("config.filetypes") | 2 | require("config.filetypes") |
| 3 | require("config.treesitter").register_extra_filetypes() | 3 | require("config.treesitter").register_extra_filetypes() |
| 4 | 4 | require("config.keymaps").set_global() | |
| 5 | local keymaps = require("config.keymaps") | ||
| 6 | keymaps.global() | ||
| 7 | |||
| 8 | require("config.autocmds") | 5 | require("config.autocmds") |
| 9 | require("config.usercmds") | 6 | require("config.usercmds") |
| 10 | require("config.lazy") | 7 | require("config.lazy") |
diff --git a/nvim/lua/config/autocmds.lua b/nvim/lua/config/autocmds.lua index 88a8c6c..2cca1df 100644 --- a/nvim/lua/config/autocmds.lua +++ b/nvim/lua/config/autocmds.lua | |||
| @@ -35,7 +35,7 @@ vim.api.nvim_create_autocmd("QuitPre", { | |||
| 35 | vim.api.nvim_create_autocmd("LspAttach", { | 35 | vim.api.nvim_create_autocmd("LspAttach", { |
| 36 | callback = function(event) | 36 | callback = function(event) |
| 37 | local client = vim.lsp.get_client_by_id(event.data.client_id) | 37 | local client = vim.lsp.get_client_by_id(event.data.client_id) |
| 38 | local keymaps = require("config.keymaps") | 38 | |
| 39 | keymaps.lsp(event.buf, client) | 39 | require("config.keymaps").set_lsp(event.buf, client) |
| 40 | end, | 40 | end, |
| 41 | }) | 41 | }) |
diff --git a/nvim/lua/config/keymaps.lua b/nvim/lua/config/keymaps.lua index 9896a57..2088995 100644 --- a/nvim/lua/config/keymaps.lua +++ b/nvim/lua/config/keymaps.lua | |||
| @@ -2,7 +2,7 @@ local M = {} | |||
| 2 | 2 | ||
| 3 | local map = vim.keymap.set | 3 | local map = vim.keymap.set |
| 4 | 4 | ||
| 5 | function M.lsp(buffer, client) | 5 | function M.set_lsp(buffer, client) |
| 6 | local opts = { | 6 | local opts = { |
| 7 | buffer = buffer, | 7 | buffer = buffer, |
| 8 | silent = true, | 8 | silent = true, |
| @@ -62,11 +62,11 @@ function M.lsp(buffer, client) | |||
| 62 | end | 62 | end |
| 63 | end | 63 | end |
| 64 | 64 | ||
| 65 | function M.gitsigns() | 65 | function M.set_gitsigns() |
| 66 | map("n", "<leader>tb", require("gitsigns").toggle_current_line_blame) | 66 | map("n", "<leader>tb", require("gitsigns").toggle_current_line_blame) |
| 67 | end | 67 | end |
| 68 | 68 | ||
| 69 | function M.global() | 69 | function M.set_global() |
| 70 | local opts = { | 70 | local opts = { |
| 71 | silent = true, | 71 | silent = true, |
| 72 | } | 72 | } |
diff --git a/nvim/lua/plugins/git.lua b/nvim/lua/plugins/git.lua index ed7bafe..b865864 100644 --- a/nvim/lua/plugins/git.lua +++ b/nvim/lua/plugins/git.lua | |||
| @@ -10,7 +10,7 @@ return { | |||
| 10 | }, | 10 | }, |
| 11 | config = function(_, opts) | 11 | config = function(_, opts) |
| 12 | require("gitsigns").setup(opts) | 12 | require("gitsigns").setup(opts) |
| 13 | require("config.keymaps").gitsigns() | 13 | require("config.keymaps").set_gitsigns() |
| 14 | end, | 14 | end, |
| 15 | }, | 15 | }, |
| 16 | } | 16 | } |
diff --git a/nvim/lua/plugins/ui.lua b/nvim/lua/plugins/ui.lua index 39a8e28..a308fc8 100644 --- a/nvim/lua/plugins/ui.lua +++ b/nvim/lua/plugins/ui.lua | |||
| @@ -17,27 +17,27 @@ return { | |||
| 17 | 17 | ||
| 18 | vscode.load() | 18 | vscode.load() |
| 19 | 19 | ||
| 20 | -- eigene Anpassungen an der vscode-Palette; muessen nach vscode.load() | 20 | -- eigene Anpassungen an der vscode-Palette |
| 21 | -- gesetzt werden, weil :colorscheme alle Highlight-Gruppen zuruecksetzt | 21 | local set_hl = vim.api.nvim_set_hl |
| 22 | 22 | ||
| 23 | -- Fix: Farbschema für Rechtschreibfehler | 23 | -- Fix: Farbschema für Rechtschreibfehler |
| 24 | vim.api.nvim_set_hl(0, "SpellBad", { fg = "#ffffff", bg = "#5f0000" }) | 24 | set_hl(0, "SpellBad", { fg = "#ffffff", bg = "#5f0000" }) |
| 25 | vim.api.nvim_set_hl(0, "SpellCap", { fg = "#000000", bg = "#ffaf00" }) | 25 | set_hl(0, "SpellCap", { fg = "#000000", bg = "#ffaf00" }) |
| 26 | vim.api.nvim_set_hl(0, "SpellRare", { fg = "#000000", bg = "#5fd7ff" }) | 26 | set_hl(0, "SpellRare", { fg = "#000000", bg = "#5fd7ff" }) |
| 27 | vim.api.nvim_set_hl(0, "SpellLocal", { fg = "#000000", bg = "#5fff87" }) | 27 | set_hl(0, "SpellLocal", { fg = "#000000", bg = "#5fff87" }) |
| 28 | vim.api.nvim_set_hl(0, "CursorLine", { bg = "#252526" }) | 28 | set_hl(0, "CursorLine", { bg = "#252526" }) |
| 29 | vim.api.nvim_set_hl(0, "CursorColumn", { bg = "#252526" }) | 29 | set_hl(0, "CursorColumn", { bg = "#252526" }) |
| 30 | 30 | ||
| 31 | -- Statusline Farben | 31 | -- Statusline Farben |
| 32 | vim.api.nvim_set_hl(0, "StatuslineModeNormal", { fg = "#1e222a", bg = "#61afef", bold = true }) | 32 | set_hl(0, "StatuslineModeNormal", { fg = "#1e222a", bg = "#61afef", bold = true }) |
| 33 | vim.api.nvim_set_hl(0, "StatuslineModeInsert", { fg = "#1e222a", bg = "#98c379", bold = true }) | 33 | set_hl(0, "StatuslineModeInsert", { fg = "#1e222a", bg = "#98c379", bold = true }) |
| 34 | vim.api.nvim_set_hl(0, "StatuslineModeVisual", { fg = "#1e222a", bg = "#c678dd", bold = true }) | 34 | set_hl(0, "StatuslineModeVisual", { fg = "#1e222a", bg = "#c678dd", bold = true }) |
| 35 | vim.api.nvim_set_hl(0, "StatuslineModeReplace", { fg = "#1e222a", bg = "#e86671", bold = true }) | 35 | set_hl(0, "StatuslineModeReplace", { fg = "#1e222a", bg = "#e86671", bold = true }) |
| 36 | vim.api.nvim_set_hl(0, "StatuslineModeCommand", { fg = "#1e222a", bg = "#e5c07b", bold = true }) | 36 | set_hl(0, "StatuslineModeCommand", { fg = "#1e222a", bg = "#e5c07b", bold = true }) |
| 37 | 37 | ||
| 38 | -- NVim-Tree | 38 | -- NVim-Tree |
| 39 | vim.api.nvim_set_hl(0, "NvimTreeOpenedFile", { bold = true }) | 39 | set_hl(0, "NvimTreeOpenedFile", { bold = true }) |
| 40 | vim.api.nvim_set_hl(0, "NvimTreeCursorLine", { bg = "#2A2D2E" }) | 40 | set_hl(0, "NvimTreeCursorLine", { bg = "#2A2D2E" }) |
| 41 | end, | 41 | end, |
| 42 | }, | 42 | }, |
| 43 | 43 | ||
