diff options
-rw-r--r-- | ide-definitions.c | 8 | ||||
-rw-r--r-- | main.c | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ide-definitions.c b/ide-definitions.c index 7175e08..185a270 100644 --- a/ide-definitions.c +++ b/ide-definitions.c @@ -113,7 +113,13 @@ static int definition_entry_qsort_cmp(const void *av, const void *bv) { if (a_len < b_len) return -1; if (a_len > b_len) return 1; // then sort alphabetically - return strcmp(a->name, b->name); + int cmp = strcmp(a->name, b->name); + if (cmp) return cmp; + // then sort by detail + if (!a->detail && b->detail) return -1; + if (a->detail && !b->detail) return 1; + if (!a->detail && !b->detail) return 0; + return strcmp(a->detail, b->detail); } // put the entries matching the search term into the selector. @@ -2,6 +2,7 @@ @TODO: - fix problem where LSP_REQUEST_DEFINITION tag isn't being found - ted.h documentation +- don't start up separate clangd servers for C and C++ - handle multiple symbols with same name in go-to-definition menu - better non-error window/showMessage(Request) - document lsp.h and lsp.c. |