Xinqi Bao's Git

fix(tmux): improve prompts and key handling
[dotfiles.git] / .config / nvim / init.vim
index 4b7fb6c..0a5fc86 100644 (file)
@@ -38,6 +38,9 @@ set foldmethod=expr
 set foldexpr=0
 set foldlevelstart=99
 set foldlevel=99
+" Indent summaries one level past the retained first line, not a continuation.
+let &foldtext = 'repeat(" ", indent(v:foldstart - 1) + shiftwidth()) . printf("… %d lines …", v:foldend - v:foldstart + 1)'
+set fillchars+=fold:\  " Leave the rest of the summary line blank.
 
 " Interaction and persistence
 set mouse=a
@@ -221,6 +224,12 @@ if has_key(plugs, 'lazygit.nvim')
     nnoremap <silent> <leader>lg :LazyGit<CR>
 endif
 
+" Markdown
+if has_key(plugs, 'markdown-preview.nvim')
+    let g:mkdp_echo_preview_url = 1
+    let g:mkdp_open_to_the_world = 1
+endif
+
 " Optional
 if has_key(plugs, 'avante.nvim')
     lua require('plugin-config/avante')