mirror of
https://github.com/danbulant/monaco-yaml
synced 2026-05-24 12:21:53 +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.setAttribute('role', 'button');
|
||||||
breadcrumb.classList.add('breadcrumb');
|
breadcrumb.classList.add('breadcrumb');
|
||||||
breadcrumb.textContent = symbol.name;
|
breadcrumb.textContent = symbol.name;
|
||||||
|
breadcrumb.title = symbol.detail;
|
||||||
if (symbol.kind === languages.SymbolKind.Array) {
|
if (symbol.kind === languages.SymbolKind.Array) {
|
||||||
breadcrumb.classList.add('array');
|
breadcrumb.classList.add('array');
|
||||||
} else if (symbol.kind === languages.SymbolKind.Module) {
|
} 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 {
|
function toDocumentSymbol(item: ls.DocumentSymbol): languages.DocumentSymbol {
|
||||||
return {
|
return {
|
||||||
detail: '',
|
detail: item.detail || '',
|
||||||
range: toRange(item.range),
|
range: toRange(item.range),
|
||||||
name: item.name,
|
name: item.name,
|
||||||
kind: toSymbolKind(item.kind),
|
kind: toSymbolKind(item.kind),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue