-
Notifications
You must be signed in to change notification settings - Fork 137
Man pages formatting fixed #162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for fixing this! Might be nice to DRY the code up a bit:
private async onCompletionResolve( item: LSP.CompletionItem, ): Promise<LSP.CompletionItem> { const { data: { name, type }, } = item const getMarkdownCompletionItem = (doc: string) => ({ ...item, documentation: { value: doc, kind: 'plaintext' as const } }) try { if (type === 'executable') { const doc = await this.executables.documentation(name) return getMarkdownCompletionItem(doc) } else if (type === 'builtin') { const doc = await Builtins.documentation(name) return getMarkdownCompletionItem(doc) } else { return item } } catch (error) { return item } }
Man pages syntax highlighting, also more DRY.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Thanks
Man pages syntax highlighting, also more DRY.
So how is this syntax highlighting generated? I don't see anything in the commit doing so.
Man pages syntax highlighting, also more DRY.
So how is this syntax highlighting generated? I don't see anything in the commit doing so.
It's a markdown code block
This fixes neoclide/coc.nvim#911
Now man pages are correctly formatted on
completionItem/resolve
Screenshot_20191210_210452