blob: bc92a5d823ad4a084fa74e54b8ef9fb82f86f2df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
" Allows to have a .nvimrc per project folder
set exrc
" Install Vimplug if not installed
if ! filereadable(expand('~/.config/nvim/autoload/plug.vim'))
echo "Downloading junegunn/vim-plug to manage plugins..."
silent !mkdir -p ~/.config/nvim/autoload/
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim
autocmd VimEnter * PlugInstall
endif
" Set plugin folder
call plug#begin('~/.config/nvim/plugged')
" LSP
Plug 'neovim/nvim-lspconfig'
" Plug 'nvim-lua/completion-nvim'
Plug 'hrsh7th/nvim-compe'
Plug 'anott03/nvim-lspinstall'
" General use plugins
Plug 'Raimondi/delimitMate'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-obsession'
Plug 'tpope/vim-vinegar'
Plug 'tpope/vim-eunuch'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-tbone'
Plug 'tpope/vim-dadbod'
Plug 'airblade/vim-gitgutter'
Plug 'hashivim/vim-terraform'
Plug 'mattn/emmet-vim'
Plug 'nicwest/vim-http'
Plug 'vimwiki/vimwiki'
" Laravel specific
Plug 'tpope/vim-dispatch'
Plug 'tpope/vim-projectionist'
Plug 'noahfrederick/vim-composer'
Plug 'noahfrederick/vim-laravel'
Plug 'jwalton512/vim-blade'
" Treesitter
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'nvim-treesitter/playground'
" Golang
Plug 'fatih/vim-go'
" Testing
Plug 'vim-test/vim-test'
" Debug
Plug 'mfussenegger/nvim-dap'
Plug 'puremourning/vimspector'
Plug 'szw/vim-maximizer'
Plug 'gruvbox-community/gruvbox'
" Telescope
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'nvim-telescope/telescope-fzy-native.nvim'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'hoob3rt/lualine.nvim'
Plug 'sbdchd/neoformat'
Plug 'mbbill/undotree'
call plug#end()
syntax enable
let mapleader = ' '
inoremap <C-c> <esc>
nnoremap <Leader><CR> :so ~/.config/nvim/init.vim<CR>
nnoremap <leader>uu :UndotreeToggle<CR>
let g:vimwiki_list = [{'path': '~/vimwiki/',
\ 'syntax': 'markdown', 'ext': '.md'}]
let g:gitgutter_map_keys = 0
" forward and backward search of current word
nnoremap * /\<<C-R>=expand('<cword>')<CR>\><CR>
nnoremap # ?\<<C-R>=expand('<cword>')<CR>\><CR>
vnoremap <leader>p "_dP
" remove whitespaces
autocmd BufWritePre * %s/\s\+$//e
augroup fmtphp
autocmd!
autocmd BufWritePre *.php undojoin | Neoformat
augroup END
" Has to be the last line for the .nvimrc per project
set secure
|