Merge pull request #141 from remcohaszing/support-document-symbol-detail

Add support for document symbol details
This commit is contained in:
Remco Haszing 2021-11-23 14:51:32 +01:00 committed by GitHub
commit af88581fbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -184,6 +184,7 @@ ed.onDidChangeCursorPosition(async (event) => {
breadcrumb.setAttribute('role', 'button');
breadcrumb.classList.add('breadcrumb');
breadcrumb.textContent = symbol.name;
breadcrumb.title = symbol.detail;
if (symbol.kind === languages.SymbolKind.Array) {
breadcrumb.classList.add('array');
} else if (symbol.kind === languages.SymbolKind.Module) {

View file

@ -341,7 +341,7 @@ function toSymbolKind(kind: ls.SymbolKind): languages.SymbolKind {
function toDocumentSymbol(item: ls.DocumentSymbol): languages.DocumentSymbol {
return {
detail: '',
detail: item.detail || '',
range: toRange(item.range),
name: item.name,
kind: toSymbolKind(item.kind),