Browse Source

add neoformat

Signed-off-by: surenyi <surenyi82@qq.com>
master
surenyi 2 years ago
parent
commit
e50fe9a254
  1. 2
      linter/.clang-format
  2. 32
      vim9/vimrc

2
linter/.clang-format

@ -123,5 +123,5 @@ SpacesInParentheses: false
SpacesInSquareBrackets: false SpacesInSquareBrackets: false
Standard: Cpp03 Standard: Cpp03
TabWidth: 4 TabWidth: 4
UseTab: AlignWithSpaces UseTab: Never
... ...

32
vim9/vimrc

@ -106,6 +106,7 @@ Plug 'kana/vim-textobj-line'
Plug 'wellle/targets.vim' Plug 'wellle/targets.vim'
Plug 'fatih/vim-go' Plug 'fatih/vim-go'
Plug 'sbdchd/neoformat'
Plug 'jlanzarotta/bufexplorer' Plug 'jlanzarotta/bufexplorer'
Plug 'joshdick/onedark.vim' Plug 'joshdick/onedark.vim'
@ -131,7 +132,6 @@ Plug 'mbbill/undotree'
Plug 'voldikss/vim-floaterm' Plug 'voldikss/vim-floaterm'
Plug 'voldikss/LeaderF-floaterm' Plug 'voldikss/LeaderF-floaterm'
Plug 'skywind3000/asyncrun.vim' Plug 'skywind3000/asyncrun.vim'
Plug 'ptzz/lf.vim'
Plug 'lervag/vimtex' Plug 'lervag/vimtex'
@ -190,7 +190,6 @@ Plug 'machakann/vim-highlightedyank'
call plug#end() call plug#end()
let g:deoplete#enable_at_startup = 1 let g:deoplete#enable_at_startup = 1
let g:lf_map_keys = 0
"}}} "}}}
"{{{ mapleader=SPACE "{{{ mapleader=SPACE
@ -540,18 +539,13 @@ if has('win32')
endif endif
"}}} "}}}
"{{{ lf.vim
let g:NERDTreeHijackNetrw = 0 " Add this line if you use NERDTree
let g:lf_replace_netrw = 1 " Open lf when vim opens a directory
"}}}
" {{{ Gui " {{{ Gui
winpos 300 0 winpos 300 0
set lines=64 columns=120 set lines=64 columns=120
set guioptions-=T set guioptions-=T
set guioptions-=r set guioptions-=r
set guifont=Sarasa\ Mono\ SC\ Nerd:h16 set guifont=Sarasa\ Mono\ SC\ Nerd:h14
" }}} " }}}
"{{{ deoplete keymap "{{{ deoplete keymap
@ -591,3 +585,25 @@ set updatetime=100
" {{{ identLine " {{{ identLine
"let g:indentLine_setColors = 0 "let g:indentLine_setColors = 0
" }}} " }}}
" {{{ Neoformat
" Enable alignment
" let g:neoformat_basic_format_align = 1
" Enable tab to spaces conversion
" let g:neoformat_basic_format_retab = 1
" Enable trimmming of trailing whitespace
" let g:neoformat_basic_format_trim = 1
" let g:neoformat_only_msg_on_error = 1
let g:neoformat_c_clangformat={
\ 'exe': 'clang-format',
\ 'stdin' : 1,
\ 'args': ['-style=file:'.expand('~/clang-format')],
\ }
let g:neoformat_enabled_c = ['clangformat']
" }}}

Loading…
Cancel
Save