update
This commit is contained in:
parent
aa2ffcfaf5
commit
6918e692bb
@ -1,3 +1,4 @@
|
||||
<!-- @import "[TOC]" {cmd="toc" depthFrom=1 depthTo=6 orderedList=false} -->
|
||||
# 从零开始打造属于自己的nvim
|
||||
---
|
||||
## 文件结构
|
||||
|
@ -1,5 +1,7 @@
|
||||
{
|
||||
"snippets.ultisnips.pythonPrompt": false,
|
||||
"explorer.icon.enableNerdfont": true,
|
||||
"explorer.toggle": true
|
||||
"explorer.toggle": true,
|
||||
"markdown-preview-enhanced.previewTheme":"github-dark.css",
|
||||
"markdown-preview-enhanced.latexEngine": "pdflatex"
|
||||
}
|
||||
|
6
lua/Filetype/Html.lua
Normal file
6
lua/Filetype/Html.lua
Normal file
@ -0,0 +1,6 @@
|
||||
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")
|
6
lua/Filetype/markdown.lua
Normal file
6
lua/Filetype/markdown.lua
Normal file
@ -0,0 +1,6 @@
|
||||
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")
|
@ -82,5 +82,3 @@ keyset("v", "<leader>tt", "<Plug>(coc-translator-pv)")
|
||||
-- translator-releader
|
||||
keyset("n", "<leader>tr", "<Plug>(coc-translator-r)")
|
||||
keyset("v", "<leader>tr", "<Plug>(coc-translator-rv)")
|
||||
|
||||
|
||||
|
@ -41,7 +41,7 @@ vim.cmd("colorscheme gruvbox")
|
||||
vim.cmd([[ au InsertLeave * :silent !fcitx5-remote -c ]])
|
||||
|
||||
-- 文件判断
|
||||
vim.cmd([[ filetype plugin on ]])
|
||||
vim.cmd([[ filetype plugin indent on ]])
|
||||
|
||||
-- 取消换行注释
|
||||
vim.api.nvim_create_autocmd({ "BufEnter" }, {
|
||||
@ -54,6 +54,14 @@ 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 }
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
@ -71,7 +79,5 @@ vim.api.nvim_create_autocmd({ "BufEnter" }, {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user