default-config.lua 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. CONFIG_PATH = os.getenv "HOME" .. "/.local/share/lunarvim/lvim"
  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 = os.getenv "HOME" .. "/.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. lspinstall = {},
  96. telescope = {},
  97. compe = {},
  98. autopairs = {},
  99. treesitter = {},
  100. formatter = {},
  101. lint = {},
  102. nvimtree = {},
  103. gitsigns = {},
  104. which_key = {},
  105. comment = {},
  106. rooter = {},
  107. galaxyline = {},
  108. bufferline = {},
  109. dap = {},
  110. dashboard = {},
  111. terminal = {},
  112. zen = {},
  113. },
  114. -- TODO: refactor for tree
  115. auto_close_tree = 0,
  116. nvim_tree_disable_netrw = 0,
  117. database = { save_location = "~/.config/lunarvim_db", auto_execute = 1 },
  118. -- TODO: just using mappings (leader mappings)
  119. user_which_key = {},
  120. user_plugins = {
  121. -- use lv-config.lua for this not put here
  122. },
  123. user_autocommands = {
  124. { "FileType", "qf", "set nobuflisted" },
  125. },
  126. formatters = {
  127. filetype = {},
  128. },
  129. -- TODO move all of this into lang specific files, only require when using
  130. lang = {
  131. efm = {},
  132. emmet = { active = false },
  133. svelte = {},
  134. tailwindcss = {
  135. active = false,
  136. filetypes = {
  137. "html",
  138. "css",
  139. "scss",
  140. "javascript",
  141. "javascriptreact",
  142. "typescript",
  143. "typescriptreact",
  144. },
  145. },
  146. tsserver = {
  147. -- @usage can be 'eslint' or 'eslint_d'
  148. linter = "",
  149. diagnostics = {
  150. virtual_text = { spacing = 0, prefix = "" },
  151. signs = true,
  152. underline = true,
  153. },
  154. formatter = {
  155. exe = "prettier",
  156. args = {},
  157. },
  158. },
  159. },
  160. }
  161. require "core.status_colors"
  162. require("core.gitsigns").config()
  163. require("core.compe").config()
  164. require("core.dashboard").config()
  165. require("core.dap").config()
  166. require("core.terminal").config()
  167. require("core.zen").config()
  168. require("core.telescope").config()
  169. require("core.treesitter").config()
  170. require("core.which-key").config()
  171. require("core.nvimtree").config()
  172. require("lang.clang").config()
  173. require("lang.clojure").config()
  174. require("lang.cmake").config()
  175. require("lang.cs").config()
  176. require("lang.css").config()
  177. require("lang.dart").config()
  178. require("lang.dockerfile").config()
  179. require("lang.elixir").config()
  180. require("lang.elm").config()
  181. require("lang.go").config()
  182. require("lang.graphql").config()
  183. require("lang.html").config()
  184. require("lang.java").config()
  185. require("lang.json").config()
  186. require("lang.julia").config()
  187. require("lang.kotlin").config()
  188. require("lang.lua").config()
  189. require("lang.php").config()
  190. require("lang.python").config()
  191. require("lang.r").config()
  192. require("lang.ruby").config()
  193. require("lang.rust").config()
  194. require("lang.sh").config()
  195. require("lang.scala").config()
  196. require("lang.svelte").config()
  197. require("lang.swift").config()
  198. require("lang.terraform").config()
  199. require("lang.tex").config()
  200. require("lang.vim").config()
  201. require("lang.vue").config()
  202. require("lang.yaml").config()
  203. require("lang.zig").config()
  204. require("lang.zsh").config()