init.lua 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 = 'lua require(\'telescope.builtin\').find_files({search_dirs = {"~/.config/nvim"}})'
  30. }
  31. -- e = {description = {' Marks '}, command = 'Telescope marks'}
  32. }
  33. -- file_browser = {description = {' File Browser'}, command = 'Telescope find_files'},
  34. -- vim.g.dashboard_session_directory = CACHE_PATH..'/session'
  35. vim.g.dashboard_custom_footer = O.dashboard.footer
  36. end
  37. require('lv-utils').define_augroups({
  38. _dashboard = {
  39. -- seems to be nobuflisted that makes my stuff disapear will do more testing
  40. {
  41. 'FileType', 'dashboard',
  42. 'setlocal nocursorline noswapfile synmaxcol& signcolumn=no norelativenumber nocursorcolumn nospell nolist nonumber bufhidden=wipe colorcolumn= foldcolumn=0 matchpairs= '
  43. }, {
  44. 'FileType', 'dashboard',
  45. 'set showtabline=0 | autocmd BufLeave <buffer> set showtabline=2'
  46. }, {'FileType', 'dashboard', 'nnoremap <silent> <buffer> q :q<CR>'}
  47. }
  48. })
  49. return M