aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2026-06-10 07:02:35 +0200
committerThomas Schmucker <ts@its1.de>2026-06-10 07:02:35 +0200
commit3729fd6bffa9edaa3d9c0b9e1486be2861a0dfe2 (patch)
treecbc6b6a56bed214b7efeb8e7eabb00acfde7ba22
parentfb8eb91fb404e8f8c9bcd6b201e18522e3200ac5 (diff)
parentcf47304c9f96b921ad12faf762574702e7fe562a (diff)
downloaddotfiles-3729fd6bffa9edaa3d9c0b9e1486be2861a0dfe2.tar.gz
dotfiles-3729fd6bffa9edaa3d9c0b9e1486be2861a0dfe2.tar.bz2
dotfiles-3729fd6bffa9edaa3d9c0b9e1486be2861a0dfe2.zip
Merge branch 'master' of ssh://raspi2:/srv/git/dotfiles
-rw-r--r--git/config3
-rw-r--r--nvim/lua/config/keymaps.lua20
-rw-r--r--nvim/lua/config/lazy.lua2
-rw-r--r--nvim/lua/config/options.lua2
-rw-r--r--nvim/lua/config/statusline.lua71
-rw-r--r--nvim/lua/config/treesitter.lua1
-rw-r--r--nvim/lua/plugins/editing.lua2
-rw-r--r--nvim/lua/plugins/format.lua12
-rw-r--r--zsh/zshrc6
9 files changed, 59 insertions, 60 deletions
diff --git a/git/config b/git/config
index 58c3f9f..1ea1370 100644
--- a/git/config
+++ b/git/config
@@ -29,6 +29,9 @@
29[diff] 29[diff]
30 colorMoved = default 30 colorMoved = default
31 31
32[http]
33 sslVerify = false
34
32[alias] 35[alias]
33 lg = log --color --graph --pretty=format:'%C(magenta)%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --branches 36 lg = log --color --graph --pretty=format:'%C(magenta)%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --branches
34 37
diff --git a/nvim/lua/config/keymaps.lua b/nvim/lua/config/keymaps.lua
index 558742d..b776697 100644
--- a/nvim/lua/config/keymaps.lua
+++ b/nvim/lua/config/keymaps.lua
@@ -28,17 +28,27 @@ function M.lsp(buffer, client)
28 vim.cmd("cwindow") 28 vim.cmd("cwindow")
29 end, opts) 29 end, opts)
30 30
31 map("n", "<F6>", function() run_in_terminal("gmake test") end, opts) 31 map("n", "<F6>", function()
32 run_in_terminal("gmake test")
33 end, opts)
32 end 34 end
33 35
34 local function set_python_bindings() 36 local function set_python_bindings()
35 map("n", "<F6>", function() run_in_terminal("pytest") end, opts) 37 map("n", "<F6>", function()
38 run_in_terminal("pytest")
39 end, opts)
36 end 40 end
37 41
38 local function set_npm_bindings() 42 local function set_npm_bindings()
39 map("n", "<F5>", function() run_in_terminal("npm run build") end, opts) 43 map("n", "<F5>", function()
40 map("n", "<F6>", function() run_in_terminal("npm test") end, opts) 44 run_in_terminal("npm run build")
41 map("n", "<F7>", function() run_in_terminal("npm start") end, opts) 45 end, opts)
46 map("n", "<F6>", function()
47 run_in_terminal("npm test")
48 end, opts)
49 map("n", "<F7>", function()
50 run_in_terminal("npm start")
51 end, opts)
42 end 52 end
43 53
44 if client then 54 if client then
diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua
index edf2fc7..2c0226c 100644
--- a/nvim/lua/config/lazy.lua
+++ b/nvim/lua/config/lazy.lua
@@ -7,7 +7,7 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
7 if vim.v.shell_error ~= 0 then 7 if vim.v.shell_error ~= 0 then
8 vim.api.nvim_echo({ 8 vim.api.nvim_echo({
9 { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, 9 { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
10 { out, "WarningMsg" }, 10 { out, "WarningMsg" },
11 { "\nPress any key to exit..." }, 11 { "\nPress any key to exit..." },
12 }, true, {}) 12 }, true, {})
13 vim.fn.getchar() 13 vim.fn.getchar()
diff --git a/nvim/lua/config/options.lua b/nvim/lua/config/options.lua
index 848966b..1adcee0 100644
--- a/nvim/lua/config/options.lua
+++ b/nvim/lua/config/options.lua
@@ -37,7 +37,7 @@ opt.listchars = {
37 trail = "-", 37 trail = "-",
38 extends = ">", 38 extends = ">",
39 precedes = "<", 39 precedes = "<",
40 nbsp = "+" 40 nbsp = "+",
41} 41}
42opt.showbreak = "↪ " 42opt.showbreak = "↪ "
43 43
diff --git a/nvim/lua/config/statusline.lua b/nvim/lua/config/statusline.lua
index 63c8ba8..fe27cd5 100644
--- a/nvim/lua/config/statusline.lua
+++ b/nvim/lua/config/statusline.lua
@@ -1,13 +1,13 @@
1local M = {} 1local M = {}
2 2
3local modes = { 3local modes = {
4 n = { "NORMAL", "StatuslineModeNormal" }, 4 n = { "NORMAL", "StatuslineModeNormal" },
5 i = { "INSERT", "StatuslineModeInsert" }, 5 i = { "INSERT", "StatuslineModeInsert" },
6 v = { "VISUAL", "StatuslineModeVisual" }, 6 v = { "VISUAL", "StatuslineModeVisual" },
7 V = { "V-LINE", "StatuslineModeVisual" }, 7 V = { "V-LINE", "StatuslineModeVisual" },
8 [""] = { "V-BLOCK", "StatuslineModeVisual" }, 8 [""] = { "V-BLOCK", "StatuslineModeVisual" },
9 R = { "REPLACE", "StatuslineModeReplace" }, 9 R = { "REPLACE", "StatuslineModeReplace" },
10 c = { "COMMAND", "StatuslineModeCommand" }, 10 c = { "COMMAND", "StatuslineModeCommand" },
11} 11}
12 12
13local function mode() 13local function mode()
@@ -35,9 +35,7 @@ local function update_git_branch(bufnr)
35 return 35 return
36 end 36 end
37 37
38 local branch = vim.fn.systemlist( 38 local branch = vim.fn.systemlist("git rev-parse --abbrev-ref HEAD 2>/dev/null")[1]
39 "git rev-parse --abbrev-ref HEAD 2>/dev/null"
40 )[1]
41 39
42 if branch and branch ~= "" then 40 if branch and branch ~= "" then
43 vim.b[bufnr].git_branch = "  " .. branch .. " " 41 vim.b[bufnr].git_branch = "  " .. branch .. " "
@@ -50,14 +48,11 @@ end
50-- Autocmd: Git nur bei Bedarf aktualisieren 48-- Autocmd: Git nur bei Bedarf aktualisieren
51---------------------------------------------------------------------- 49----------------------------------------------------------------------
52 50
53vim.api.nvim_create_autocmd( 51vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained" }, {
54 { "BufEnter", "FocusGained" }, 52 callback = function(args)
55 { 53 update_git_branch(args.buf)
56 callback = function(args) 54 end,
57 update_git_branch(args.buf) 55})
58 end,
59 }
60)
61 56
62---------------------------------------------------------------------- 57----------------------------------------------------------------------
63-- Statusline-Sektionen (reine Darstellung, keine IO) 58-- Statusline-Sektionen (reine Darstellung, keine IO)
@@ -80,9 +75,7 @@ local function git_diff()
80 if gsd.changed and gsd.changed > 0 then table.insert(parts, "~" .. gsd.changed) end 75 if gsd.changed and gsd.changed > 0 then table.insert(parts, "~" .. gsd.changed) end
81 if gsd.removed and gsd.removed > 0 then table.insert(parts, "-" .. gsd.removed) end 76 if gsd.removed and gsd.removed > 0 then table.insert(parts, "-" .. gsd.removed) end
82 77
83 if #parts > 0 then 78 if #parts > 0 then return " " .. table.concat(parts, " ") .. " " end
84 return " " .. table.concat(parts, " ") .. " "
85 end
86 79
87 return "" 80 return ""
88end 81end
@@ -93,13 +86,9 @@ end
93 86
94local function filename() 87local function filename()
95 local name = vim.fn.expand("%:.") 88 local name = vim.fn.expand("%:.")
96 if name == "" then 89 if name == "" then name = "[No Name]" end
97 name = "[No Name]"
98 end
99 90
100 if vim.bo.modified then 91 if vim.bo.modified then name = name .. " [+]" end
101 name = name .. " [+]"
102 end
103 92
104 return " " .. name .. " " 93 return " " .. name .. " "
105end 94end
@@ -110,9 +99,7 @@ end
110 99
111local function treesitter() 100local function treesitter()
112 local ok = vim.treesitter.highlighter.active[vim.api.nvim_get_current_buf()] 101 local ok = vim.treesitter.highlighter.active[vim.api.nvim_get_current_buf()]
113 if ok then 102 if ok then return " 🌳 " end
114 return " 🌳 "
115 end
116 return "" 103 return ""
117end 104end
118 105
@@ -123,9 +110,9 @@ end
123local function diagnostics() 110local function diagnostics()
124 local counts = { 111 local counts = {
125 error = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR }), 112 error = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR }),
126 warn = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN }), 113 warn = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN }),
127 info = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.INFO }), 114 info = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.INFO }),
128 hint = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT }), 115 hint = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT }),
129 } 116 }
130 117
131 local parts = {} 118 local parts = {}
@@ -135,9 +122,7 @@ local function diagnostics()
135 if counts.info > 0 then table.insert(parts, "  " .. counts.info) end 122 if counts.info > 0 then table.insert(parts, "  " .. counts.info) end
136 if counts.hint > 0 then table.insert(parts, "  " .. counts.hint) end 123 if counts.hint > 0 then table.insert(parts, "  " .. counts.hint) end
137 124
138 if #parts > 0 then 125 if #parts > 0 then return " " .. table.concat(parts, " ") .. " " end
139 return " " .. table.concat(parts, " ") .. " "
140 end
141 126
142 return "" 127 return ""
143end 128end
@@ -165,21 +150,13 @@ end
165------------------------------------------------------------------------- 150-------------------------------------------------------------------------
166 151
167local function copilot() 152local function copilot()
168 if vim.fn.exists("*copilot#Enabled") == 0 then 153 if vim.fn.exists("*copilot#Enabled") == 0 then return "" end
169 return ""
170 end
171 154
172 if vim.fn["copilot#Enabled"]() == 0 then 155 if vim.fn["copilot#Enabled"]() == 0 then return "  OFF " end
173 return "  OFF "
174 end
175 156
176 if vim.b.copilot_suggestion and vim.b.copilot_suggestion.is_visible then 157 if vim.b.copilot_suggestion and vim.b.copilot_suggestion.is_visible then return "  SUG " end
177 return "  SUG "
178 end
179 158
180 if vim.b.copilot_suggestion_auto_trigger == false then 159 if vim.b.copilot_suggestion_auto_trigger == false then return "  MAN " end
181 return "  MAN "
182 end
183 160
184 return "  ON " 161 return "  ON "
185end 162end
diff --git a/nvim/lua/config/treesitter.lua b/nvim/lua/config/treesitter.lua
index fe4b261..6903914 100644
--- a/nvim/lua/config/treesitter.lua
+++ b/nvim/lua/config/treesitter.lua
@@ -19,6 +19,7 @@ M.languages = {
19 "typescript", 19 "typescript",
20 "vim", 20 "vim",
21 "vimdoc", 21 "vimdoc",
22 "xml",
22 "yaml", 23 "yaml",
23 "zsh", 24 "zsh",
24} 25}
diff --git a/nvim/lua/plugins/editing.lua b/nvim/lua/plugins/editing.lua
index d1c3447..d2acd8e 100644
--- a/nvim/lua/plugins/editing.lua
+++ b/nvim/lua/plugins/editing.lua
@@ -20,6 +20,6 @@ return {
20 20
21 { 21 {
22 "preservim/vim-markdown", 22 "preservim/vim-markdown",
23 ft = "markdown" 23 ft = "markdown",
24 }, 24 },
25} 25}
diff --git a/nvim/lua/plugins/format.lua b/nvim/lua/plugins/format.lua
index b8b0256..9334465 100644
--- a/nvim/lua/plugins/format.lua
+++ b/nvim/lua/plugins/format.lua
@@ -5,18 +5,17 @@ return {
5 { 5 {
6 "<leader>cf", 6 "<leader>cf",
7 function() 7 function()
8 require("conform").format({ 8 require("conform").format({ async = true })
9 async = true,
10 lsp_fallback = true,
11 })
12 end, 9 end,
13 desc = "Format file", 10 desc = "Format file",
14 }, 11 },
15 }, 12 },
16 opts = { 13 opts = {
17 formatters_by_ft = { 14 formatters_by_ft = {
15 awk = { "gawk" }, -- pkg install gawk
18 bash = { "shfmt" }, 16 bash = { "shfmt" },
19 -- cpp = { "clang_format" }, 17 c = {}, -- clangd
18 cpp = {}, -- clangd
20 javascript = { "prettier" }, 19 javascript = { "prettier" },
21 json = { "jq" }, -- brew install jq, pkg install jq 20 json = { "jq" }, -- brew install jq, pkg install jq
22 lua = { "stylua" }, -- brew install stylua, pkg install stylua 21 lua = { "stylua" }, -- brew install stylua, pkg install stylua
@@ -27,6 +26,9 @@ return {
27 xsd = { "xmllint" }, 26 xsd = { "xmllint" },
28 yaml = { "yamlfmt" }, -- brew install yamlfmt, pkg install yamlfmt 27 yaml = { "yamlfmt" }, -- brew install yamlfmt, pkg install yamlfmt
29 }, 28 },
29 default_format_opts = {
30 lsp_format = "fallback",
31 },
30 }, 32 },
31 33
32 config = function(_, opts) 34 config = function(_, opts)
diff --git a/zsh/zshrc b/zsh/zshrc
index 7d8a754..53fb25a 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -29,6 +29,7 @@ setopt HIST_SAVE_NO_DUPS
29setopt INC_APPEND_HISTORY 29setopt INC_APPEND_HISTORY
30setopt SHARE_HISTORY 30setopt SHARE_HISTORY
31setopt HIST_IGNORE_ALL_DUPS 31setopt HIST_IGNORE_ALL_DUPS
32setopt HIST_IGNORE_SPACE
32 33
33source_file "$HOME/.opam/opam-init/init.zsh" 34source_file "$HOME/.opam/opam-init/init.zsh"
34 35
@@ -43,6 +44,11 @@ case "$OSTYPE" in
43 ;; 44 ;;
44esac 45esac
45 46
47if (( ${+ZSH_HIGHLIGHT_STYLES} )); then
48 ZSH_HIGHLIGHT_STYLES[path]='none'
49 ZSH_HIGHLIGHT_STYLES[path_prefix]='none'
50fi
51
46bindkey -v 52bindkey -v
47export KEYTIMEOUT=1 53export KEYTIMEOUT=1
48 54