summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-09-24 10:37:44 -0400
committerpommicket <pommicket@gmail.com>2023-09-24 10:37:44 -0400
commit523029fa2e77518903d139ffbd6cc3f792a6b85e (patch)
tree676a743eff1ae3015b3f359e57e74f79e4959a03
parent114c05577dc3306b7c416fb0cf02a431e48de952 (diff)
show LSP status, tabs vs spaces in title bar
-rw-r--r--node.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/node.c b/node.c
index 8f4e6ae..d7b021c 100644
--- a/node.c
+++ b/node.c
@@ -418,7 +418,14 @@ void node_frame(Ted *ted, Node *node, Rect r) {
// highlight active tab
gl_geometry_rect(tab_rect, settings_color(settings, is_active ? COLOR_ACTIVE_TAB_HL : COLOR_SELECTED_TAB_HL));
// set window title to active tab's title
- strbuf_printf(ted->window_title, "ted %s", tab_title);
+ strbuf_printf(ted->window_title, "ted %s | %s", tab_title,
+ settings->indent_with_spaces ? "spaces" : "tabs");
+ if (*settings->lsp) {
+ LSP *lsp = buffer_lsp(buffer);
+ strbuf_catf(ted->window_title, " | LSP %s",
+ lsp && lsp_is_initialized(lsp) && !lsp_has_exited(lsp)
+ ? "UP" : "DOWN");
+ }
}
}