Skip to content

Commit

Permalink
feat: replace matchit with vim-matchup
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyinzuo committed May 28, 2024
1 parent 384d3b6 commit 759667f
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 31 deletions.
1 change: 1 addition & 0 deletions root/.config/nvim/lua/plugins/vimplug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ local M = {
"vim-scripts/dbext.vim",
ft = "sql",
},
"andymass/vim-matchup",
"jiangyinzuo/bd.vim",
{
"lervag/vimtex",
Expand Down
6 changes: 6 additions & 0 deletions root/.config/nvim/lua/plugins_setup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ function M.nvim_treesitter()
endwise = {
enable = true,
},
-- https://github.com/andymass/vim-matchup
matchup = {
enable = true, -- mandatory, false will disable the whole extension
disable = { "c", "ruby" }, -- optional, list of language that will be disabled
-- [options]
},
})
end

Expand Down
16 changes: 0 additions & 16 deletions root/.vim/UltiSnips/markdown.snippets

This file was deleted.

2 changes: 1 addition & 1 deletion root/.vim/UltiSnips/tex.snippets
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
snippet temp1 "temp1" b
snippet xelatex "xelatex CJK" b
%编译 xelatex main.tex
\documentclass{ctexart} % apt install texlive-lang-chinese
%\setCJKmainfont{WenQuanYi Micro Hei Mono} % 选择你系统中安装的一个中文字体 fc-list :lang=zh
Expand Down
3 changes: 3 additions & 0 deletions root/.vim/doc/ubuntu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ http://keyserver.ubuntu.com 查询
do-release-upgrade
<

手工清理source list,保证`sudo apt update`不报错
更新重启后,ssh端口配置变为默认值22

Your python3 install is corrupted
>
sudo ln -fs /usr/bin/python3.6 /usr/bin/python3
Expand Down
18 changes: 4 additions & 14 deletions root/.vim/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,7 @@ if has('autocmd') " vim-tiny does not have autocmd
else
let g:vimrc_lsp = get(g:, 'vimrc_lsp', 'coc.nvim')
endif
let g:ccls_init_options = {
\ "compilationDatabaseDirectory": "build",
\ "index": {
\ "threads": 0
\ },
\ "clang": {
\ "excludeArgs": ["-frounding-math"],
\ }
\}

let g:ccls_init_options = { "compilationDatabaseDirectory": "build", "index": { "threads": 0 }, "clang": { "excludeArgs": ["-frounding-math"] }}
" tmux2.2以上才支持true color
let g:vimrc_use_true_color = get(g:, 'vimrc_use_true_color', 1)
" 'vimspector' | 'nvim-dap' | ''
Expand Down Expand Up @@ -78,10 +69,6 @@ if has('autocmd') " vim-tiny does not have autocmd
set modeline
set noexrc " 不读取当前文件夹的.vimrc

if has("patch-7.4.1649")
packadd! matchit
endif

if exists('&viminfofile') && !has('nvim')
set viminfofile=$HOME/.vim/.viminfo
" 保留50个marks
Expand Down Expand Up @@ -414,6 +401,9 @@ if has('autocmd') " vim-tiny does not have autocmd
if g:no_plug
" https://zhuanlan.zhihu.com/p/106309525
autocmd FileType c,cpp,cuda setlocal completefunc=noplug#MyCppCompleteFunc
if has("patch-7.4.1649")
packadd! matchit
endif
endif

""""""""""""""""" StatusLine """"""""""""""""""
Expand Down
5 changes: 5 additions & 0 deletions root/.vim/vimrc.d/plugin_setup.vim
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ nmap F <Plug>Sneak_F
nmap t <Plug>Sneak_t
nmap T <Plug>Sneak_T
let g:matchup_override_vimtex = 1
let g:matchup_surround_enabled = 1
let g:loaded_matchit = 1
let g:matchup_matchparen_enabled = 0

let g:fern#renderer = "nerdfont"
let g:fern#default_hidden = 1

Expand Down
2 changes: 2 additions & 0 deletions root/.vim/vimrc.d/vimplug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ call plug#begin(g:vim_plug_dir)
Plug 'justinmk/vim-sneak'
Plug 'matze/vim-move'

Plug 'andymass/vim-matchup'

if has('nvim') || v:version >= 801
Plug 'ap/vim-css-color'
Plug 'LunarWatcher/auto-pairs'
Expand Down

0 comments on commit 759667f

Please sign in to comment.