default-config.lua 5.4 KB

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