diff --git a/src/components/note-editor.tsx b/src/components/note-editor.tsx index fe59659e..07b2627f 100644 --- a/src/components/note-editor.tsx +++ b/src/components/note-editor.tsx @@ -402,12 +402,12 @@ function useNoteCompletion() { } const options = searchResults.slice(0, 5).map((note): Completion => { + const linkText = note.linkAlias || note.displayName return { label: note.displayName, + detail: linkText !== note.displayName ? linkText : undefined, apply: (view, completion, from, to) => { - console.log(note) // Insert link to note - const linkText = note.linkAlias || note.displayName const text = `[[${note.id}|${linkText}]]` const hasClosingBrackets = view.state.sliceDoc(to, to + 2) === "]]" diff --git a/src/styles/codemirror.css b/src/styles/codemirror.css index 39e8c69e..bfc4eefa 100644 --- a/src/styles/codemirror.css +++ b/src/styles/codemirror.css @@ -76,7 +76,7 @@ } .cm-editor .cm-tooltip.cm-tooltip-autocomplete > ul > li .cm-completionDetail { - @apply ml-2 not-italic text-text-secondary; + @apply ml-3 italic text-text-secondary; } .cm-editor .cm-completionMatchedText {