aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglepnir <glephunter@gmail.com>2024-04-28 23:15:10 +0800
committerGitHub <noreply@github.com>2024-04-28 10:15:10 -0500
commit83635e4e3db9a99c128e84e79deb590da354215d (patch)
treedc3922f6b610a8c739f81551f6eba8142ec4ecbf
parent26b5405d181e8c9e75c4b4ec9aae963cc25f285f (diff)
downloadrneovim-83635e4e3db9a99c128e84e79deb590da354215d.tar.gz
rneovim-83635e4e3db9a99c128e84e79deb590da354215d.tar.bz2
rneovim-83635e4e3db9a99c128e84e79deb590da354215d.zip
fix(diagnostic): get border from config (#28531)
Co-authored-by: Justin M. Keyes <justinkz@gmail.com> Co-authored-by: Gregory Anders <greg@gpanders.com>
-rw-r--r--runtime/doc/diagnostic.txt1
-rw-r--r--runtime/lua/vim/_defaults.lua2
-rw-r--r--runtime/lua/vim/diagnostic.lua2
3 files changed, 4 insertions, 1 deletions
diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt
index 32c9959f5a..b87de3e366 100644
--- a/runtime/doc/diagnostic.txt
+++ b/runtime/doc/diagnostic.txt
@@ -499,6 +499,7 @@ Lua module: vim.diagnostic *diagnostic-api*
diagnostic instead of prepending it. Overrides the
setting from |vim.diagnostic.config()|.
• {focus_id}? (`string`)
+ • {border}? (`string`) see |vim.api.nvim_open_win()|.
*vim.diagnostic.Opts.Signs*
diff --git a/runtime/lua/vim/_defaults.lua b/runtime/lua/vim/_defaults.lua
index 98dfbf3225..e9575c0e1e 100644
--- a/runtime/lua/vim/_defaults.lua
+++ b/runtime/lua/vim/_defaults.lua
@@ -190,7 +190,7 @@ do
})
vim.keymap.set('n', '<C-W>d', function()
- vim.diagnostic.open_float({ border = 'rounded' })
+ vim.diagnostic.open_float()
end, {
desc = 'Open a floating window showing diagnostics under the cursor',
})
diff --git a/runtime/lua/vim/diagnostic.lua b/runtime/lua/vim/diagnostic.lua
index 9f1e6448e6..1ed09b51a5 100644
--- a/runtime/lua/vim/diagnostic.lua
+++ b/runtime/lua/vim/diagnostic.lua
@@ -152,6 +152,8 @@ local M = {}
--- @field suffix? string|table|(fun(diagnostic:vim.Diagnostic,i:integer,total:integer): string, string)
---
--- @field focus_id? string
+---
+--- @field border? string see |vim.api.nvim_open_win()|.
--- @class vim.diagnostic.Opts.Underline
---