Last active
September 30, 2022 01:43
-
-
Save DonnieWest/a91e1cfa46316e47d24e1090bcc77a0e to your computer and use it in GitHub Desktop.
Some prettier configs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let s:formatprg = findfile('node_modules/.bin/prettier-eslint', '.;') | |
if !executable(s:formatprg) | |
let s:formatprg = findfile('node_modules/.bin/prettier', '.;') | |
endif | |
if !executable(s:formatprg) | |
let s:formatprg = exepath('prettier-eslint') | |
endif | |
if !executable(s:formatprg) | |
let s:formatprg = exepath('prettier') | |
endif | |
let &l:formatprg = s:formatprg . ' --stdin' | |
if executable('node_modules/.bin/flow') | |
let b:neomake_javascript_flow_exe = 'node_modules/.bin/flow' | |
endif | |
" Use formatprg when available | |
let g:neoformat_try_formatprg = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let s:formatprg = findfile('node_modules/.bin/prettier-eslint', '.;') | |
if !executable(s:formatprg) | |
let s:formatprg = findfile('node_modules/.bin/prettier-tslint', '.;') | |
endif | |
if !executable(s:formatprg) | |
let s:formatprg = findfile('node_modules/.bin/prettier', '.;') | |
endif | |
if !executable(s:formatprg) | |
let s:formatprg = exepath('prettier-eslint') | |
endif | |
if !executable(s:formatprg) | |
let s:formatprg = exepath('prettier') | |
endif | |
let &l:formatprg = s:formatprg . ' --stdin' | |
" Use formatprg when available | |
let g:neoformat_try_formatprg = 1 | |
runtime plugin/neomake-local-eslint.vim | |
let b:neomake_typescript_eslint_exe = GetNpmBin('eslint') | |
if (executable(findfile('node_modules/.bin/tslint', '.;'))) | |
let g:neomake_typescript_enabled_makers = ['tsc', 'tslint'] | |
else | |
let g:neomake_typescript_enabled_makers = ['tsc', 'eslint'] | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment