|
|
|
|
@ -1,67 +1,53 @@
|
|
|
|
|
" Originally based on https://medium.com/better-programming/setting-up-neovim-for-web-development-in-2020-d800de3efacd
|
|
|
|
|
" Neovim plugins and setting
|
|
|
|
|
" Considerations, etc. COC: coc-emmet
|
|
|
|
|
" vim-fugitive, vim-gitgutter, vim-surround
|
|
|
|
|
|
|
|
|
|
call plug#begin("~/.vim/plugged")
|
|
|
|
|
" Plugin Section
|
|
|
|
|
" Colour Scheme
|
|
|
|
|
Plug 'morhetz/gruvbox'
|
|
|
|
|
" File Explorer
|
|
|
|
|
Plug 'scrooloose/nerdtree'
|
|
|
|
|
Plug 'ryanoasis/vim-devicons'
|
|
|
|
|
" Fuzzy Finder
|
|
|
|
|
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
|
|
|
|
Plug 'junegunn/fzf.vim'
|
|
|
|
|
" COC
|
|
|
|
|
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
|
|
|
|
let g:coc_global_extensions = ['coc-css', 'coc-html', 'coc-json', 'coc-prettier', 'coc-tsserver', 'coc-phpls']
|
|
|
|
|
" If node is installed via nvm, you need to reference a version here
|
|
|
|
|
let g:coc_node_path = '/home/nathan/.nvm/versions/node/v14.17.4/bin/node'
|
|
|
|
|
" Vim Move
|
|
|
|
|
|
|
|
|
|
" Tree view
|
|
|
|
|
Plug 'nvim-tree/nvim-tree.lua'
|
|
|
|
|
"Plug 'nvim-tree/nvim-web-devicons'
|
|
|
|
|
|
|
|
|
|
" Fuzzy finder(s)
|
|
|
|
|
Plug 'ibhagwan/fzf-lua', {'branch': 'main'}
|
|
|
|
|
|
|
|
|
|
" Colour highlighter
|
|
|
|
|
Plug 'norcalli/nvim-colorizer.lua'
|
|
|
|
|
|
|
|
|
|
" Vim tweaks, and additions
|
|
|
|
|
" Vim Move (C-hjkl)
|
|
|
|
|
Plug 'matze/vim-move'
|
|
|
|
|
" Add surround to vim (much like, around, inside, etc)
|
|
|
|
|
Plug 'tpope/vim-surround'
|
|
|
|
|
" Add easy commenting
|
|
|
|
|
Plug 'preservim/nerdcommenter'
|
|
|
|
|
" Symfony/PHP
|
|
|
|
|
Plug 'lepture/vim-jinja'
|
|
|
|
|
Plug 'phpactor/phpactor', {'for': 'php', 'tag': '*', 'do': 'composer install --no-dev -o'}
|
|
|
|
|
Plug 'nelsyeung/twig.vim'
|
|
|
|
|
|
|
|
|
|
"Git (Show changes in files)
|
|
|
|
|
Plug 'mhinz/vim-signify'
|
|
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
|
|
" Add Vim Config
|
|
|
|
|
" Vim stuff
|
|
|
|
|
source ~/.vimrc
|
|
|
|
|
|
|
|
|
|
" Config Section
|
|
|
|
|
|
|
|
|
|
" Colour Scheme
|
|
|
|
|
if (has("termguicolors"))
|
|
|
|
|
set termguicolors
|
|
|
|
|
set termguicolors
|
|
|
|
|
endif
|
|
|
|
|
syntax enable
|
|
|
|
|
colorscheme gruvbox
|
|
|
|
|
|
|
|
|
|
" File Explorer
|
|
|
|
|
let g:NERDTreeShowHidden = 1
|
|
|
|
|
let g:NERDTreeMinimalUI = 1
|
|
|
|
|
let g:NERDTreeIgnore = []
|
|
|
|
|
let g:NERDTreeStatusline = ''
|
|
|
|
|
" Automaticaly close nvim if NERDTree is only thing left open
|
|
|
|
|
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
|
|
|
|
" Toggle File Explorer <C-b>
|
|
|
|
|
nnoremap <silent> <C-b> :NERDTreeToggle<CR>
|
|
|
|
|
" Colourizer
|
|
|
|
|
lua require'colorizer'.setup()
|
|
|
|
|
" Tree
|
|
|
|
|
lua require'nvim-tree'.setup {}
|
|
|
|
|
nnoremap <C-n> :NvimTreeToggle<CR>
|
|
|
|
|
|
|
|
|
|
" CoC
|
|
|
|
|
inoremap <silent><expr> <c-space> coc#refresh()
|
|
|
|
|
" Signify
|
|
|
|
|
let g:signify_sign_add = '+'
|
|
|
|
|
let g:signify_sign_delete = '-'
|
|
|
|
|
let g:signify_sign_change = '│'
|
|
|
|
|
"hi DiffDelete guifg=#ff5555 guibg=none
|
|
|
|
|
|
|
|
|
|
" Fuzzy Finder <C-p>
|
|
|
|
|
nnoremap <C-p> :FZF<CR>
|
|
|
|
|
let g:fzf_action = {
|
|
|
|
|
\ 'ctrl-t': 'tab split',
|
|
|
|
|
\ 'ctrl-s': 'split',
|
|
|
|
|
\ 'ctrl-v': 'vsplit'
|
|
|
|
|
\}
|
|
|
|
|
" Fzf
|
|
|
|
|
nnoremap <C-p> <cmd>lua require('fzf-lua').files()<CR>
|
|
|
|
|
|
|
|
|
|
" Vim Move
|
|
|
|
|
let g:move_key_modifier = 'C'
|
|
|
|
|
|