default-config.lua 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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. default_keybinds = true,
  73. },
  74. disabled_built_ins = {
  75. "netrw",
  76. "netrwPlugin",
  77. "netrwSettings",
  78. "netrwFileHandlers",
  79. "gzip",
  80. "zip",
  81. "zipPlugin",
  82. "tar",
  83. "tarPlugin", -- 'man',
  84. "getscript",
  85. "getscriptPlugin",
  86. "vimball",
  87. "vimballPlugin",
  88. "2html_plugin",
  89. "logipat",
  90. "rrhelper",
  91. "spellfile_plugin",
  92. -- 'matchit', 'matchparen', 'shada_plugin',
  93. },
  94. plugin = {},
  95. -- TODO: refactor for tree
  96. auto_close_tree = 0,
  97. nvim_tree_disable_netrw = 0,
  98. database = { save_location = "~/.config/lunarvim_db", auto_execute = 1 },
  99. -- TODO: just using mappings (leader mappings)
  100. user_which_key = {},
  101. user_plugins = {
  102. -- use lv-config.lua for this not put here
  103. },
  104. user_autocommands = {
  105. { "FileType", "qf", "set nobuflisted" },
  106. },
  107. formatters = {
  108. filetype = {},
  109. },
  110. -- TODO move all of this into lang specific files, only require when using
  111. lang = {
  112. efm = {},
  113. emmet = { active = false },
  114. svelte = {},
  115. tailwindcss = {
  116. active = false,
  117. filetypes = {
  118. "html",
  119. "css",
  120. "scss",
  121. "javascript",
  122. "javascriptreact",
  123. "typescript",
  124. "typescriptreact",
  125. },
  126. },
  127. tsserver = {
  128. -- @usage can be 'eslint' or 'eslint_d'
  129. linter = "",
  130. diagnostics = {
  131. virtual_text = { spacing = 0, prefix = "" },
  132. signs = true,
  133. underline = true,
  134. },
  135. formatter = {
  136. exe = "prettier",
  137. args = {},
  138. },
  139. },
  140. },
  141. }
  142. require "core.status_colors"
  143. require("core.gitsigns").config()
  144. require("core.compe").config()
  145. require("core.dashboard").config()
  146. require("core.dap").config()
  147. require("core.terminal").config()
  148. require("core.zen").config()
  149. require("core.telescope").config()
  150. require("core.treesitter").config()
  151. require("core.which-key").config()
  152. require("core.nvimtree").config()
  153. require("lang.clang").config()
  154. require("lang.cmake").config()
  155. require("lang.css").config()
  156. require("lang.dart").config()
  157. require("lang.dockerfile").config()
  158. require("lang.elixir").config()
  159. require("lang.elm").config()
  160. require("lang.go").config()
  161. require("lang.graphql").config()
  162. require("lang.html").config()
  163. require("lang.java").config()
  164. require("lang.json").config()
  165. require("lang.julia").config()
  166. require("lang.kotlin").config()
  167. require("lang.lua").config()
  168. require("lang.php").config()
  169. require("lang.python").config()
  170. require("lang.r").config()
  171. require("lang.ruby").config()
  172. require("lang.rust").config()
  173. require("lang.sh").config()
  174. require("lang.scala").config()
  175. require("lang.svelte").config()
  176. require("lang.swift").config()
  177. require("lang.terraform").config()
  178. require("lang.tex").config()
  179. require("lang.vim").config()
  180. require("lang.vue").config()
  181. require("lang.yaml").config()
  182. require("lang.zig").config()