-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
render-markdown.nvim
for md workflow (#1336)
* feat: add `render-markdown.nvim` for md workflow * feat: `<F1>` toggles the plugin Signed-off-by: Jint-lzxy <[email protected]> * fix: add `nvim-web-devicons` as a dependency Signed-off-by: Jint-lzxy <[email protected]> * perf: disable for files larger than 2 MiB Signed-off-by: Jint-lzxy <[email protected]> --------- Signed-off-by: Jint-lzxy <[email protected]> Co-authored-by: Jint-lzxy <[email protected]>
- Loading branch information
1 parent
3828f4b
commit ccf0464
Showing
4 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
return function() | ||
require("modules.utils").load_plugin("render-markdown", { | ||
-- Whether Markdown should be rendered by default or not | ||
enabled = true, | ||
-- Maximum file size (in MB) that this plugin will attempt to render | ||
-- Any file larger than this will effectively be ignored | ||
max_file_size = 2.0, | ||
-- Milliseconds that must pass before updating marks, updates occur | ||
-- within the context of the visible window, not the entire buffer | ||
debounce = 100, | ||
-- Vim modes that will show a rendered view of the markdown file | ||
-- All other modes will be uneffected by this plugin | ||
render_modes = { "n", "c", "t" }, | ||
-- This enables hiding any added text on the line the cursor is on | ||
-- This does have a performance penalty as we must listen to the 'CursorMoved' event | ||
anti_conceal = { enabled = true }, | ||
-- The level of logs to write to file: vim.fn.stdpath('state') .. '/render-markdown.log' | ||
-- Only intended to be used for plugin development / debugging | ||
log_level = "error", | ||
}) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters