mirror of
https://github.com/danbulant/monaco-yaml
synced 2026-05-19 04:08:48 +00:00
Merge pull request #141 from remcohaszing/support-document-symbol-detail
Add support for document symbol details
This commit is contained in:
commit
af88581fbb
2 changed files with 2 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Reference in a new issue