aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/util.lua
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2021-03-10 14:15:24 -0800
committerGitHub <noreply@github.com>2021-03-10 14:15:24 -0800
commit4ed860a64cf6db8dcf33d16ce448243bf072006d (patch)
treecdb9c12bcfc2640cdfce0a887cee757c0feb7171 /runtime/lua/vim/lsp/util.lua
parentd1074e0077024d1581a77e3bf09e80a657047847 (diff)
parentd49177afd9806f651c0177f9cc68c5a22dba2938 (diff)
downloadrneovim-4ed860a64cf6db8dcf33d16ce448243bf072006d.tar.gz
rneovim-4ed860a64cf6db8dcf33d16ce448243bf072006d.tar.bz2
rneovim-4ed860a64cf6db8dcf33d16ce448243bf072006d.zip
Merge pull request #14073 from mjlbach/feature/syntax_highlight_rule
lsp: add custom syntax rule for floating window
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r--runtime/lua/vim/lsp/util.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua
index 88a5fb468f..918b77e9f9 100644
--- a/runtime/lua/vim/lsp/util.lua
+++ b/runtime/lua/vim/lsp/util.lua
@@ -1032,8 +1032,11 @@ function M.fancy_floating_markdown(contents, opts)
-- This is because the syntax command doesn't accept a target.
local cwin = vim.api.nvim_get_current_win()
vim.api.nvim_set_current_win(winnr)
+ api.nvim_win_set_option(winnr, 'conceallevel', 2)
+ api.nvim_win_set_option(winnr, 'concealcursor', 'n')
- vim.cmd("ownsyntax markdown")
+ vim.cmd("ownsyntax lsp_markdown")
+ vim.cmd("set filetype=lsp_markdown")
local idx = 1
--@private
local function apply_syntax_to_region(ft, start, finish)