From 732b40d563227539d98edb57601d59329aa237f2 Mon Sep 17 00:00:00 2001 From: Nachuan Tang Date: Sat, 6 Aug 2022 15:46:38 -0400 Subject: [PATCH] support lua config --- .vimrc | 1 + .vimrc.bundles | 14 ++++---------- .vimrc.lua | 11 +++++++++++ 3 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 .vimrc.lua diff --git a/.vimrc b/.vimrc index 0f38862..60b0dc4 100644 --- a/.vimrc +++ b/.vimrc @@ -10,6 +10,7 @@ let g:vim_version = matchstr(execute('version'), 'NVIM v\zs[^\n]*') endif let g:vim_version = str2float(g:vim_version) + let g:dotfile_path = '~/.dotfiles/' " The default leader is '\', but many people prefer ',' as it's in a standard let mapleader = ',' diff --git a/.vimrc.bundles b/.vimrc.bundles index 7a71f88..a9e2cd3 100644 --- a/.vimrc.bundles +++ b/.vimrc.bundles @@ -109,16 +109,10 @@ if g:vim_type == 'nvim' if g:vim_version >= 0.7 " nvim-treesitter/nvim-treesitter { - call v:lua.require'nvim-treesitter.configs'.setup { - ensure_installed = { "c", "bash", "lua" }, - sync_install = false, - auto_install = true, - ignore_install = { "javascript" }, - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - }, - } + if filereadable(expand(g:dotfile_path . '.vimrc.lua')) + execute('source ' . g:dotfile_path . '/.vimrc.lua') + endif + " } endif endif diff --git a/.vimrc.lua b/.vimrc.lua new file mode 100644 index 0000000..8b2b7db --- /dev/null +++ b/.vimrc.lua @@ -0,0 +1,11 @@ + +require'nvim-treesitter.configs'.setup { + -- ensure_installed = { "c", "bash", "lua" }, + sync_install = false, + auto_install = true, + -- ignore_install = { "javascript" }, + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, +}