commit c6d6b8c7eb180f56e87e1427958f91a867f5cc8c
parent 24352cba01395aeb1c29b651b6d06f472e0911d3
Author: Elton Leander Pinto <eltonp3103@gmail.com>
Date: Wed, 25 May 2022 12:47:49 -0400
fix(lsp): respect global syntax setting in open float preview (#15225)
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
@@ -1477,7 +1477,7 @@ function M.open_floating_preview(contents, syntax, opts)
})
opts = opts or {}
opts.wrap = opts.wrap ~= false -- wrapping by default
- opts.stylize_markdown = opts.stylize_markdown ~= false
+ opts.stylize_markdown = opts.stylize_markdown ~= false and vim.g.syntax_on ~= nil
opts.focus = opts.focus ~= false
opts.close_events = opts.close_events or { 'CursorMoved', 'CursorMovedI', 'InsertCharPre' }