comparison dot_config/nvim/config.lua @ 324:64a0c6cec54c

Use packer for plugin management in lua
author zegervdv <zegervdv@me.com>
date Tue, 22 Dec 2020 15:42:45 +0100
parents 3b25f3aa7014
children ce396166d009
comparison
equal deleted inserted replaced
323:3b25f3aa7014 324:64a0c6cec54c
1 --
2 -- Neovim dotfiles
3 --
4 --
5
6 local execute = vim.api.nvim_command
7 local fn = vim.fn
8
9 -- Bootstrap package manager
10 local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
11
12 if fn.empty(fn.glob(install_path)) > 0 then
13 execute('!git clone https://github.com/wbthomason/packer.nvim '..install_path)
14 end
15
16 require('packer').startup(function()
17 use {'wbthomason/packer.nvim'}
18
19 -- General plugins
20 use {'tpope/vim-sensible'}
21 use {'tpope/vim-repeat'}
22 use {'tpope/vim-rsi'}
23 use {'sgur/vim-editorconfig'}
24 use {'ShikChen/osc52.vim'}
25 use {'einfachtoll/didyoumean'}
26
27 use {'tpope/vim-obsession'}
28 use {
29 'tpope/vim-eunuch',
30 cmd = {
31 'Remove',
32 'Unlink',
33 'Move',
34 'Rename',
35 'Mkdir',
36 'Chmod',
37 'Find',
38 'Locate',
39 'SudoEdit',
40 'SudoWrite'
41 }
42 }
43
44 -- Spelling/autocorrection
45 use {'tpope/vim-abolish'}
46
47 -- Git/VCS
48 use {'vim-scripts/gitignore'}
49 use {'sjl/splice.vim', opt = true, cmd = {'SpliceInit'}}
50 use {'tpope/vim-git'}
51
52 -- Comments
53 use {'tpope/vim-commentary'}
54
55 -- Undoing
56 use {'sjl/gundo.vim', cmd = {'GundoToggle'}}
57
58 -- Parentheses etc
59 use {'tpope/vim-surround'}
60 use {'raimondi/delimitMate'}
61 use {'zegervdv/vim-endwise'}
62
63 -- Moving around within lines
64 use {'wellle/targets.vim', event = 'InsertEnter *'}
65
66 -- Searching
67 use {'mhinz/vim-grepper', cmd = {'Grepper'}}
68
69 -- Indent lines
70 use {'Yggdroot/indentline'}
71 use {'lukas-reineke/indent-blankline.nvim', branch = 'lua'}
72
73 -- Tmux
74 use {'christoomey/vim-tmux-navigator', cond = os.getenv('TMUX')}
75 use {'tmux-plugins/vim-tmux-focus-events', cond = os.getenv('TMUX')}
76
77 -- Completion/snippets/LSP
78 use {'neovim/nvim-lspconfig'}
79 use {
80 'nvim-lua/completion-nvim',
81 'steelsojka/completion-buffers'
82 }
83 use {
84 'nvim-treesitter/nvim-treesitter',
85 'nvim-treesitter/nvim-treesitter-refactor',
86 'nvim-treesitter/nvim-treesitter-textobjects',
87 {'nvim-treesitter/playground', opt = true}
88 }
89 use {
90 'nvim-telescope/telescope.nvim',
91 requires = {
92 'nvim-lua/popup.nvim',
93 'nvim-lua/plenary.nvim'
94 }
95 }
96
97 -- File navigation
98 use {'justinmk/vim-dirvish'}
99
100 -- Colorscheme
101 use {'zegervdv/nvcode-color-schemes.vim'}
102
103 end)
104
105
1 local lsp = require'lspconfig' 106 local lsp = require'lspconfig'
2 local lsputil = require'lspconfig.util' 107 local lsputil = require'lspconfig.util'
3 108
4 require "nvim-treesitter.highlight" 109 require "nvim-treesitter.highlight"
5 110