From 4b962e75fc7ed603df56c8f8e775dc717282ac13 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Wed, 30 Jun 2021 08:45:11 +0200 Subject: [PATCH] Add startify + autopair --- configs/nvim/lua/plugins/init.lua | 21 +++++++++++-------- configs/nvim/lua/plugins/nvim-autopairs.lua | 11 ++++++++++ ...web-devicons.lua => nvim-web-devicons.lua} | 0 3 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 configs/nvim/lua/plugins/nvim-autopairs.lua rename configs/nvim/lua/plugins/{web-devicons.lua => nvim-web-devicons.lua} (100%) diff --git a/configs/nvim/lua/plugins/init.lua b/configs/nvim/lua/plugins/init.lua index 01b179b..546000f 100644 --- a/configs/nvim/lua/plugins/init.lua +++ b/configs/nvim/lua/plugins/init.lua @@ -2,20 +2,22 @@ function configure_packages() call_with_helpers(require('plugins.lspconfig').init) call_with_helpers(require('plugins.compe').init) call_with_helpers(require('plugins.nvim-treesitter').init) - call_with_helpers(require('plugins.web-devicons').init) + call_with_helpers(require('plugins.nvim-web-devicons').init) call_with_helpers(require('plugins.nvim-comment').init) + call_with_helpers(require('plugins.nvim-autopairs').init) end function install_packages() -- Packer can manage itself use 'wbthomason/packer.nvim' - use {'dracula/vim'} - use {'whatyouhide/vim-gotham'} - use {'neovim/nvim-lspconfig'} - use {'kabouzeid/nvim-lspinstall'} - use {'hrsh7th/nvim-compe'} - use {'shaunsingh/moonlight.nvim'} + use 'dracula/vim' + use 'whatyouhide/vim-gotham' + use 'neovim/nvim-lspconfig' + use 'kabouzeid/nvim-lspinstall' + use 'hrsh7th/nvim-compe' + use 'shaunsingh/moonlight.nvim' + use 'windwp/nvim-autopairs' -- Telescope project search use { @@ -23,12 +25,13 @@ function install_packages() requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}} } - use {'nvim-treesitter/nvim-treesitter'} + use 'nvim-treesitter/nvim-treesitter' - use 'kyazdani42/nvim-web-devicons' -- removing this line doesn't change the error + use 'kyazdani42/nvim-web-devicons' -- removing this line doesn't change the error use 'kyazdani42/nvim-tree.lua' use 'kdheepak/lazygit.nvim' use 'terrortylor/nvim-comment' + use 'mhinz/vim-startify' -- The fancy start screen for Vim. end function init() diff --git a/configs/nvim/lua/plugins/nvim-autopairs.lua b/configs/nvim/lua/plugins/nvim-autopairs.lua new file mode 100644 index 0000000..a054985 --- /dev/null +++ b/configs/nvim/lua/plugins/nvim-autopairs.lua @@ -0,0 +1,11 @@ +local function init() + require('nvim-autopairs').setup() + require("nvim-autopairs.completion.compe").setup({ + map_cr = true, -- map on insert mode + map_complete = true -- it will auto insert `(` after select function or method item + }) +end + +return { + init = init +} \ No newline at end of file diff --git a/configs/nvim/lua/plugins/web-devicons.lua b/configs/nvim/lua/plugins/nvim-web-devicons.lua similarity index 100% rename from configs/nvim/lua/plugins/web-devicons.lua rename to configs/nvim/lua/plugins/nvim-web-devicons.lua