All of my important config files
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.9 KiB

3 years ago
  1. let b:ale_fixers = {}
  2. let b:ale_fixers['javascript'] = ['prettier']
  3. let b:ale_fixers['typescript'] = ['prettier']
  4. let b:ale_fixers['json'] = ['eslint']
  5. "let b:ale_javascript_prettier_options = '--no-semi --single-quote --tab-width 2'
  6. "let b:ale_typescript_prettier_options = '--no-semi --single-quote --tab-width 2'
  7. let b:ale_fixers['vue'] = ['prettier']
  8. let b:ale_vue_prettier_options = '--no-semi --single-quote'
  9. let b:ale_fix_on_save = 1
  10. let b:ale_javascript_prettier_use_local_config = 1
  11. let b:ale_typescript_prettier_use_local_config = 1
  12. let b:ale_fix_on_save = 0
  13. " config for local eslint
  14. g:ale_javascript_eslint_use_global = 1
  15. g:ale_javascript_eslint_executable = 'yarn'
  16. g:ale_javascript_eslint_options = 'run eslint'
  17. g:ale_typescript_eslint_use_global = 1
  18. g:ale_typescript_eslint_executable = 'yarn'
  19. g:ale_typescript_eslint_options = 'run eslint'
  20. g:ale_json_eslint_use_global = 1
  21. g:ale_json_eslint_executable = 'yarn'
  22. g:ale_json_eslint_options = 'run eslint'
  23. let g:jsdoc_formatter = 'tsdoc'
  24. let g:jsdoc_lehre_path = '/home/schneider/.yarn/bin/lehre'
  25. "autocmd bufwritepost *.js silent !standard --fix %
  26. setlocal wildignore+=node_modules
  27. setlocal tabstop=4
  28. setlocal shiftwidth=4
  29. " Create jsdoc with ,h
  30. nnoremap <leader><C-i> :JsDoc<CR>
  31. nnoremap <F8> Biawait <ESC>A
  32. nnoremap <F2> :Prettier<CR>
  33. lua <<EOF
  34. require'nvim-treesitter.configs'.setup {
  35. textobjects = {
  36. move = {
  37. enable = true,
  38. set_jumps = true, -- whether to set jumps in the jumplist
  39. goto_next_start = {
  40. ["]m"] = "@function.outer",
  41. ["]]"] = "@class.outer",
  42. },
  43. goto_next_end = {
  44. ["]M"] = "@function.outer",
  45. ["]["] = "@class.outer",
  46. },
  47. goto_previous_start = {
  48. ["[m"] = "@function.outer",
  49. ["[["] = "@class.outer",
  50. },
  51. goto_previous_end = {
  52. ["[M"] = "@function.outer",
  53. ["[]"] = "@class.outer",
  54. },
  55. },
  56. },
  57. }
  58. EOF