add html+typescript plugins to vim
This commit is contained in:
parent
31e8c4eae3
commit
1d756d13db
1 changed files with 42 additions and 6 deletions
|
@ -4,15 +4,29 @@ call plug#begin('~/.local/share/nvim/plugged')
|
||||||
|
|
||||||
" Base
|
" Base
|
||||||
Plug 'tpope/vim-sensible'
|
Plug 'tpope/vim-sensible'
|
||||||
Plug 'tpope/vim-commentary'
|
|
||||||
Plug 'christoomey/vim-tmux-navigator' " add seamless movement between vim and tmux
|
Plug 'christoomey/vim-tmux-navigator' " add seamless movement between vim and tmux
|
||||||
|
|
||||||
|
" Workflow
|
||||||
|
Plug 'tpope/vim-commentary' " easily toggle comments for lines, paragrapgs etc
|
||||||
|
Plug 'jiangmiao/auto-pairs' " Auto close brackets and ''
|
||||||
|
|
||||||
" Ecosystem
|
" Ecosystem
|
||||||
" Plug 'tpope/vim-fugitive' - Will have to take a closer look some other time
|
" Plug 'tpope/vim-fugitive' - Will have to take a closer look some other time
|
||||||
Plug 'scrooloose/nerdtree'
|
Plug 'scrooloose/nerdtree' " directory thingy - perhaps replace it with something more efficient
|
||||||
|
Plug 'Yggdroot/LeaderF' " fuzzy matcher, apparently faster than fzf, ctrlp, unit, denite
|
||||||
|
|
||||||
" Language Integration
|
" Language Integration
|
||||||
|
Plug 'sheerun/vim-polyglot' " syntax plugins for almost every language
|
||||||
Plug 'stephpy/vim-yaml'
|
Plug 'stephpy/vim-yaml'
|
||||||
|
Plug 'mhartington/nvim-typescript', {'do': './install.sh'}
|
||||||
|
|
||||||
|
" HTML Workflow
|
||||||
|
Plug 'valloric/matchtagalways'
|
||||||
|
Plug 'alvan/vim-closetag'
|
||||||
|
|
||||||
|
" For async completion
|
||||||
|
Plug 'Shougo/deoplete.nvim' " automatic suggestions, can also perhaps be changed for newer plugs
|
||||||
|
Plug 'w0rp/ale' " asynchronous linting - might be superseded by lsp or coc.nvim at some point
|
||||||
|
|
||||||
" Design
|
" Design
|
||||||
Plug 'vim-airline/vim-airline'
|
Plug 'vim-airline/vim-airline'
|
||||||
|
@ -48,6 +62,24 @@ let g:tmuxline_preset = {
|
||||||
" automatically save the current buffer when navigating away from vim
|
" automatically save the current buffer when navigating away from vim
|
||||||
let g:tmux_navigator_save_on_switch = 1
|
let g:tmux_navigator_save_on_switch = 1
|
||||||
|
|
||||||
|
" enable deoplete at startup
|
||||||
|
let g:deoplete#enable_at_startup = 1
|
||||||
|
let g:deoplete#enable_ignore_case = 1
|
||||||
|
let g:deoplete#enable_smart_case = 1
|
||||||
|
let g:deoplete#enable_camel_case = 1
|
||||||
|
let g:deoplete#enable_refresh_always = 1
|
||||||
|
let g:deoplete#max_abbr_width = 0
|
||||||
|
let g:deoplete#max_menu_width = 0
|
||||||
|
let g:deoplete#omni#input_patterns = get(g:,'deoplete#omni#input_patterns',{})
|
||||||
|
|
||||||
|
let g:ale_fix_on_save = 1
|
||||||
|
let g:ale_fixers = {
|
||||||
|
\'javascipt': ['eslint', 'prettier'],
|
||||||
|
\'html': ['tidy','prettier'],
|
||||||
|
\'typescript': ['prettier','tslint'],
|
||||||
|
\'*': ['remove_trailing_lines', 'trim_whitespace'],
|
||||||
|
\}
|
||||||
|
|
||||||
" VIM SETTINGS
|
" VIM SETTINGS
|
||||||
" set truecolor (neovim)
|
" set truecolor (neovim)
|
||||||
set termguicolors
|
set termguicolors
|
||||||
|
@ -58,9 +90,9 @@ set termguicolors
|
||||||
" sets tabs to be 4 characters, expanded into spaces, but still removable with
|
" sets tabs to be 4 characters, expanded into spaces, but still removable with
|
||||||
" one press of backspace.
|
" one press of backspace.
|
||||||
" great explanation: http://vimcasts.org/transcripts/2/en/
|
" great explanation: http://vimcasts.org/transcripts/2/en/
|
||||||
set tabstop=4
|
set tabstop=2
|
||||||
set shiftwidth=4
|
set shiftwidth=2
|
||||||
set softtabstop=4
|
set softtabstop=2
|
||||||
set expandtab
|
set expandtab
|
||||||
|
|
||||||
" shows linenumbers relative to the one you are on, for easy movement and
|
" shows linenumbers relative to the one you are on, for easy movement and
|
||||||
|
@ -83,6 +115,10 @@ au FocusLost * :wa
|
||||||
" care of it
|
" care of it
|
||||||
set noshowmode
|
set noshowmode
|
||||||
|
|
||||||
|
" highlight everything that goes over 80 columns
|
||||||
|
highlight ColorColumn ctermbg=magenta
|
||||||
|
call matchadd('ColorColumn', '\%81v', 100)
|
||||||
|
|
||||||
" KEYBINDINGS
|
" KEYBINDINGS
|
||||||
"
|
"
|
||||||
" set our leader key to space since with hjkl, space is largely useless
|
" set our leader key to space since with hjkl, space is largely useless
|
||||||
|
@ -115,7 +151,7 @@ nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR>
|
||||||
|
|
||||||
" 'open new tab' with leader-t (opens new buffer and switches to it)
|
" 'open new tab' with leader-t (opens new buffer and switches to it)
|
||||||
" open actual new tab with leader-T
|
" open actual new tab with leader-T
|
||||||
nnoremap <leader>t <C-w>v<C-w><C-w>:NERDTreeToggle<cr>
|
nnoremap <leader>t :vsp .<cr>
|
||||||
nnoremap <leader>T :tabedit .<cr>
|
nnoremap <leader>T :tabedit .<cr>
|
||||||
|
|
||||||
" save current buffer with Ctrl-s
|
" save current buffer with Ctrl-s
|
||||||
|
|
Loading…
Reference in a new issue