diff options
author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-03-10 14:15:24 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-10 14:15:24 -0800 |
commit | 4ed860a64cf6db8dcf33d16ce448243bf072006d (patch) | |
tree | cdb9c12bcfc2640cdfce0a887cee757c0feb7171 /runtime/lua/vim/lsp/util.lua | |
parent | d1074e0077024d1581a77e3bf09e80a657047847 (diff) | |
parent | d49177afd9806f651c0177f9cc68c5a22dba2938 (diff) | |
download | rneovim-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.lua | 5 |
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) |