Browse Source

Add prettier as plugin

coc
Schneider 5 years ago
parent
commit
f7056ebef3
Signed by: schneider GPG Key ID: 3F50B02A50039F3B
  1. 9
      init.vim
  2. 2
      vim/ftplugin/json.vim

9
init.vim

@ -31,6 +31,7 @@ Plug 'airblade/vim-gitgutter' " git status in gutter column
Plug 'radenling/vim-dispatch-neovim' " support for :Start command, needed in dadbod Plug 'radenling/vim-dispatch-neovim' " support for :Start command, needed in dadbod
Plug 'lambdalisue/suda.vim' " As w!! did not work anymore in nvim Plug 'lambdalisue/suda.vim' " As w!! did not work anymore in nvim
Plug 'https://github.com/alok/notational-fzf-vim' " note taking Plug 'https://github.com/alok/notational-fzf-vim' " note taking
Plug 'prettier/vim-prettier', { 'do': 'npm install' } " prettier integration
" html / templates{{{ " html / templates{{{
Plug 'mattn/emmet-vim', { 'for': ['html', 'php', 'gohtmltmpl', 'vue', 'markdown'] } " emmet support for vim - easily create markdup wth CSS-like syntax Plug 'mattn/emmet-vim', { 'for': ['html', 'php', 'gohtmltmpl', 'vue', 'markdown'] } " emmet support for vim - easily create markdup wth CSS-like syntax
@ -43,8 +44,6 @@ Plug 'Glench/Vim-Jinja2-Syntax', { 'for': ['html'] }
" JavaScript{{{ " JavaScript{{{
Plug 'gavocanov/vim-js-indent', { 'for': [ 'javascript' ]} " JavaScript indent support Plug 'gavocanov/vim-js-indent', { 'for': [ 'javascript' ]} " JavaScript indent support
Plug 'moll/vim-node', { 'for': [ 'javascript', 'vue' ]} " node support Plug 'moll/vim-node', { 'for': [ 'javascript', 'vue' ]} " node support
"Plug 'othree/yajs.vim', { 'for': [ 'javascript', 'vue' ]} " JavaScript syntax plugin
"Plug 'othree/es.next.syntax.vim', { 'for': [ 'javascript', 'vue' ]} " ES6 and beyond syntax
Plug 'https://github.com/othree/jspc.vim', { 'for': [ 'javascript', 'vue' ]} " Function parameter completion Plug 'https://github.com/othree/jspc.vim', { 'for': [ 'javascript', 'vue' ]} " Function parameter completion
Plug 'heavenshell/vim-jsdoc', { 'for': [ 'javascript', 'vue' ]} " Generate JSDoc comments Plug 'heavenshell/vim-jsdoc', { 'for': [ 'javascript', 'vue' ]} " Generate JSDoc comments
Plug 'posva/vim-vue', { 'for': [ 'javascript', 'html', 'vue' ] } " vue.js integration Plug 'posva/vim-vue', { 'for': [ 'javascript', 'html', 'vue' ] } " vue.js integration
@ -241,11 +240,15 @@ let g:neocomplete#sources#omni#input_patterns.tex =
\ . ')' \ . ')'
"}}} "}}}
" C/C++
" C/C++ {{{
autocmd FileType c,cpp,objc nnoremap <buffer><Leader>f :<C-u>ClangFormat<CR> autocmd FileType c,cpp,objc nnoremap <buffer><Leader>f :<C-u>ClangFormat<CR>
autocmd FileType c,cpp,objc vnoremap <buffer><Leader>f :ClangFormat<CR> autocmd FileType c,cpp,objc vnoremap <buffer><Leader>f :ClangFormat<CR>
"}}} "}}}
" Prettier
let g:prettier#config#tab_width = 4
let g:prettier#exec_cmd_async = 1
" Completion {{{ " Completion {{{
" if hidden is not set, TextEdit might fail. " if hidden is not set, TextEdit might fail.

2
vim/ftplugin/json.vim

@ -0,0 +1,2 @@
let g:ale_fixers['json'] = ['prettier']
let g:ale_fix_on_save = 1
Loading…
Cancel
Save