diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-09-08 15:55:38 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-09-08 15:55:38 +0200 |
| commit | 58a46e8bc244a4415d20eff129cd69852f347b74 (patch) | |
| tree | 7f2088f92c43c0ccdf4b4e9aacaa9dc9de13e769 /nvim/lua/config/statusline.lua | |
| parent | bfd52b3195e8025b4a9b2116d4973c2850658ec3 (diff) | |
| download | dotfiles-58a46e8bc244a4415d20eff129cd69852f347b74.tar.gz dotfiles-58a46e8bc244a4415d20eff129cd69852f347b74.tar.bz2 dotfiles-58a46e8bc244a4415d20eff129cd69852f347b74.zip | |
cleanup
Diffstat (limited to 'nvim/lua/config/statusline.lua')
| -rw-r--r-- | nvim/lua/config/statusline.lua | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/nvim/lua/config/statusline.lua b/nvim/lua/config/statusline.lua index 01339d0..99a2ad5 100644 --- a/nvim/lua/config/statusline.lua +++ b/nvim/lua/config/statusline.lua | |||
| @@ -46,19 +46,6 @@ local function git_diff() | |||
| 46 | return "" | 46 | return "" |
| 47 | end | 47 | end |
| 48 | 48 | ||
| 49 | ---------------------------------------------------------------------- | ||
| 50 | -- Dateiname mit Modifikationsstatus | ||
| 51 | ---------------------------------------------------------------------- | ||
| 52 | |||
| 53 | local function filename() | ||
| 54 | local name = vim.fn.expand("%:.") | ||
| 55 | if name == "" then name = "[No Name]" end | ||
| 56 | |||
| 57 | if vim.bo.modified then name = name .. " [+]" end | ||
| 58 | |||
| 59 | return " " .. name .. " " | ||
| 60 | end | ||
| 61 | |||
| 62 | ------------------------------------------------------------------------ | 49 | ------------------------------------------------------------------------ |
| 63 | -- Treesitter-Aktivität (buffer-lokal, kein redraw-spam) | 50 | -- Treesitter-Aktivität (buffer-lokal, kein redraw-spam) |
| 64 | ------------------------------------------------------------------------ | 51 | ------------------------------------------------------------------------ |
| @@ -103,14 +90,6 @@ local function fileinfo() | |||
| 103 | return string.format(" %s %s ", ft, enc) | 90 | return string.format(" %s %s ", ft, enc) |
| 104 | end | 91 | end |
| 105 | 92 | ||
| 106 | ------------------------------------------------------------------------ | ||
| 107 | -- Cursor-Position (kein redraw-spam) | ||
| 108 | ------------------------------------------------------------------------ | ||
| 109 | |||
| 110 | local function position() | ||
| 111 | return string.format(" %d:%d ", vim.fn.line("."), vim.fn.col(".")) | ||
| 112 | end | ||
| 113 | |||
| 114 | ---------------------------------------------------------------------- | 93 | ---------------------------------------------------------------------- |
| 115 | -- Öffentliche Statusline-Funktion | 94 | -- Öffentliche Statusline-Funktion |
| 116 | ---------------------------------------------------------------------- | 95 | ---------------------------------------------------------------------- |
| @@ -123,7 +102,8 @@ function M.statusline() | |||
| 123 | git(), | 102 | git(), |
| 124 | git_diff(), | 103 | git_diff(), |
| 125 | "%#StatusLine#", | 104 | "%#StatusLine#", |
| 126 | filename(), | 105 | -- %f Dateiname, %m Modifikationsstatus; %(..%) faellt weg, wenn %m leer ist |
| 106 | " %f%( %m%) ", | ||
| 127 | 107 | ||
| 128 | "%=", | 108 | "%=", |
| 129 | 109 | ||
| @@ -132,7 +112,7 @@ function M.statusline() | |||
| 132 | treesitter(), | 112 | treesitter(), |
| 133 | fileinfo(), | 113 | fileinfo(), |
| 134 | " %p%% ", | 114 | " %p%% ", |
| 135 | position(), | 115 | " %l:%c ", |
| 136 | }) | 116 | }) |
| 137 | end | 117 | end |
| 138 | 118 | ||
