This commit is contained in:
QQ 2023-01-22 22:23:51 +08:00
parent 6918e692bb
commit d7917f5236
3 changed files with 8 additions and 15 deletions

View File

@ -1,6 +1 @@
local map = vim.api.nvim_set_keymap
local openPreview = ":CocCommand markdown-preview-enhanced.openPreview<CR>:CocCommand markdown-preview-enhanced.openPreviewBackground<CR>"
map('n', '<leader>rr', openPreview, {noremap = false})
print("markdown sourced")

View File

@ -1,6 +1,4 @@
local map = vim.api.nvim_set_keymap local map = vim.api.nvim_set_keymap
local openPreview = ":CocCommand markdown-preview-enhanced.openPreview<CR>:CocCommand markdown-preview-enhanced.openPreviewBackground<CR>" local openPreview = ":CocCommand markdown-preview-enhanced.openPreview<CR>:CocCommand markdown-preview-enhanced.openPreviewBackground<CR>"
map('n', '<leader>rr', openPreview, {noremap = false}) map('n', '<leader>r', openPreview, {noremap = false})
print("markdown sourced")

View File

@ -54,13 +54,13 @@ vim.api.nvim_create_autocmd({ "BufEnter" }, {
end, end,
}) })
local require_markdown = function() require('Filetype.markdown') end local require_markdown = {}
local require_html = function() require('Filetype.Html') end function require_markdown()
require('Filetype.markdown')
vim.api.nvim_create_autocmd({ end
{"FileType"}, { pattern = "markdown", callback = require_markdown }, vim.api.nvim_create_autocmd(
{"FileType"}, { pattern = "html", callback = require_html } {"FileType"}, { pattern = "markdown", callback = require_markdown }
}) )