init.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. vim.cmd [[
  2. set packpath-=~/.config/nvim
  3. set packpath-=~/.config/nvim/after
  4. set packpath-=~/.local/share/nvim/site
  5. set packpath^=~/.local/share/lunarvim/site
  6. set packpath^=~/.config/lvim
  7. set runtimepath-=~/.config/nvim
  8. set runtimepath-=~/.config/nvim/after
  9. set runtimepath+=~/.config/lvim
  10. set runtimepath^=~/.local/share/lunarvim/lvim/after
  11. ]]
  12. -- vim.opt.rtp:append() instead of vim.cmd ?
  13. require "default-config"
  14. require "settings"
  15. local status_ok, error = pcall(vim.cmd, "luafile ~/.config/lvim/lv-config.lua")
  16. if not status_ok then
  17. print "something is wrong with your lv-config"
  18. print(error)
  19. end
  20. require "keymappings"
  21. local plugins = require "plugins"
  22. local plugin_loader = require("plugin-loader").init()
  23. plugin_loader:load { plugins, lvim.plugins }
  24. vim.g.colors_name = lvim.colorscheme -- Colorscheme must get called after plugins are loaded or it will break new installs.
  25. vim.cmd("colorscheme " .. lvim.colorscheme)
  26. local utils = require "lv-utils"
  27. utils.toggle_autoformat()
  28. require("lsp").setup_handlers()
  29. local null_status_ok, null_ls = pcall(require, "null-ls")
  30. if null_status_ok then
  31. null_ls.config {}
  32. require("lspconfig")["null-ls"].setup {}
  33. end
  34. local lsp_settings_status_ok, lsp_settings = pcall(require, "nlspsettings")
  35. if lsp_settings_status_ok then
  36. lsp_settings.setup {
  37. config_home = os.getenv "HOME" .. "/.config/lvim/lsp-settings",
  38. }
  39. end
  40. -- TODO: these guys need to be in language files
  41. -- if lvim.lang.emmet.active then
  42. -- require "lsp.emmet-ls"
  43. -- end
  44. -- if lvim.lang.tailwindcss.active then
  45. -- require "lsp.tailwind