default-config.lua 5.1 KB

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