default-config.lua 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  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. USER = vim.fn.expand "$USER"
  6. O = {
  7. leader_key = "space",
  8. colorscheme = "spacegray",
  9. transparent_window = false,
  10. format_on_save = true,
  11. vnsip_dir = vim.fn.stdpath "config" .. "/snippets",
  12. -- TODO refactor for tree
  13. auto_close_tree = 0,
  14. nvim_tree_disable_netrw = 0,
  15. -- TODO refactor treesitter
  16. -- @usage pass a table with your desired languages
  17. treesitter = {
  18. ensure_installed = "all",
  19. ignore_install = { "haskell" },
  20. highlight = { enabled = true },
  21. -- The below are for treesitter-textobjects plugin
  22. textobj_prefixes = {
  23. goto_next = "]", -- Go to next
  24. goto_previous = "[", -- Go to previous
  25. inner = "i", -- Select inside
  26. outer = "a", -- Selct around
  27. swap = "<leader>a", -- Swap with next
  28. },
  29. textobj_suffixes = {
  30. -- Start and End respectively for the goto keys
  31. -- for other keys it only uses the first
  32. ["function"] = { "f", "F" },
  33. ["class"] = { "m", "M" },
  34. ["parameter"] = { "a", "A" },
  35. ["block"] = { "k", "K" },
  36. ["conditional"] = { "i", "I" },
  37. ["call"] = { "c", "C" },
  38. ["loop"] = { "l", "L" },
  39. ["statement"] = { "s", "S" },
  40. ["comment"] = { "/", "?" },
  41. },
  42. -- The below is for treesitter hint textobjects plugin
  43. hint_labels = { "h", "j", "f", "d", "n", "v", "s", "l", "a" },
  44. },
  45. lsp = {
  46. document_highlight = true,
  47. popup_border = "single",
  48. },
  49. database = { save_location = "~/.config/lunarvim_db", auto_execute = 1 },
  50. plugin = {
  51. -- Builtins
  52. diffview = { active = false },
  53. ts_context_commentstring = { active = false },
  54. ts_hintobjects = { active = false },
  55. ts_autotag = { active = false },
  56. ts_rainbow = { active = false },
  57. ts_textobjects = { active = false },
  58. ts_textsubjects = { active = false },
  59. telescope_fzy = { active = false },
  60. telescope_project = { active = false },
  61. indent_line = { active = false },
  62. lush = { active = false },
  63. },
  64. -- TODO just using mappings (leader mappings)
  65. user_which_key = {},
  66. user_plugins = {
  67. -- use lv-config.lua for this not put here
  68. },
  69. user_autocommands = {
  70. { "FileType", "qf", "set nobuflisted" },
  71. },
  72. lang = {
  73. cmake = {},
  74. clang = {
  75. diagnostics = {
  76. virtual_text = { spacing = 0, prefix = "" },
  77. signs = true,
  78. underline = true,
  79. },
  80. cross_file_rename = true,
  81. header_insertion = "never",
  82. },
  83. css = {
  84. virtual_text = true,
  85. },
  86. dart = {
  87. sdk_path = "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot",
  88. },
  89. docker = {},
  90. efm = {},
  91. elm = {},
  92. emmet = { active = true },
  93. elixir = {},
  94. graphql = {},
  95. go = {},
  96. html = {},
  97. java = {
  98. java_tools = {
  99. active = false,
  100. },
  101. },
  102. json = {
  103. diagnostics = {
  104. virtual_text = { spacing = 0, prefix = "" },
  105. signs = true,
  106. underline = true,
  107. },
  108. },
  109. kotlin = {},
  110. latex = {},
  111. lua = {
  112. diagnostics = {
  113. virtual_text = { spacing = 0, prefix = "" },
  114. signs = true,
  115. underline = true,
  116. },
  117. },
  118. php = {
  119. format = {
  120. format = {
  121. default = "psr12",
  122. },
  123. },
  124. environment = {
  125. php_version = "7.4",
  126. },
  127. diagnostics = {
  128. virtual_text = { spacing = 0, prefix = "" },
  129. signs = true,
  130. underline = true,
  131. },
  132. filetypes = { "php", "phtml" },
  133. },
  134. python = {
  135. linter = "",
  136. isort = false,
  137. diagnostics = {
  138. virtual_text = { spacing = 0, prefix = "" },
  139. signs = true,
  140. underline = true,
  141. },
  142. analysis = {
  143. type_checking = "basic",
  144. auto_search_paths = true,
  145. use_library_code_types = true,
  146. },
  147. },
  148. ruby = {
  149. diagnostics = {
  150. virtualtext = { spacing = 0, prefix = "" },
  151. signs = true,
  152. underline = true,
  153. },
  154. filetypes = { "rb", "erb", "rakefile", "ruby" },
  155. },
  156. rust = {
  157. rust_tools = {
  158. active = false,
  159. parameter_hints_prefix = "<-",
  160. other_hints_prefix = "=>", -- prefix for all the other hints (type, chaining)
  161. },
  162. linter = "",
  163. diagnostics = {
  164. virtual_text = { spacing = 0, prefix = "" },
  165. signs = true,
  166. underline = true,
  167. },
  168. },
  169. sh = {
  170. -- @usage can be 'shellcheck'
  171. linter = "",
  172. -- @usage can be 'shfmt'
  173. diagnostics = {
  174. virtual_text = { spacing = 0, prefix = "" },
  175. signs = true,
  176. underline = true,
  177. },
  178. },
  179. svelte = {},
  180. tailwindcss = {
  181. active = false,
  182. filetypes = {
  183. "html",
  184. "css",
  185. "scss",
  186. "javascript",
  187. "javascriptreact",
  188. "typescript",
  189. "typescriptreact",
  190. },
  191. },
  192. terraform = {},
  193. tsserver = {
  194. -- @usage can be 'eslint'
  195. linter = "",
  196. diagnostics = {
  197. virtual_text = { spacing = 0, prefix = "" },
  198. signs = true,
  199. underline = true,
  200. },
  201. },
  202. vim = {},
  203. yaml = {},
  204. },
  205. }
  206. require "lv-zen.config"
  207. require "lv-compe.config"
  208. require "lv-dashboard.config"
  209. require "lv-floatterm.config"
  210. require "lv-galaxyline.config"
  211. require "lv-gitsigns.config"
  212. require "lv-telescope.config"
  213. require "lv-dap.config"
  214. require "lv-which-key.config"