update
This commit is contained in:
parent
a4cfb715c0
commit
f2fef63db9
@ -1,9 +1,10 @@
|
|||||||
local G = require("core.G")
|
local G = require("G")
|
||||||
local TogglePreview = "<Plug>MarkdownPreviewToggle"
|
|
||||||
|
G.cmd("au VimEnter * :MarkdownPreview")
|
||||||
|
|
||||||
--set to 1, nvim will open the preview window after entering the markdown buffer
|
--set to 1, nvim will open the preview window after entering the markdown buffer
|
||||||
--default: 0
|
--default: 0
|
||||||
G.g.mkdp_auto_start = 1
|
G.g.mkdp_auto_start = 0
|
||||||
|
|
||||||
--set to 1, the nvim will auto close current preview window when change
|
--set to 1, the nvim will auto close current preview window when change
|
||||||
--from markdown buffer to another buffer
|
--from markdown buffer to another buffer
|
||||||
@ -81,6 +82,7 @@ G.g.mkdp_browserfunc = ''
|
|||||||
-- ]])
|
-- ]])
|
||||||
--use a custom markdown style must be absolute path
|
--use a custom markdown style must be absolute path
|
||||||
--like '/Users/username/markdown.css' or expand('~/markdown.css')
|
--like '/Users/username/markdown.css' or expand('~/markdown.css')
|
||||||
|
|
||||||
G.g.mkdp_markdown_css = ''
|
G.g.mkdp_markdown_css = ''
|
||||||
|
|
||||||
--use a custom highlight style must absolute path
|
--use a custom highlight style must absolute path
|
||||||
|
@ -34,6 +34,10 @@ function G.eval(c)
|
|||||||
return G.api.nvim_eval(c)
|
return G.api.nvim_eval(c)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function G.au(c)
|
||||||
|
return G.api.nvim_create_autocmd(c)
|
||||||
|
end
|
||||||
|
|
||||||
G.g.mapleader = ' '
|
G.g.mapleader = ' '
|
||||||
|
|
||||||
return G
|
return G
|
||||||
|
@ -52,17 +52,12 @@ G.api.nvim_create_autocmd({ "BufEnter" }, {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
local require_markdown = {}
|
G.api.nvim_create_autocmd( {"FileType"}, {
|
||||||
|
|
||||||
function require_markdown()
|
|
||||||
require('Filetype.markdown')
|
|
||||||
G.cmd('MarkdownPreviewToggle')
|
|
||||||
end
|
|
||||||
|
|
||||||
G.api.nvim_create_autocmd(
|
|
||||||
{"FileType"}, {
|
|
||||||
pattern = "markdown",
|
pattern = "markdown",
|
||||||
callback = require_markdown
|
callback = function()
|
||||||
|
require('Filetype.markdown')
|
||||||
|
--G.cmd('MarkdownPreview')
|
||||||
|
end
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user