diff options
| author | Thomas Schmucker <ts@its1.de> | 2026-09-08 16:01:54 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2026-09-08 16:01:54 +0200 |
| commit | 195dbd2a119f970b31d713d29531d61a0cf5f131 (patch) | |
| tree | 6033d83706a464e23bdb57a37258b971b2758945 /nvim | |
| parent | 58a46e8bc244a4415d20eff129cd69852f347b74 (diff) | |
| download | dotfiles-195dbd2a119f970b31d713d29531d61a0cf5f131.tar.gz dotfiles-195dbd2a119f970b31d713d29531d61a0cf5f131.tar.bz2 dotfiles-195dbd2a119f970b31d713d29531d61a0cf5f131.zip | |
Zeige die LSP Server in der Statuszeile an
Diffstat (limited to 'nvim')
| -rw-r--r-- | nvim/lua/config/statusline.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/nvim/lua/config/statusline.lua b/nvim/lua/config/statusline.lua index 99a2ad5..ef6f315 100644 --- a/nvim/lua/config/statusline.lua +++ b/nvim/lua/config/statusline.lua | |||
| @@ -57,6 +57,23 @@ local function treesitter() | |||
| 57 | end | 57 | end |
| 58 | 58 | ||
| 59 | ------------------------------------------------------------------------ | 59 | ------------------------------------------------------------------------ |
| 60 | -- LSP-Clients des Buffers | ||
| 61 | ------------------------------------------------------------------------ | ||
| 62 | |||
| 63 | local function lsp() | ||
| 64 | local clients = vim.lsp.get_clients({ bufnr = 0 }) | ||
| 65 | |||
| 66 | if #clients == 0 then return "" end | ||
| 67 | |||
| 68 | local names = {} | ||
| 69 | for _, client in ipairs(clients) do | ||
| 70 | table.insert(names, client.name) | ||
| 71 | end | ||
| 72 | |||
| 73 | return " " .. table.concat(names, ", ") .. " " | ||
| 74 | end | ||
| 75 | |||
| 76 | ------------------------------------------------------------------------ | ||
| 60 | -- Diagnostik-Counts (buffer-lokal, kein redraw-spam) | 77 | -- Diagnostik-Counts (buffer-lokal, kein redraw-spam) |
| 61 | ------------------------------------------------------------------------ | 78 | ------------------------------------------------------------------------ |
| 62 | 79 | ||
| @@ -109,6 +126,7 @@ function M.statusline() | |||
| 109 | 126 | ||
| 110 | -- RIGHT: Feedback & Meta | 127 | -- RIGHT: Feedback & Meta |
| 111 | diagnostics(), | 128 | diagnostics(), |
| 129 | lsp(), | ||
| 112 | treesitter(), | 130 | treesitter(), |
| 113 | fileinfo(), | 131 | fileinfo(), |
| 114 | " %p%% ", | 132 | " %p%% ", |
