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 openPreview = ":CocCommand markdown-preview-enhanced.openPreview<CR>:CocCommand markdown-preview-enhanced.openPreviewBackground<CR>"
map('n', '<leader>rr', openPreview, {noremap = false})
print("markdown sourced")
map('n', '<leader>r', openPreview, {noremap = false})

View File

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