default-config.lua 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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. keys = {
  8. leader_key = "space",
  9. },
  10. colorscheme = "spacegray",
  11. line_wrap_cursor_movement = true,
  12. transparent_window = false,
  13. format_on_save = true,
  14. lint_on_save = true,
  15. vsnip_dir = vim.fn.stdpath "config" .. "/snippets",
  16. default_options = {
  17. backup = false, -- creates a backup file
  18. clipboard = "unnamedplus", -- allows neovim to access the system clipboard
  19. cmdheight = 2, -- more space in the neovim command line for displaying messages
  20. colorcolumn = "99999", -- fixes indentline for now
  21. completeopt = { "menuone", "noselect" },
  22. conceallevel = 0, -- so that `` is visible in markdown files
  23. fileencoding = "utf-8", -- the encoding written to a file
  24. foldmethod = "manual", -- folding, set to "expr" for treesitter based foloding
  25. foldexpr = "", -- set to "nvim_treesitter#foldexpr()" for treesitter based folding
  26. guifont = "monospace:h17", -- the font used in graphical neovim applications
  27. hidden = true, -- required to keep multiple buffers and open multiple buffers
  28. hlsearch = true, -- highlight all matches on previous search pattern
  29. ignorecase = true, -- ignore case in search patterns
  30. mouse = "a", -- allow the mouse to be used in neovim
  31. pumheight = 10, -- pop up menu height
  32. showmode = false, -- we don't need to see things like -- INSERT -- anymore
  33. showtabline = 2, -- always show tabs
  34. smartcase = true, -- smart case
  35. smartindent = true, -- make indenting smarter again
  36. splitbelow = true, -- force all horizontal splits to go below current window
  37. splitright = true, -- force all vertical splits to go to the right of current window
  38. swapfile = false, -- creates a swapfile
  39. termguicolors = true, -- set term gui colors (most terminals support this)
  40. timeoutlen = 100, -- time to wait for a mapped sequence to complete (in milliseconds)
  41. title = true, -- set the title of window to the value of the titlestring
  42. -- opt.titlestring = "%<%F%=%l/%L - nvim" -- what the title of the window will be set to
  43. undodir = CACHE_PATH .. "/undo", -- set an undo directory
  44. undofile = true, -- enable persisten undo
  45. updatetime = 300, -- faster completion
  46. 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
  47. expandtab = true, -- convert tabs to spaces
  48. shiftwidth = 2, -- the number of spaces inserted for each indentation
  49. tabstop = 2, -- insert 2 spaces for a tab
  50. cursorline = true, -- highlight the current line
  51. number = true, -- set numbered lines
  52. relativenumber = false, -- set relative numbered lines
  53. numberwidth = 4, -- set number column width to 2 {default 4}
  54. signcolumn = "yes", -- always show the sign column, otherwise it would shift the text each time
  55. wrap = false, -- display lines as one long line
  56. spell = false,
  57. spelllang = "en",
  58. scrolloff = 8, -- is one of my fav
  59. sidescrolloff = 8,
  60. },
  61. lsp = {
  62. diagnostics = {
  63. virtual_text = {
  64. prefix = "",
  65. spacing = 0,
  66. },
  67. signs = true,
  68. underline = true,
  69. },
  70. document_highlight = true,
  71. popup_border = "single",
  72. },
  73. disabled_built_ins = {
  74. "netrw",
  75. "netrwPlugin",
  76. "netrwSettings",
  77. "netrwFileHandlers",
  78. "gzip",
  79. "zip",
  80. "zipPlugin",
  81. "tar",
  82. "tarPlugin", -- 'man',
  83. "getscript",
  84. "getscriptPlugin",
  85. "vimball",
  86. "vimballPlugin",
  87. "2html_plugin",
  88. "logipat",
  89. "rrhelper",
  90. "spellfile_plugin",
  91. -- 'matchit', 'matchparen', 'shada_plugin',
  92. },
  93. plugin = {},
  94. -- TODO: refactor for tree
  95. auto_close_tree = 0,
  96. nvim_tree_disable_netrw = 0,
  97. database = { save_location = "~/.config/lunarvim_db", auto_execute = 1 },
  98. -- TODO: just using mappings (leader mappings)
  99. user_which_key = {},
  100. user_plugins = {
  101. -- use lv-config.lua for this not put here
  102. },
  103. user_autocommands = {
  104. { "FileType", "qf", "set nobuflisted" },
  105. },
  106. formatters = {
  107. filetype = {},
  108. },
  109. -- TODO move all of this into lang specific files, only require when using
  110. lang = {
  111. efm = {},
  112. emmet = { active = false },
  113. svelte = {},
  114. tailwindcss = {
  115. active = false,
  116. filetypes = {
  117. "html",
  118. "css",
  119. "scss",
  120. "javascript",
  121. "javascriptreact",
  122. "typescript",
  123. "typescriptreact",
  124. },
  125. },
  126. tsserver = {
  127. -- @usage can be 'eslint' or 'eslint_d'
  128. linter = "",
  129. diagnostics = {
  130. virtual_text = { spacing = 0, prefix = "" },
  131. signs = true,
  132. underline = true,
  133. },
  134. formatter = {
  135. exe = "prettier",
  136. args = {},
  137. },
  138. },
  139. },
  140. }
  141. require "core.status_colors"
  142. require("core.gitsigns").config()
  143. require("core.compe").config()
  144. require("core.dashboard").config()
  145. require("core.dap").config()
  146. require("core.terminal").config()
  147. require("core.zen").config()
  148. require("core.telescope").config()
  149. require("core.treesitter").config()
  150. require("core.which-key").config()
  151. require("core.nvimtree").config()
  152. require("lang.clang").config()
  153. require("lang.cmake").config()
  154. require("lang.css").config()
  155. require("lang.dart").config()
  156. require("lang.dockerfile").config()
  157. require("lang.elixir").config()
  158. require("lang.elm").config()
  159. require("lang.go").config()
  160. require("lang.graphql").config()
  161. require("lang.html").config()
  162. require("lang.java").config()
  163. require("lang.json").config()
  164. require("lang.kotlin").config()
  165. require("lang.lua").config()
  166. require("lang.php").config()
  167. require("lang.python").config()
  168. require("lang.ruby").config()
  169. require("lang.rust").config()
  170. require("lang.sh").config()
  171. require("lang.scala").config()
  172. require("lang.svelte").config()
  173. require("lang.swift").config()
  174. require("lang.terraform").config()
  175. require("lang.tex").config()
  176. require("lang.vim").config()
  177. require("lang.yaml").config()
  178. require("lang.zig").config()