Skip to content

Commit 752d76b

Browse files
Make neovim borders configurable.
1 parent f42768a commit 752d76b

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

doc/any-jump.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,7 @@ let g:any_jump_references_only_for_current_filetype = 0
137137

138138
" Disable search engine ignore vcs untracked files (default: false, search engine will ignore vcs untracked files)
139139
let g:any_jump_disable_vcs_ignore = 0
140+
141+
" Borders for neovim floating window, list of strings in this order
142+
" top left corner, top right corner, bottom left corner, bottom right corner, top/bottom, left/right
143+
let g:any_jump_neovim_border = ['╭', '╮','╰', '╯', '─', '│']

plugin/any-jump.vim

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ call s:set_plugin_global_option('any_jump_disable_vcs_ignore', v:false)
142142
" default is: ['*.tmp', '*.temp']
143143
call s:set_plugin_global_option('any_jump_ignored_files', ['*.tmp', '*.temp'])
144144

145+
call s:set_plugin_global_option('any_jump_neovim_border', ['', '','', '', '', ''])
146+
145147
" ----------------------------------------------
146148
" Public customization methods
147149
" ----------------------------------------------
@@ -213,9 +215,10 @@ fu! s:CreateNvimUi(internal_buffer) abort
213215
\ 'style': 'minimal',
214216
\ }
215217

216-
let top = '' . repeat('', width - 2) . ''
217-
let mid = '' . repeat(' ', width - 2) . ''
218-
let bot = '' . repeat('', width - 2) . ''
218+
let [topleft_b, topright_b, botleft_b, botright_b, horizontal_b, vertical_b] = g:any_jump_neovim_border
219+
let top = topleft_b . repeat(horizontal_b, width - 2) . topright_b
220+
let mid = vertical_b . repeat(' ', width - 2) . vertical_b
221+
let bot = botleft_b . repeat(horizontal_b, width - 2) . botright_b
219222
let lines = [top] + repeat([mid], height - 2) + [bot]
220223
let s:border_buf = nvim_create_buf(0, 1)
221224
call nvim_buf_set_lines(s:border_buf, 0, -1, v:true, lines)

0 commit comments

Comments
 (0)