增加括号插件的选项

This commit is contained in:
QQ 2023-02-08 17:32:24 +08:00
parent 276dbbb065
commit bc3ea18e18
4 changed files with 37 additions and 8 deletions

View File

@ -1,8 +1,10 @@
require('core.plug') require('core.plug')
require('core.options') require('core.options')
require('core.keymap') require('core.keymap')
require('core.filetype')
require('Plugin.coc') require('Plugin.coc')
require('Plugin.lualine') require('Plugin.lualine')
require('Plugin.Imchange') require('Plugin.Imchange')
require('Plugin.treesitter') require('Plugin.treesitter')
require('Plugin.hlchunk')

17
lua/Plugin/hlchunk.lua Normal file
View File

@ -0,0 +1,17 @@
local G = require("G")
G.cmd([[
" 支持哪些文件 默认为 '*.ts,*.js,*.json,*.go,*.c'
let g:hlchunk_files = '*.ts,*.js,*.json,*.go,*.c'
" 高亮颜色
au VimEnter * hi IndentLineSign ctermfg=248
" 延时 默认为50
let g:hlchunk_time_delay = 50
" 优先级 默认为90
let g:hlchunk_priority = 90
" 预设主题 默认为1
let g:hlchunk_theme = 1
" 用户自定义主题 默认无(用户设置后 以用户设置为主)
" 格式: sign_texts: char[2][3], usenew: (0|1)[4] " [,]
let g:hlchunk_theme_byuser = { 'sign_texts': ['╭─', '', '╰>'], 'usenew': [1, 1, 1, 1] },
]])

18
lua/core/filetype.lua Normal file
View File

@ -0,0 +1,18 @@
local G = require("G")
G.api.nvim_create_autocmd( {"FileType"}, {
pattern = "markdown",
callback = function()
require('Filetype.markdown')
--G.cmd('MarkdownPreview')
end
}
)
G.api.nvim_create_autocmd( {"FileType"}, {
pattern = {"c", "cpp"},
callback = function()
require('Filetype.c')
end
}
)

View File

@ -52,13 +52,5 @@ G.api.nvim_create_autocmd({ "BufEnter" }, {
end, end,
}) })
G.api.nvim_create_autocmd( {"FileType"}, {
pattern = "markdown",
callback = function()
require('Filetype.markdown')
--G.cmd('MarkdownPreview')
end
}
)