default-config.lua 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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. plugin = {},
  72. -- TODO: refactor for tree
  73. auto_close_tree = 0,
  74. nvim_tree_disable_netrw = 0,
  75. database = { save_location = "~/.config/lunarvim_db", auto_execute = 1 },
  76. -- TODO: just using mappings (leader mappings)
  77. user_which_key = {},
  78. user_plugins = {
  79. -- use lv-config.lua for this not put here
  80. },
  81. user_autocommands = {
  82. { "FileType", "qf", "set nobuflisted" },
  83. },
  84. formatters = {
  85. filetype = {},
  86. },
  87. -- TODO move all of this into lang specific files, only require when using
  88. lang = {
  89. efm = {},
  90. emmet = { active = false },
  91. svelte = {},
  92. tailwindcss = {
  93. active = false,
  94. filetypes = {
  95. "html",
  96. "css",
  97. "scss",
  98. "javascript",
  99. "javascriptreact",
  100. "typescript",
  101. "typescriptreact",
  102. },
  103. },
  104. tsserver = {
  105. -- @usage can be 'eslint' or 'eslint_d'
  106. linter = "",
  107. diagnostics = {
  108. virtual_text = { spacing = 0, prefix = "" },
  109. signs = true,
  110. underline = true,
  111. },
  112. formatter = {
  113. exe = "prettier",
  114. args = {},
  115. },
  116. },
  117. },
  118. }
  119. require "core.status_colors"
  120. require("core.gitsigns").config()
  121. require("core.compe").config()
  122. require("core.dashboard").config()
  123. require("core.dap").config()
  124. require("core.terminal").config()
  125. require("core.zen").config()
  126. require("core.telescope").config()
  127. require("core.treesitter").config()
  128. require("core.which-key").config()
  129. require("lang.clang").config()
  130. require("lang.cmake").config()
  131. require("lang.css").config()
  132. require("lang.dart").config()
  133. require("lang.dockerfile").config()
  134. require("lang.elixir").config()
  135. require("lang.elm").config()
  136. require("lang.go").config()
  137. require("lang.graphql").config()
  138. require("lang.html").config()
  139. require("lang.java").config()
  140. require("lang.json").config()
  141. require("lang.kotlin").config()
  142. require("lang.lua").config()
  143. require("lang.php").config()
  144. require("lang.python").config()
  145. require("lang.ruby").config()
  146. require("lang.rust").config()
  147. require("lang.scala").config()
  148. require("lang.sh").config()
  149. require("lang.terraform").config()
  150. require("lang.tex").config()
  151. require("lang.vim").config()
  152. require("lang.yaml").config()
  153. require("lang.zig").config()