Skip to content

Commit

Permalink
chore: added some test condition for adfing highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
OXY2DEV committed Aug 5, 2024
1 parent a6392dd commit 3e5ceec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
11 changes: 3 additions & 8 deletions ftplugin/markdown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ if vim.islist(markview.configuration.buf_ignore) and vim.list_contains(markview.
return
end

if vim.islist(markview.configuration.highlight_groups) then
-- Don't add hls unless absolutely necessary
if not markview.added_hls and vim.islist(markview.configuration.highlight_groups) then
markview.add_hls(markview.configuration.highlight_groups)
markview.added_hls = true;
end

local markview_augroup = vim.api.nvim_create_augroup("markview_buf_" .. vim.api.nvim_get_current_buf(), { clear = true });
Expand Down Expand Up @@ -73,13 +75,6 @@ vim.api.nvim_create_autocmd({ "BufWinEnter" }, {

markview.state.buf_states[buffer] = true;

if vim.tbl_isempty(markview.global_options) then
markview.global_options = {
conceallevel = vim.o.conceallevel,
concealcursor = vim.o.concealcursor
}
end

local parsed_content = markview.parser.init(buffer, markview.configuration);

markview.renderer.clear(buffer);
Expand Down
1 change: 0 additions & 1 deletion lua/markview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,6 @@ end, {
end
})


markview.setup = function (user_config)
---@type markview.config
-- Merged configuration tables
Expand Down

0 comments on commit 3e5ceec

Please sign in to comment.