lv-config.lua 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. --[[
  2. O is the global options object
  3. Formatters and linters should be
  4. filled in as strings with either
  5. a global executable or a path to
  6. an executable
  7. ]] -- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
  8. -- general
  9. O.auto_complete = true
  10. O.colorscheme = 'lunar'
  11. -- TODO is there a lua native way to do this?
  12. vim.cmd('colorscheme ' .. O.colorscheme)
  13. O.auto_close_tree = 0
  14. O.wrap_lines = false
  15. O.timeoutlen = 100
  16. O.document_highlight = true
  17. O.extras = false
  18. O.leader_key = ' '
  19. O.ignore_case = true
  20. O.smart_case = true
  21. -- After changing plugin config it is recommended to run :PackerCompile
  22. O.plugin.hop.active = false
  23. O.plugin.dial.active = false
  24. O.plugin.dashboard.active = true
  25. O.plugin.matchup.active = false
  26. O.plugin.colorizer.active = false
  27. O.plugin.numb.active = false
  28. O.plugin.ts_playground.active = false
  29. O.plugin.indent_line.active = false
  30. O.plugin.gitlinker.active = false
  31. O.plugin.zen.active = false
  32. -- dashboard
  33. -- O.dashboard.custom_header = {""}
  34. -- O.dashboard.footer = {""}
  35. -- if you don't want all the parsers change this to a table of the ones you want
  36. O.treesitter.ensure_installed = "all"
  37. O.treesitter.ignore_install = {"haskell"}
  38. O.treesitter.highlight.enabled = true
  39. O.lang.clang.diagnostics.virtual_text = false
  40. O.lang.clang.diagnostics.signs = false
  41. O.lang.clang.diagnostics.underline = false
  42. -- python
  43. -- add things like O.python.formatter.yapf.exec_path
  44. -- add things like O.python.linter.flake8.exec_path
  45. -- add things like O.python.formatter.isort.exec_path
  46. O.lang.python.formatter = 'yapf'
  47. -- O.python.linter = 'flake8'
  48. O.lang.python.active = true
  49. O.lang.python.isort = true
  50. O.lang.python.autoformat = true
  51. O.lang.python.diagnostics.virtual_text = true
  52. O.lang.python.diagnostics.signs = true
  53. O.lang.python.diagnostics.underline = true
  54. O.lang.python.analysis.type_checking = "off"
  55. O.lang.python.analysis.auto_search_paths = true
  56. O.lang.python.analysis.use_library_code_types = true
  57. -- lua
  58. -- TODO look into stylua
  59. O.lang.lua.active = true
  60. O.lang.lua.formatter = 'lua-format'
  61. -- O.lua.formatter = 'lua-format'
  62. O.lang.lua.autoformat = false
  63. -- javascript
  64. O.lang.tsserver.formatter = 'prettier'
  65. O.lang.tsserver.linter = nil
  66. O.lang.tsserver.autoformat = true
  67. -- json
  68. O.lang.json.active = false
  69. O.lang.json.autoformat = true
  70. -- ruby
  71. O.lang.ruby.autoformat = true
  72. -- go
  73. O.lang.go.autoformat = true
  74. -- rust
  75. O.lang.rust.autoformat = true
  76. -- create custom autocommand field (This would be easy with lua)
  77. -- Turn off relative_numbers
  78. -- O.relative_number = false
  79. -- Turn off cursorline
  80. -- O.cursorline = false
  81. -- Neovim turns the default cursor to 'Block'
  82. -- when switched back into terminal.
  83. -- This below line fixes that. Uncomment if needed.
  84. -- vim.cmd('autocmd VimLeave,VimSuspend * set guicursor=a:ver90') -- Beam
  85. -- vim.cmd('autocmd VimLeave,VimSuspend * set guicursor=a:hor20') -- Underline
  86. -- NOTE: Above code doesn't take a value from the terminal's cursor and
  87. -- replace it. It hardcodes the cursor shape.
  88. -- And I think `ver` means vertical and `hor` means horizontal.
  89. -- The numbers didn't make a difference in alacritty. Please change
  90. -- the number to something that suits your needs if it looks weird.
  91. -- TODO
  92. -- custom autocommands
  93. -- user defined plugin config
  94. -- custom settings