mirror of
https://oauth2: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@github.com/m1ngsama/chopsticks.git
synced 2026-05-10 19:10:59 +08:00
feat: restore previm markdown preview (lazy-loaded, ,mp)
This commit is contained in:
parent
f8d45472dc
commit
0e92e6c1a8
4 changed files with 14 additions and 0 deletions
|
|
@ -87,6 +87,7 @@ Ctrl+h/j/k/l splits + tmux panes
|
|||
## Markdown
|
||||
|
||||
```
|
||||
,mp preview in browser
|
||||
,mt table of contents
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,16 @@ if exists('g:plugs["vim-markdown"]')
|
|||
nnoremap <leader>mt :Toc<CR>
|
||||
endif
|
||||
|
||||
if has('macunix')
|
||||
let g:previm_open_cmd = '/usr/bin/open'
|
||||
elseif executable('xdg-open')
|
||||
let g:previm_open_cmd = 'xdg-open'
|
||||
endif
|
||||
let g:previm_enable_realtime = 1
|
||||
if exists('g:plugs["previm"]')
|
||||
nnoremap <leader>mp :PrevimOpen<CR>
|
||||
endif
|
||||
|
||||
" ── vim-go (syntax only — vim-lsp handles intelligence) ─────────────────────
|
||||
|
||||
let g:go_gopls_enabled = 0
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ Plug 'prabirshrestha/asyncomplete-lsp.vim'
|
|||
Plug 'pangloss/vim-javascript', { 'for': ['javascript', 'javascript.jsx'] }
|
||||
Plug 'HerringtonDarkholme/yats.vim', { 'for': ['typescript', 'typescript.tsx'] }
|
||||
Plug 'preservim/vim-markdown', { 'for': 'markdown' }
|
||||
Plug 'previm/previm', { 'on': 'PrevimOpen' }
|
||||
Plug 'fatih/vim-go', { 'for': 'go' }
|
||||
|
||||
" ── UI ───────────────────────────────────────────────────────────────────────
|
||||
|
|
|
|||
|
|
@ -155,6 +155,8 @@ function! s:CheatSheet() abort
|
|||
\ ' ,f format',
|
||||
\ ' ,o outline',
|
||||
\ ' ,cr run file',
|
||||
\ ' ,mp markdown preview',
|
||||
\ ' ,mt table of contents',
|
||||
\ ' [g ]g LSP diagnostics',
|
||||
\ ' [e ]e ALE errors',
|
||||
\ '',
|
||||
|
|
|
|||
Loading…
Reference in a new issue