Merge pull request #14073 from mjlbach/feature/syntax_highlight_rule

lsp: add custom syntax rule for floating window
This commit is contained in:
Michael Lingelbach
2021-03-10 14:15:24 -08:00
committed by GitHub
3 changed files with 31 additions and 1 deletions

View File

@@ -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)