diff --git a/README.md b/README.md index 72f67a8..a78abd5 100644 --- a/README.md +++ b/README.md @@ -272,6 +272,9 @@ local opts = { -- The color of the hints highlight = "Comment", + + -- priority of the virtual text + priority = 100, }, -- options same as lsp hover / vim.lsp.util.open_floating_preview() diff --git a/lua/rust-tools/config.lua b/lua/rust-tools/config.lua index d4ce0ac..db690af 100644 --- a/lua/rust-tools/config.lua +++ b/lua/rust-tools/config.lua @@ -56,6 +56,9 @@ local defaults = { -- The color of the hints highlight = "Comment", + + -- priority of the virtual text + priority = 100, }, -- options same as lsp hover / vim.lsp.util.open_floating_preview() diff --git a/lua/rust-tools/inlay_hints.lua b/lua/rust-tools/inlay_hints.lua index 0df31a1..51b8edf 100644 --- a/lua/rust-tools/inlay_hints.lua +++ b/lua/rust-tools/inlay_hints.lua @@ -251,6 +251,7 @@ local function render_line(line, line_hints, bufnr, max_line_len) { virt_text, opts.highlight }, }, hl_mode = "combine", + priority = opts.priority }) end end