default-config.lua 5.7 KB

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