diff options
author | glepnir <glephunter@gmail.com> | 2025-01-08 00:09:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-07 08:09:01 -0800 |
commit | b12b91c2743954dbe8599caa60e58e5d74aa4e76 (patch) | |
tree | 54c5a31e53e96fa15a2218e6133275796f08b076 /runtime/lua/vim/lsp/util.lua | |
parent | d9ee0d2984e5fc30cb032785d32f42c72c7e64e1 (diff) | |
download | rneovim-b12b91c2743954dbe8599caa60e58e5d74aa4e76.tar.gz rneovim-b12b91c2743954dbe8599caa60e58e5d74aa4e76.tar.bz2 rneovim-b12b91c2743954dbe8599caa60e58e5d74aa4e76.zip |
feat(health): show :checkhealth in floating window #31086
Problem: health can not shown in a floating window
Solution: add g:health variable
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r-- | runtime/lua/vim/lsp/util.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 89b774816b..5cccb3321f 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -875,11 +875,13 @@ function M.make_floating_popup_options(width, height, opts) return { anchor = anchor, + row = row + (opts.offset_y or 0), col = col + (opts.offset_x or 0), height = height, focusable = opts.focusable, - relative = opts.relative == 'mouse' and 'mouse' or 'cursor', - row = row + (opts.offset_y or 0), + relative = opts.relative == 'mouse' and 'mouse' + or opts.relative == 'editor' and 'editor' + or 'cursor', style = 'minimal', width = width, border = opts.border or default_border, @@ -1494,7 +1496,7 @@ end --- @field title_pos? 'left'|'center'|'right' --- --- (default: `'cursor'`) ---- @field relative? 'mouse'|'cursor' +--- @field relative? 'mouse'|'cursor'|'editor' --- --- - "auto": place window based on which side of the cursor has more lines --- - "above": place the window above the cursor unless there are not enough lines |