aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/util.lua
diff options
context:
space:
mode:
authorElton Leander Pinto <eltonp3103@gmail.com>2022-05-25 12:47:49 -0400
committerGitHub <noreply@github.com>2022-05-25 18:47:49 +0200
commitc6d6b8c7eb180f56e87e1427958f91a867f5cc8c (patch)
tree756091ff408392c96eae7dbe8b2cc93940305ed4 /runtime/lua/vim/lsp/util.lua
parent24352cba01395aeb1c29b651b6d06f472e0911d3 (diff)
downloadrneovim-c6d6b8c7eb180f56e87e1427958f91a867f5cc8c.tar.gz
rneovim-c6d6b8c7eb180f56e87e1427958f91a867f5cc8c.tar.bz2
rneovim-c6d6b8c7eb180f56e87e1427958f91a867f5cc8c.zip
fix(lsp): respect global syntax setting in open float preview (#15225)
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r--runtime/lua/vim/lsp/util.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index 4663cf9f09..63e9342b1a 100644
--- 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' }