aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nvim/.config/nvim/init.vim11
-rw-r--r--nvim/.config/nvim/lua/plugins.lua35
-rw-r--r--nvim/.config/nvim/vim-plug/plugins.vim26
3 files changed, 40 insertions, 32 deletions
diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim
index 9c16e1a..ef19b42 100644
--- a/nvim/.config/nvim/init.vim
+++ b/nvim/.config/nvim/init.vim
@@ -2,11 +2,6 @@
" Author: eug-vs
" Email: eugene@eug-vs.xyz
-" Load plugins
-set runtimepath^=~/.vim runtimepath+=~/.vim/after
-let &packpath = &runtimepath
-source ~/.config/nvim/vim-plug/plugins.vim
-
" Enter the current millenium
set nocompatible
syntax enable
@@ -64,12 +59,16 @@ autocmd BufWritePre * %s/\s\+$//e
nnoremap <leader>ev :vs $MYVIMRC<CR>
nnoremap <leader>sv :source $MYVIMRC<CR>
+" Load plugins
+set runtimepath^=~/.vim runtimepath+=~/.vim/after
+let &packpath = &runtimepath
+lua require('plugins')
+
" Telescope
" TODO: move this ugly line into a function or smth
nnoremap <silent><leader>ff :lua require('telescope.builtin').find_files(require('telescope.themes').get_dropdown({ previewer = false, find_command = { 'rg', '--files', '--iglob', '!.git', '--hidden' } }))<CR>
nnoremap <silent><Leader>fr :Telescope live_grep<CR>
-" Plugin-specific configuration
source ~/.config/nvim/startify.vim
source ~/.config/nvim/vimwiki.vim
diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua
new file mode 100644
index 0000000..317c370
--- /dev/null
+++ b/nvim/.config/nvim/lua/plugins.lua
@@ -0,0 +1,35 @@
+return require('packer').startup(function()
+ -- Packer can manage itself
+ use 'wbthomason/packer.nvim'
+
+ use 'vimwiki/vimwiki'
+ use 'mhinz/vim-startify'
+
+ -- Lua filetree
+ use 'kyazdani42/nvim-tree.lua'
+
+ -- Built-in LSP
+ use 'neovim/nvim-lspconfig'
+ use 'hrsh7th/nvim-compe'
+ use 'glepnir/lspsaga.nvim'
+
+ -- Treesitter
+ use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
+ use 'nvim-treesitter/playground'
+
+ -- Color scheme
+ use 'sainnhe/gruvbox-material'
+
+ -- Telescope
+ use 'nvim-lua/plenary.nvim'
+ use 'nvim-telescope/telescope.nvim'
+ use 'kyazdani42/nvim-web-devicons'
+
+ -- Misc
+ use 'christoomey/vim-tmux-navigator'
+ use 'editorconfig/editorconfig-vim'
+ use 'ap/vim-css-color'
+ use 'airblade/vim-gitgutter'
+ use 'Raimondi/delimitMate'
+ use 'tonchis/vim-to-github'
+end)
diff --git a/nvim/.config/nvim/vim-plug/plugins.vim b/nvim/.config/nvim/vim-plug/plugins.vim
deleted file mode 100644
index a99bb14..0000000
--- a/nvim/.config/nvim/vim-plug/plugins.vim
+++ /dev/null
@@ -1,26 +0,0 @@
-call plug#begin('~/.config/nvim/autoload/plugged')
- Plug 'vimwiki/vimwiki'
- Plug 'mhinz/vim-startify'
- " Lua filetree
- Plug 'kyazdani42/nvim-tree.lua'
- " Built-in LSP
- Plug 'neovim/nvim-lspconfig'
- Plug 'hrsh7th/nvim-compe'
- Plug 'glepnir/lspsaga.nvim'
- " Treesitter
- Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
- Plug 'nvim-treesitter/playground'
- " Color scheme
- Plug 'sainnhe/gruvbox-material'
- " Telescope
- Plug 'nvim-lua/plenary.nvim'
- Plug 'nvim-telescope/telescope.nvim'
- Plug 'kyazdani42/nvim-web-devicons'
- " Misc
- Plug 'christoomey/vim-tmux-navigator'
- Plug 'editorconfig/editorconfig-vim'
- Plug 'ap/vim-css-color'
- Plug 'airblade/vim-gitgutter'
- Plug 'Raimondi/delimitMate'
- Plug 'tonchis/vim-to-github'
-call plug#end()