init.lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. local M = {}
  2. M.config = function()
  3. vim.g.dashboard_disable_at_vimenter = 0
  4. vim.g.dashboard_custom_header = O.dashboard.custom_header
  5. vim.g.dashboard_default_executive = "telescope"
  6. vim.g.dashboard_custom_section = {
  7. a = {
  8. description = { " Find File " },
  9. command = "Telescope find_files",
  10. },
  11. b = {
  12. description = { " Recently Used Files" },
  13. command = "Telescope oldfiles",
  14. },
  15. c = {
  16. description = { " Load Last Session " },
  17. command = "SessionLoad",
  18. },
  19. d = {
  20. description = { " Find Word " },
  21. command = "Telescope live_grep",
  22. },
  23. e = {
  24. description = { " Settings " },
  25. command = ":e " .. CONFIG_PATH .. "/lv-config.lua",
  26. },
  27. -- f = {
  28. -- description = { " Neovim Config Files" },
  29. -- command = "Telescope find_files cwd=" .. CONFIG_PATH,
  30. -- },
  31. -- e = {description = {' Marks '}, command = 'Telescope marks'}
  32. }
  33. vim.cmd "let g:dashboard_session_directory = $HOME..'/.config/nvim/.sessions'"
  34. vim.cmd "let packages = len(globpath('~/.local/share/nvim/site/pack/packer/start', '*', 0, 1))"
  35. vim.api.nvim_exec(
  36. [[
  37. let g:dashboard_custom_footer = ['LuaJIT loaded '..packages..' plugins']
  38. ]],
  39. false
  40. )
  41. -- file_browser = {description = {' File Browser'}, command = 'Telescope find_files'},
  42. -- vim.g.dashboard_session_directory = CACHE_PATH..'/session'
  43. -- vim.g.dashboard_custom_footer = O.dashboard.footer
  44. end
  45. require("lv-utils").define_augroups {
  46. _dashboard = {
  47. -- seems to be nobuflisted that makes my stuff disapear will do more testing
  48. {
  49. "FileType",
  50. "dashboard",
  51. "setlocal nocursorline noswapfile synmaxcol& signcolumn=no norelativenumber nocursorcolumn nospell nolist nonumber bufhidden=wipe colorcolumn= foldcolumn=0 matchpairs= ",
  52. },
  53. {
  54. "FileType",
  55. "dashboard",
  56. "set showtabline=0 | autocmd BufLeave <buffer> set showtabline=2",
  57. },
  58. { "FileType", "dashboard", "nnoremap <silent> <buffer> q :q<CR>" },
  59. },
  60. }
  61. return M