diff options
author | pommicket <pommicket@gmail.com> | 2023-01-03 23:50:50 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-01-03 23:50:50 -0500 |
commit | 3756a3e47221c3b0133724a482341a9010076a9e (patch) | |
tree | 7ad68fd0b76bd0e132fd86cd5044c3e08d581d22 /ide-definitions.c | |
parent | 4e73c6a204383667aad6ce3905e16aee2a172fb6 (diff) |
read workspace/symbols containerName
Diffstat (limited to 'ide-definitions.c')
-rw-r--r-- | ide-definitions.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ide-definitions.c b/ide-definitions.c index 67ac51d..1518515 100644 --- a/ide-definitions.c +++ b/ide-definitions.c @@ -206,8 +206,13 @@ void definitions_process_lsp_response(Ted *ted, LSP *lsp, const LSPResponse *res def->color = colors[color_for_symbol_kind(kind)]; def->from_lsp = true; def->position = lsp_location_start_position(symbol->location); - def->detail = a_sprintf("%s:%" PRIu32, - path_filename(lsp_document_path(lsp, def->position.document)), + const char *container_name = lsp_response_string(response, symbol->container); + const char *filename = path_filename(lsp_document_path(lsp, def->position.document)); + bool has_container = *container_name != 0; + def->detail = a_sprintf("%s%s%s:%" PRIu32, + container_name, + has_container ? ", " : "", + filename, def->position.pos.line + 1); } |