diff options
| author | Robert Günzler <r@gnzler.io> | 2022-06-15 04:46:55 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2022-06-15 04:46:55 +0200 |
| commit | d0c018dceb6d3056936c9cdfdd4e9e807cde0ff9 (patch) | |
| tree | 3f2904a39c12c74a7062a844c98410c3361b372d /.vim | |
| parent | ac19dca86b962f1f00a16d0e6688c8f692204926 (diff) | |
vim: use a global to configure floating window border
Diffstat (limited to '')
| -rw-r--r-- | .vim/lua/globals.lua | 1 | ||||
| -rw-r--r-- | .vim/lua/lsp.lua | 2 | ||||
| -rw-r--r-- | .vim/lua/plugins.lua | 5 |
3 files changed, 4 insertions, 4 deletions
diff --git a/.vim/lua/globals.lua b/.vim/lua/globals.lua index 5492b73..506ae0d 100644 --- a/.vim/lua/globals.lua +++ b/.vim/lua/globals.lua @@ -20,3 +20,4 @@ _G.wk_register = function(mappings, opts) vim.notify_once('which-key missing') end +_G.floating_win_border = 'none' diff --git a/.vim/lua/lsp.lua b/.vim/lua/lsp.lua index e134cff..d1da1b3 100644 --- a/.vim/lua/lsp.lua +++ b/.vim/lua/lsp.lua @@ -18,7 +18,7 @@ local my_attach = function(client, bufnr) vim.diagnostic.open_float(nil, { focusable = false, close_events = {'BufLeave', 'CursorMoved', 'InsertEnter', 'FocusLost'}, - border = 'single', + border = _G.floating_win_border, source = 'always', prefix = ' ', scope = 'cursor', diff --git a/.vim/lua/plugins.lua b/.vim/lua/plugins.lua index 28fd193..1ec5df0 100644 --- a/.vim/lua/plugins.lua +++ b/.vim/lua/plugins.lua @@ -106,7 +106,7 @@ require('packer').startup({function() linehl = false, word_diff = false, preview_config = { - border = { '', '', '', ' ', '', '', '', ' ' }, + border = _G.floating_win_border, }, on_attach = function(bufnr) @@ -450,8 +450,7 @@ require('packer').startup({function() preselect = cmp.PreselectMode.Item, window = { documentation = { - -- border = 'single', - border = { '', '', '', ' ', '', '', '', ' ' }, + border = _G.floating_win_border, }, }, mapping = { |