diff options
| author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-01-13 19:12:32 +0100 |
|---|---|---|
| committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-01-13 19:12:32 +0100 |
| commit | 73a60f5ee71bb60265ec0c97be7531a5e7605d8c (patch) | |
| tree | d46283a3d04285c5a5ead92d5bbb3b1fe424b736 /.config/nvim/lua/core/dashboard.lua | |
| parent | 19c1942757f07387b95db3ddbc39d9b561d5b51d (diff) | |
Remove bloat nvim config
Diffstat (limited to '.config/nvim/lua/core/dashboard.lua')
| -rw-r--r-- | .config/nvim/lua/core/dashboard.lua | 112 |
1 files changed, 0 insertions, 112 deletions
diff --git a/.config/nvim/lua/core/dashboard.lua b/.config/nvim/lua/core/dashboard.lua deleted file mode 100644 index 20edd22..0000000 --- a/.config/nvim/lua/core/dashboard.lua +++ /dev/null @@ -1,112 +0,0 @@ -local M = {} -local utils = require "utils" - -M.config = function(config) - options.builtin.dashboard = { - active = false, - on_config_done = nil, - search_handler = "telescope", - disable_at_vim_enter = 0, - session_directory = utils.join_paths(get_cache_dir(), "sessions"), - custom_header = { - " ##############..... ############## ", - " ##############......############## ", - " ##########..........########## ", - " ##########........########## ", - " ##########.......########## ", - " ##########.....##########.. ", - " ##########....##########..... ", - " ..##########..##########......... ", - " ....##########.#########............. ", - " ..################JJJ............ ", - " ################............. ", - " ##############.JJJ.JJJJJJJJJJ ", - " ############...JJ...JJ..JJ JJ ", - " ##########....JJ...JJ..JJ JJ ", - " ########......JJJ..JJJ JJJ JJJ ", - " ###### ......... ", - " ..... ", - " . ", - }, - - custom_section = { - a = { - description = { " Find File " }, - command = "Telescope find_files", - }, - b = { - description = { " New File " }, - command = ":ene!", - }, - c = { - description = { " Recent Projects " }, - command = "Telescope projects", - }, - d = { - description = { " Recently Used Files" }, - command = "Telescope oldfiles", - }, - e = { - description = { " Find Word " }, - command = "Telescope live_grep", - }, - f = { - description = { " Configuration " }, - command = ":e " .. config.user_config_file, - }, - }, - } -end - -M.setup = function() - vim.g.dashboard_disable_at_vimenter = options.builtin.dashboard.disable_at_vim_enter - - vim.g.dashboard_custom_header = options.builtin.dashboard.custom_header - - vim.g.dashboard_default_executive = options.builtin.dashboard.search_handler - - vim.g.dashboard_custom_section = options.builtin.dashboard.custom_section - - options.builtin.which_key.mappings[";"] = { "<cmd>Dashboard<CR>", "Dashboard" } - - vim.g.dashboard_session_directory = options.builtin.dashboard.session_directory - - local num_plugins_loaded = #vim.fn.globpath( - get_data_dir() .. "/site/pack/packer/start", - "*", - 0, - 1 - ) - - local footer = { - "nvim loaded " .. num_plugins_loaded .. " plugins ", - "", - } - - local text = require "interface.text" - vim.g.dashboard_custom_footer = text.align_center({ width = 0 }, footer, 0.49) -- Use 0.49 as counts for 2 characters - - require("core.autocmds").define_augroups { - _dashboard = { - -- seems to be nobuflisted that makes my stuff disappear will do more testing - { - "FileType", - "dashboard", - "setlocal nocursorline noswapfile synmaxcol& signcolumn=no norelativenumber nocursorcolumn nospell nolist nonumber bufhidden=wipe colorcolumn= foldcolumn=0 matchpairs= ", - }, - { - "FileType", - "dashboard", - "set showtabline=0 | autocmd BufLeave <buffer> set showtabline=" - .. vim.opt.showtabline._value, - }, - { "FileType", "dashboard", "nnoremap <silent> <buffer> q :q<CR>" }, - }, - } - - if options.builtin.dashboard.on_config_done then - options.builtin.dashboard.on_config_done() - end -end - -return M |