diff options
Diffstat (limited to 'nvim')
| -rw-r--r-- | nvim/lua/config/options.lua | 3 | ||||
| -rw-r--r-- | nvim/lua/config/statusline.lua | 11 |
2 files changed, 10 insertions, 4 deletions
diff --git a/nvim/lua/config/options.lua b/nvim/lua/config/options.lua index 409c620..7d6a2fb 100644 --- a/nvim/lua/config/options.lua +++ b/nvim/lua/config/options.lua | |||
| @@ -72,9 +72,6 @@ opt.completeopt = { "longest", "menuone", "noselect", "popup" } | |||
| 72 | opt.makeprg = "gmake" | 72 | opt.makeprg = "gmake" |
| 73 | opt.autowrite = true | 73 | opt.autowrite = true |
| 74 | 74 | ||
| 75 | -- Guifont | ||
| 76 | opt.guifont = "JetBrains Mono Semibold:h12" | ||
| 77 | |||
| 78 | -- Swap files und Undo | 75 | -- Swap files und Undo |
| 79 | opt.swapfile = false | 76 | opt.swapfile = false |
| 80 | opt.undofile = true | 77 | opt.undofile = true |
diff --git a/nvim/lua/config/statusline.lua b/nvim/lua/config/statusline.lua index 0ec6579..8a9c75a 100644 --- a/nvim/lua/config/statusline.lua +++ b/nvim/lua/config/statusline.lua | |||
| @@ -20,6 +20,10 @@ end | |||
| 20 | -- Git branch (buffer-lokal, gecached, kein redraw-spam) | 20 | -- Git branch (buffer-lokal, gecached, kein redraw-spam) |
| 21 | ---------------------------------------------------------------------- | 21 | ---------------------------------------------------------------------- |
| 22 | 22 | ||
| 23 | -- /dev/null gibt es unter Windows nicht (cmd.exe versteht das nicht als | ||
| 24 | -- Pfad und meldet "Das System kann den angegebenen Pfad nicht finden"). | ||
| 25 | local devnull = vim.fn.has("win32") == 1 and "NUL" or "/dev/null" | ||
| 26 | |||
| 23 | local function update_git_branch(bufnr) | 27 | local function update_git_branch(bufnr) |
| 24 | bufnr = bufnr or 0 | 28 | bufnr = bufnr or 0 |
| 25 | 29 | ||
| @@ -35,7 +39,12 @@ local function update_git_branch(bufnr) | |||
| 35 | return | 39 | return |
| 36 | end | 40 | end |
| 37 | 41 | ||
| 38 | local branch = vim.fn.systemlist("git rev-parse --abbrev-ref HEAD 2>/dev/null")[1] | 42 | local branch = vim.fn.systemlist("git rev-parse --abbrev-ref HEAD 2>" .. devnull)[1] |
| 43 | if branch then | ||
| 44 | -- unter Windows bleibt an systemlist()-Zeilen mitunter ein | ||
| 45 | -- trailing \r haengen (^M in der Statuszeile sichtbar) | ||
| 46 | branch = branch:gsub("\r$", "") | ||
| 47 | end | ||
| 39 | 48 | ||
| 40 | if branch and branch ~= "" then | 49 | if branch and branch ~= "" then |
| 41 | vim.b[bufnr].git_branch = " " .. branch .. " " | 50 | vim.b[bufnr].git_branch = " " .. branch .. " " |
