diff options
| author | jdhao <jdhao@hotmail.com> | 2021-07-24 12:45:54 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2021-07-24 12:45:54 +0800 |
| commit | edd74337a9c851673da4a04bdc8c145d26c30a6b (patch) | |
| tree | 96682b05eabd5674b2f4d2deececae7161cb0c85 /lua | |
| parent | 4ff301a7284eb38c493e937f15f2ee6643177c3a (diff) | |
Use vim.cmd instead of vim.api.nvim_exec
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/plugins.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lua/plugins.lua b/lua/plugins.lua index dafb5be..571a2fb 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -1,4 +1,3 @@ -local execute = vim.api.nvim_command local fn = vim.fn local packer_install_dir = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' @@ -16,8 +15,8 @@ local install_cmd = string.format('10split |term git clone --depth=1 %s %s', pac -- Auto-install packer in case it hasn't been installed. if fn.glob(packer_install_dir) == '' then vim.api.nvim_echo({{'Installing packer.nvim', 'Type'}}, true, {}) - execute(install_cmd) - execute 'packadd packer.nvim' + vim.cmd(install_cmd) + vim.cmd('packadd packer.nvim') end vim.cmd [[packadd packer.nvim]] @@ -284,9 +283,9 @@ require('packer').startup( } }) -vim.api.nvim_exec([[ +vim.cmd([[ augroup packer_auto_compile autocmd! autocmd BufWritePost */nvim/lua/plugins.lua source <afile> | PackerCompile augroup END -]], false) +]]) |
