default-config.lua 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. CONFIG_PATH = vim.fn.stdpath "config"
  2. DATA_PATH = vim.fn.stdpath "data"
  3. CACHE_PATH = vim.fn.stdpath "cache"
  4. TERMINAL = vim.fn.expand "$TERMINAL"
  5. O = {
  6. auto_close_tree = 0,
  7. auto_complete = true,
  8. colorscheme = "lunar",
  9. hidden_files = true,
  10. wrap_lines = false,
  11. number = true,
  12. relative_number = true,
  13. cursorline = true,
  14. shell = "bash",
  15. timeoutlen = 100,
  16. nvim_tree_disable_netrw = 0,
  17. extras = false,
  18. ignore_case = true,
  19. smart_case = true,
  20. lushmode = false,
  21. hl_search = false,
  22. transparent_window = false,
  23. leader_key = "space",
  24. vnsip_dir = vim.fn.stdpath "config" .. "/snippets",
  25. -- @usage pass a table with your desired languages
  26. treesitter = {
  27. ensure_installed = "all",
  28. ignore_install = { "haskell" },
  29. highlight = { enabled = true },
  30. rainbow = { enabled = false },
  31. },
  32. database = { save_location = "~/.config/nvcode_db", auto_execute = 1 },
  33. plugin = {
  34. hop = { active = false },
  35. dial = { active = false },
  36. dashboard = { active = false },
  37. matchup = { active = false },
  38. colorizer = { active = false },
  39. numb = { active = false },
  40. zen = { active = false },
  41. ts_playground = { active = false },
  42. indent_line = { active = false },
  43. ts_context_commentstring = { active = false },
  44. symbol_outline = { active = false },
  45. debug = { active = false },
  46. bqf = { active = false },
  47. trouble = { active = false },
  48. floatterm = { active = false },
  49. spectre = { active = false },
  50. lsp_rooter = { active = false },
  51. markdown_preview = { active = false },
  52. codi = { active = false },
  53. telescope_fzy = { active = false },
  54. sanegx = { active = false },
  55. snap = { active = false },
  56. ranger = { active = false },
  57. todo_comments = { active = false },
  58. lsp_colors = { active = false },
  59. git_blame = { active = false },
  60. gist = { active = false },
  61. gitlinker = { active = false },
  62. lazygit = { active = false },
  63. octo = { active = false },
  64. lush = { active = false },
  65. diffview = { active = false },
  66. bracey = { active = false },
  67. telescope_project = { active = false },
  68. dap_install = { active = false },
  69. tabnine = { active = false },
  70. },
  71. lang = {
  72. python = {
  73. linter = "",
  74. -- @usage can be 'yapf', 'black'
  75. formatter = "",
  76. autoformat = false,
  77. isort = false,
  78. diagnostics = {
  79. virtual_text = { spacing = 0, prefix = "" },
  80. signs = true,
  81. underline = true,
  82. },
  83. analysis = {
  84. type_checking = "basic",
  85. auto_search_paths = true,
  86. use_library_code_types = true,
  87. },
  88. },
  89. dart = {
  90. sdk_path = "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot",
  91. },
  92. lua = {
  93. -- @usage can be 'lua-format'
  94. formatter = "",
  95. autoformat = false,
  96. diagnostics = {
  97. virtual_text = { spacing = 0, prefix = "" },
  98. signs = true,
  99. underline = true,
  100. },
  101. },
  102. sh = {
  103. -- @usage can be 'shellcheck'
  104. linter = "",
  105. -- @usage can be 'shfmt'
  106. formatter = "",
  107. autoformat = false,
  108. diagnostics = {
  109. virtual_text = { spacing = 0, prefix = "" },
  110. signs = true,
  111. underline = true,
  112. },
  113. },
  114. tsserver = {
  115. -- @usage can be 'eslint'
  116. linter = "",
  117. -- @usage can be 'prettier'
  118. formatter = "",
  119. autoformat = false,
  120. diagnostics = {
  121. virtual_text = { spacing = 0, prefix = "" },
  122. signs = true,
  123. underline = true,
  124. },
  125. },
  126. json = {
  127. -- @usage can be 'prettier'
  128. formatter = "",
  129. autoformat = false,
  130. diagnostics = {
  131. virtual_text = { spacing = 0, prefix = "" },
  132. signs = true,
  133. underline = true,
  134. },
  135. },
  136. tailwindcss = {
  137. filetypes = {
  138. "html",
  139. "css",
  140. "scss",
  141. "javascript",
  142. "javascriptreact",
  143. "typescript",
  144. "typescriptreact",
  145. },
  146. },
  147. clang = {
  148. diagnostics = {
  149. virtual_text = { spacing = 0, prefix = "" },
  150. signs = true,
  151. underline = true,
  152. },
  153. cross_file_rename = true,
  154. header_insertion = "never",
  155. autoformat = false, -- update this to true for enabling autoformat
  156. },
  157. ruby = {
  158. diagnostics = {
  159. virtualtext = { spacing = 0, prefix = "" },
  160. signs = true,
  161. underline = true,
  162. },
  163. filetypes = { "rb", "erb", "rakefile", "ruby" },
  164. },
  165. go = {},
  166. elixir = {},
  167. vim = {},
  168. yaml = {},
  169. terraform = {},
  170. rust = {
  171. rust_tools = {
  172. active = false,
  173. },
  174. linter = "",
  175. formatter = "",
  176. autoformat = false,
  177. diagnostics = {
  178. virtual_text = { spacing = 0, prefix = "" },
  179. signs = true,
  180. underline = true,
  181. },
  182. },
  183. svelte = {},
  184. php = {
  185. format = {
  186. braces = "psr12",
  187. },
  188. environment = {
  189. php_version = "7.4",
  190. },
  191. autoformat = false,
  192. diagnostics = {
  193. virtual_text = { spacing = 0, prefix = "" },
  194. signs = true,
  195. underline = true,
  196. },
  197. filetypes = { "php", "phtml" },
  198. },
  199. latex = {},
  200. kotlin = {},
  201. html = {},
  202. elm = {},
  203. emmet = { active = true },
  204. graphql = {},
  205. efm = {},
  206. docker = {},
  207. cmake = {},
  208. java = {},
  209. css = {
  210. formatter = "",
  211. autoformat = false,
  212. virtual_text = true,
  213. },
  214. },
  215. dashboard = {
  216. custom_header = {
  217. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  218. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣤⣶⣾⠿⠿⠟⠛⠛⠛⠛⠿⠿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  219. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⡿⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  220. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  221. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠒⠂⠉⠉⠉⠉⢩⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  222. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⢰⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  223. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠠⡀⠀⠀⢀⣾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  224. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⢀⣸⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  225. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡧⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  226. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠈⠁⠒⠤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  227. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣇⠀⠀⠀⠀⠀⠀⠉⠢⠤⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡟⠈⠑⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  228. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠑⠒⠤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⡇⠀⠀⢀⣣⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  229. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠀⠒⠢⠤⠄⣀⣀⠀⠀⠀⢠⣿⡟⠀⠀⠀⣺⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  230. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠇⠀⠀⠀⠀⠀⣤⡄⠀⠀⢠⣤⡄⠀⢨⣭⣠⣤⣤⣤⡀⠀⠀⢀⣤⣤⣤⣤⡄⠀⠀⠀⣤⣄⣤⣤⣤⠀⠀⣿⣯⠉⠉⣿⡟⠀⠈⢩⣭⣤⣤⠀⠀⠀⠀⣠⣤⣤⣤⣄⣤⣤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  231. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⠀⠀⠀⠀⠀⠀⣿⠃⠀⠀⣸⣿⠁⠀⣿⣿⠉⠀⠈⣿⡇⠀⠀⠛⠋⠀⠀⢹⣿⠀⠀⠀⣿⠏⠀⠸⠿⠃⠀⣿⣿⠀⣰⡟⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⣿⡟⢸⣿⡇⢀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  232. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡇⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⣿⡟⠀⢠⣿⡇⠀⠀⢰⣿⡇⠀⣰⣾⠟⠛⠛⣻⡇⠀⠀⢸⡿⠀⠀⠀⠀⠀⠀⢻⣿⢰⣿⠀⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⢸⣿⠇⢸⣿⠀⢸⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  233. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧⣤⣤⣤⡄⠀⠘⣿⣤⣤⡤⣿⠇⠀⢸⣿⠁⠀⠀⣼⣿⠀⠀⢿⣿⣤⣤⠔⣿⠃⠀⠀⣾⡇⠀⠀⠀⠀⠀⠀⢸⣿⣿⠋⠀⠀⠀⢠⣤⣤⣿⣥⣤⡄⠀⣼⣿⠀⣸⡏⠀⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  234. "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠁⠀⠀⠈⠉⠉⠀⠉⠀⠀⠈⠉⠀⠀⠀⠉⠉⠀⠀⠀⠉⠉⠁⠈⠉⠀⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠀⠀⠀⠀⠈⠉⠉⠉⠉⠉⠁⠀⠉⠁⠀⠉⠁⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀",
  235. },
  236. footer = { "chrisatmachine.com" },
  237. },
  238. }
  239. -- TODO find a new home for these autocommands
  240. require("lv-utils").define_augroups {
  241. _general_settings = {
  242. {
  243. "TextYankPost",
  244. "*",
  245. "lua require('vim.highlight').on_yank({higroup = 'Search', timeout = 200})",
  246. },
  247. {
  248. "BufWinEnter",
  249. "*",
  250. "setlocal formatoptions-=c formatoptions-=r formatoptions-=o",
  251. },
  252. {
  253. "BufRead",
  254. "*",
  255. "setlocal formatoptions-=c formatoptions-=r formatoptions-=o",
  256. },
  257. {
  258. "BufNewFile",
  259. "*",
  260. "setlocal formatoptions-=c formatoptions-=r formatoptions-=o",
  261. },
  262. { "VimLeavePre", "*", "set title set titleold=" },
  263. { "FileType", "qf", "set nobuflisted" },
  264. },
  265. -- _solidity = {
  266. -- {'BufWinEnter', '.sol', 'setlocal filetype=solidity'}, {'BufRead', '*.sol', 'setlocal filetype=solidity'},
  267. -- {'BufNewFile', '*.sol', 'setlocal filetype=solidity'}
  268. -- },
  269. -- _gemini = {
  270. -- {'BufWinEnter', '.gmi', 'setlocal filetype=markdown'}, {'BufRead', '*.gmi', 'setlocal filetype=markdown'},
  271. -- {'BufNewFile', '*.gmi', 'setlocal filetype=markdown'}
  272. -- },
  273. _markdown = {
  274. { "FileType", "markdown", "setlocal wrap" },
  275. { "FileType", "markdown", "setlocal spell" },
  276. },
  277. _buffer_bindings = {
  278. { "FileType", "floaterm", "nnoremap <silent> <buffer> q :q<CR>" },
  279. },
  280. }