3 import autoload 'lsp/markdown.vim' as md
5 var bnr: number = bufnr()
7 var document: dict<list<any>>
10 popup_id = bnr->getbufinfo()[0].popups[0]
11 document = md.ParseMarkdown(bnr->getbufline(1, '$'), popup_id->winwidth())
13 b:markdown_fallback = v:true
17 b:lsp_syntax = document.syntax
18 md.list_pattern->setbufvar(bnr, '&formatlistpat')
19 var settings = 'linebreak breakindent breakindentopt=list:-1'
20 win_execute(popup_id, $'setlocal {settings}')
21 popup_id->popup_settext(document.content)
23 # vim: tabstop=8 shiftwidth=2 softtabstop=2