default-config.lua 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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. default_options = {
  13. backup = false, -- creates a backup file
  14. clipboard = "unnamedplus", -- allows neovim to access the system clipboard
  15. cmdheight = 2, -- more space in the neovim command line for displaying messages
  16. colorcolumn = "99999", -- fixes indentline for now
  17. completeopt = { "menuone", "noselect" },
  18. conceallevel = 0, -- so that `` is visible in markdown files
  19. fileencoding = "utf-8", -- the encoding written to a file
  20. guifont = "monospace:h17", -- the font used in graphical neovim applications
  21. hidden = true, -- required to keep multiple buffers and open multiple buffers
  22. hlsearch = false, -- highlight all matches on previous search pattern
  23. ignorecase = true, -- ignore case in search patterns
  24. mouse = "a", -- allow the mouse to be used in neovim
  25. pumheight = 10, -- pop up menu height
  26. showmode = false, -- we don't need to see things like -- INSERT -- anymore
  27. showtabline = 2, -- always show tabs
  28. smartcase = true, -- smart case
  29. smartindent = true, -- make indenting smarter again
  30. splitbelow = true, -- force all horizontal splits to go below current window
  31. splitright = true, -- force all vertical splits to go to the right of current window
  32. swapfile = false, -- creates a swapfile
  33. termguicolors = true, -- set term gui colors (most terminals support this)
  34. timeoutlen = 100, -- time to wait for a mapped sequence to complete (in milliseconds)
  35. title = true, -- set the title of window to the value of the titlestring
  36. -- opt.titlestring = "%<%F%=%l/%L - nvim" -- what the title of the window will be set to
  37. undodir = CACHE_PATH .. "/undo", -- set an undo directory
  38. undofile = true, -- enable persisten undo
  39. updatetime = 300, -- faster completion
  40. writebackup = false, -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
  41. expandtab = true, -- convert tabs to spaces
  42. shiftwidth = 2, -- the number of spaces inserted for each indentation
  43. tabstop = 2, -- insert 2 spaces for a tab
  44. cursorline = true, -- highlight the current line
  45. number = true, -- set numbered lines
  46. relativenumber = false, -- set relative numbered lines
  47. numberwidth = 4, -- set number column width to 2 {default 4}
  48. signcolumn = "yes", -- always show the sign column, otherwise it would shift the text each time
  49. wrap = false, -- display lines as one long line
  50. spell = false,
  51. spelllang = "en",
  52. scrolloff = 8, -- is one of my fav
  53. },
  54. -- TODO refactor for tree
  55. auto_close_tree = 0,
  56. nvim_tree_disable_netrw = 0,
  57. lsp = {
  58. document_highlight = true,
  59. popup_border = "single",
  60. },
  61. database = { save_location = "~/.config/lunarvim_db", auto_execute = 1 },
  62. plugin = {
  63. -- Builtins
  64. diffview = { active = false },
  65. ts_hintobjects = { active = false },
  66. ts_textobjects = { active = false },
  67. ts_textsubjects = { active = false },
  68. telescope_project = { active = false },
  69. indent_line = { active = false },
  70. lush = { active = false },
  71. },
  72. -- TODO just using mappings (leader mappings)
  73. user_which_key = {},
  74. user_plugins = {
  75. -- use lv-config.lua for this not put here
  76. },
  77. user_autocommands = {
  78. { "FileType", "qf", "set nobuflisted" },
  79. },
  80. lang = {
  81. cmake = {},
  82. clang = {
  83. diagnostics = {
  84. virtual_text = { spacing = 0, prefix = "" },
  85. signs = true,
  86. underline = true,
  87. },
  88. cross_file_rename = true,
  89. header_insertion = "never",
  90. },
  91. css = {
  92. virtual_text = true,
  93. },
  94. dart = {
  95. sdk_path = "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot",
  96. },
  97. docker = {},
  98. efm = {},
  99. elm = {},
  100. emmet = { active = true },
  101. elixir = {},
  102. graphql = {},
  103. go = {},
  104. html = {},
  105. java = {
  106. java_tools = {
  107. active = false,
  108. },
  109. },
  110. json = {
  111. diagnostics = {
  112. virtual_text = { spacing = 0, prefix = "" },
  113. signs = true,
  114. underline = true,
  115. },
  116. },
  117. kotlin = {},
  118. latex = {},
  119. lua = {
  120. diagnostics = {
  121. virtual_text = { spacing = 0, prefix = "" },
  122. signs = true,
  123. underline = true,
  124. },
  125. },
  126. php = {
  127. format = {
  128. format = {
  129. default = "psr12",
  130. },
  131. },
  132. environment = {
  133. php_version = "7.4",
  134. },
  135. diagnostics = {
  136. virtual_text = { spacing = 0, prefix = "" },
  137. signs = true,
  138. underline = true,
  139. },
  140. filetypes = { "php", "phtml" },
  141. },
  142. python = {
  143. linter = "",
  144. isort = false,
  145. diagnostics = {
  146. virtual_text = { spacing = 0, prefix = "" },
  147. signs = true,
  148. underline = true,
  149. },
  150. analysis = {
  151. type_checking = "basic",
  152. auto_search_paths = true,
  153. use_library_code_types = true,
  154. },
  155. },
  156. ruby = {
  157. diagnostics = {
  158. virtualtext = { spacing = 0, prefix = "" },
  159. signs = true,
  160. underline = true,
  161. },
  162. filetypes = { "rb", "erb", "rakefile", "ruby" },
  163. },
  164. rust = {
  165. rust_tools = {
  166. active = false,
  167. parameter_hints_prefix = "<-",
  168. other_hints_prefix = "=>", -- prefix for all the other hints (type, chaining)
  169. },
  170. linter = "",
  171. diagnostics = {
  172. virtual_text = { spacing = 0, prefix = "" },
  173. signs = true,
  174. underline = true,
  175. },
  176. },
  177. sh = {
  178. -- @usage can be 'shellcheck'
  179. linter = "",
  180. -- @usage can be 'shfmt'
  181. diagnostics = {
  182. virtual_text = { spacing = 0, prefix = "" },
  183. signs = true,
  184. underline = true,
  185. },
  186. },
  187. svelte = {},
  188. tailwindcss = {
  189. active = false,
  190. filetypes = {
  191. "html",
  192. "css",
  193. "scss",
  194. "javascript",
  195. "javascriptreact",
  196. "typescript",
  197. "typescriptreact",
  198. },
  199. },
  200. terraform = {},
  201. tsserver = {
  202. -- @usage can be 'eslint'
  203. linter = "",
  204. diagnostics = {
  205. virtual_text = { spacing = 0, prefix = "" },
  206. signs = true,
  207. underline = true,
  208. },
  209. },
  210. vim = {},
  211. yaml = {},
  212. },
  213. }
  214. require "lv-zen.config"
  215. require "lv-compe.config"
  216. require "lv-dashboard.config"
  217. require "lv-floatterm.config"
  218. require "lv-galaxyline.config"
  219. require "lv-gitsigns.config"
  220. require "lv-telescope.config"
  221. require "lv-floatterm.config"
  222. require "lv-dap.config"
  223. require "lv-which-key.config"
  224. require "lv-treesitter.config"