diff options
author | Raphael <glephunter@gmail.com> | 2022-11-21 18:06:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-21 11:06:14 +0100 |
commit | 2bb244af314e80afbab30b4db4490c8dae894b85 (patch) | |
tree | da1621b03df8efb1651a1f459268b008d5824416 /runtime/lua/vim/lsp/util.lua | |
parent | 126ef65e5b3ff0da68bfe166be0bb0a33664142b (diff) | |
download | rneovim-2bb244af314e80afbab30b4db4490c8dae894b85.tar.gz rneovim-2bb244af314e80afbab30b4db4490c8dae894b85.tar.bz2 rneovim-2bb244af314e80afbab30b4db4490c8dae894b85.zip |
feat(lsp): support set title in lsp relate floatwindow (#21110)
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r-- | runtime/lua/vim/lsp/util.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index b0f9c1660e..d89757ef0c 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -1050,6 +1050,13 @@ function M.make_floating_popup_options(width, height, opts) col = 1 end + local title = (opts.border and opts.title) and opts.title or nil + local title_pos + + if title then + title_pos = opts.title_pos or 'center' + end + return { anchor = anchor, col = col + (opts.offset_x or 0), @@ -1061,6 +1068,8 @@ function M.make_floating_popup_options(width, height, opts) width = width, border = opts.border or default_border, zindex = opts.zindex or 50, + title = title, + title_pos = title_pos, } end |