init.lua 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. local M = {}
  2. M.config = function()
  3. vim.g.dashboard_disable_at_vimenter = 0
  4. vim.g.dashboard_custom_header = O.plugin.dashboard.custom_header
  5. vim.g.dashboard_default_executive = O.plugin.dashboard.search_handler
  6. vim.g.dashboard_custom_section = O.plugin.dashboard.custom_section
  7. -- f = {
  8. -- description = { " Neovim Config Files" },
  9. -- command = "Telescope find_files cwd=" .. CONFIG_PATH,
  10. -- },
  11. -- e = {description = {' Marks '}, command = 'Telescope marks'}
  12. vim.cmd "let g:dashboard_session_directory = $HOME..'/.config/nvim/.sessions'"
  13. vim.cmd "let packages = len(globpath('~/.local/share/nvim/site/pack/packer/start', '*', 0, 1))"
  14. vim.api.nvim_exec(
  15. [[
  16. let g:dashboard_custom_footer = ['LuaJIT loaded '..packages..' plugins']
  17. ]],
  18. false
  19. )
  20. -- file_browser = {description = {' File Browser'}, command = 'Telescope find_files'},
  21. -- vim.g.dashboard_session_directory = CACHE_PATH..'/session'
  22. -- vim.g.dashboard_custom_footer = O.dashboard.footer
  23. end
  24. require("lv-utils").define_augroups {
  25. _dashboard = {
  26. -- seems to be nobuflisted that makes my stuff disapear will do more testing
  27. {
  28. "FileType",
  29. "dashboard",
  30. "setlocal nocursorline noswapfile synmaxcol& signcolumn=no norelativenumber nocursorcolumn nospell nolist nonumber bufhidden=wipe colorcolumn= foldcolumn=0 matchpairs= ",
  31. },
  32. {
  33. "FileType",
  34. "dashboard",
  35. "set showtabline=0 | autocmd BufLeave <buffer> set showtabline=2",
  36. },
  37. { "FileType", "dashboard", "nnoremap <silent> <buffer> q :q<CR>" },
  38. },
  39. }
  40. return M