fix(diagnostic): get border from config (#28531)

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
This commit is contained in:
glepnir 2024-04-28 23:15:10 +08:00 committed by GitHub
parent 26b5405d18
commit 83635e4e3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 1 deletions

View File

@ -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*

View File

@ -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',
})

View File

@ -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
---