default-config.lua 5.9 KB

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