default-config.lua 5.8 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. ts_playground = { 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. debug = { active = false },
  81. dap_install = { active = false },
  82. lush = { active = false },
  83. diffview = { active = false },
  84. },
  85. user_which_key = {},
  86. user_plugins = {
  87. -- use lv-config.lua for this not put here
  88. },
  89. user_autocommands = {
  90. { "FileType", "qf", "set nobuflisted" },
  91. },
  92. lang = {
  93. cmake = {},
  94. clang = {
  95. diagnostics = {
  96. virtual_text = { spacing = 0, prefix = "" },
  97. signs = true,
  98. underline = true,
  99. },
  100. cross_file_rename = true,
  101. header_insertion = "never",
  102. },
  103. css = {
  104. virtual_text = true,
  105. },
  106. dart = {
  107. sdk_path = "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot",
  108. },
  109. docker = {},
  110. efm = {},
  111. elm = {},
  112. emmet = { active = true },
  113. elixir = {},
  114. graphql = {},
  115. go = {},
  116. html = {},
  117. java = {
  118. java_tools = {
  119. active = false,
  120. },
  121. },
  122. json = {
  123. diagnostics = {
  124. virtual_text = { spacing = 0, prefix = "" },
  125. signs = true,
  126. underline = true,
  127. },
  128. },
  129. kotlin = {},
  130. latex = {},
  131. lua = {
  132. diagnostics = {
  133. virtual_text = { spacing = 0, prefix = "" },
  134. signs = true,
  135. underline = true,
  136. },
  137. },
  138. php = {
  139. format = {
  140. format = {
  141. default = "psr12",
  142. },
  143. },
  144. environment = {
  145. php_version = "7.4",
  146. },
  147. diagnostics = {
  148. virtual_text = { spacing = 0, prefix = "" },
  149. signs = true,
  150. underline = true,
  151. },
  152. filetypes = { "php", "phtml" },
  153. },
  154. python = {
  155. linter = "",
  156. isort = false,
  157. diagnostics = {
  158. virtual_text = { spacing = 0, prefix = "" },
  159. signs = true,
  160. underline = true,
  161. },
  162. analysis = {
  163. type_checking = "basic",
  164. auto_search_paths = true,
  165. use_library_code_types = true,
  166. },
  167. },
  168. ruby = {
  169. diagnostics = {
  170. virtualtext = { spacing = 0, prefix = "" },
  171. signs = true,
  172. underline = true,
  173. },
  174. filetypes = { "rb", "erb", "rakefile", "ruby" },
  175. },
  176. rust = {
  177. rust_tools = {
  178. active = false,
  179. parameter_hints_prefix = "<-",
  180. other_hints_prefix = "=>", -- prefix for all the other hints (type, chaining)
  181. },
  182. linter = "",
  183. diagnostics = {
  184. virtual_text = { spacing = 0, prefix = "" },
  185. signs = true,
  186. underline = true,
  187. },
  188. },
  189. sh = {
  190. -- @usage can be 'shellcheck'
  191. linter = "",
  192. -- @usage can be 'shfmt'
  193. diagnostics = {
  194. virtual_text = { spacing = 0, prefix = "" },
  195. signs = true,
  196. underline = true,
  197. },
  198. },
  199. svelte = {},
  200. tailwindcss = {
  201. active = false,
  202. filetypes = {
  203. "html",
  204. "css",
  205. "scss",
  206. "javascript",
  207. "javascriptreact",
  208. "typescript",
  209. "typescriptreact",
  210. },
  211. },
  212. terraform = {},
  213. tsserver = {
  214. -- @usage can be 'eslint'
  215. linter = "",
  216. diagnostics = {
  217. virtual_text = { spacing = 0, prefix = "" },
  218. signs = true,
  219. underline = true,
  220. },
  221. },
  222. vim = {},
  223. yaml = {},
  224. },
  225. }
  226. require "lv-zen.config"
  227. require "lv-compe.config"
  228. require "lv-dashboard.config"
  229. require "lv-floatterm.config"
  230. require "lv-galaxyline.config"
  231. require "lv-gitsigns.config"
  232. require "lv-telescope.config"