liuchengxu / vista.vim

:cactus: Viewer & Finder for LSP symbols and tags
https://liuchengxu.github.io/vista.vim
MIT License
1.88k stars 89 forks source link

Enhancement: Add border config to Nvim floating window preview #432

Closed SethBarberee closed 1 year ago

SethBarberee commented 2 years ago

Based on the nvim docs, a key for border should be sufficient. I prefer a rounded border on all my floating windows.

User config would look like: let g:vista_floating_border = 'rounded'

https://github.com/liuchengxu/vista.vim/blob/f9c8c8ad4135346a945e1ebfb00b723976d92dfc/autoload/vista/floating.vim#L139


"IDK how to add a user config value but the rest should work..
let border = 'none'  "default value from NVIM

  silent let s:floating_win_id = nvim_open_win(
        \ s:floating_bufnr, v:true, {
        \   'width': width,
        \   'height': height,
        \   'relative': 'cursor',
        \   'anchor': anchor,
        \   'row': row + 0.4,
        \   'col': col - 5,
        \   'focusable': v:false,
        \   'border': border
        \ })