GithubHelp home page GithubHelp logo

dashboard-nvim's Introduction

Fancy and Blazing Fast start screen plugin of neovim

Hyper Doom

Feature

  • Low memory usage. dashboard does not store the all user configs in memory like header etc these string will take some memory. now it will be clean after you open a file. you can still use dashboard command to open a new one , then dashboard will read the config from cache.
  • Blazing fast

Install

  • Lazy.nvim
{
  'glepnir/dashboard-nvim',
  event = 'VimEnter',
  config = function()
    require('dashboard').setup {
      -- config
    }
  end,
  dependencies = { {'nvim-tree/nvim-web-devicons'}}
}
  • Packer
use {
  'glepnir/dashboard-nvim',
  event = 'VimEnter',
  config = function()
    require('dashboard').setup {
      -- config
    }
  end,
  requires = {'nvim-tree/nvim-web-devicons'}
}

Configuration

Options

theme = 'hyper' --  theme is doom and hyper default is hyper
config = {},    --  config used for theme
hide = {
  statusline    -- hide statusline default is true
  tabline       -- hide the tabline
  winbar        -- hide winbar
},
preview = {
  command       -- preview command
  file_path     -- preview file path
  file_height   -- preview file height
  file_width    -- preview file width
},

Theme config

the config field is used for theme. general field

config = {
  header -- type is table def
  week_header = {
    enable  --boolean use a week header
    concat  --concat string after time string line
    append  --table append after time string line
  },
  disable_move  -- boolean default is false disable move key
}

Hyper

when use hyper theme the available options in config is

config = {
  shortcut = {
    -- action can be a function type
    { desc = string, group = 'highlight group', key = 'shortcut key', action = 'action when you press key' },
  },
  packages = { enable = true }, -- show how many plugins neovim loaded
  -- limit how many projects list, action when you press key or enter it will run this action.
  project = { limit = 8, icon = 'your icon', label = '', action = 'Telescope find_files cwd=' },
  mru = { limit = 10, icon = 'your icon', label = '', },
  footer = {}, -- footer
}

Doom

when use doom theme the available options in config is

config = {
  center = {
    {
      icon = '',
      icon_hl = 'group',
      desc = 'description',
      desc_hl = 'group',
      key = 'shortcut key in dashboard buffer not keymap !!',
      key_hl = 'group',
      action = '',
    },
  },
  footer = {},
}

notice if you don't link config every highlight group. you can ignore this key. dashboard will use default highlight group like DashboardKey/Icon/Desc instead

Commands

  • Dashboard open dashboard
  • DbProjectDelete count delete project in cache works for hyper theme. count is number

Highlight

all highlight groups

-- General
DashboardHeader DashboardFooter
-- Hyper theme
DashboardProjectTitle DashboardProjectTitleIcon DashboardProjectIcon
DashboardMruTitle DashboardMruIcon DashboardFiles DashboardShotCutIcon
-- Doome theme
DashboardDesc DashboardKey DashboardIcon DashboardShotCut

Example config

example config of screenshot

Hyper
  db.setup({
    theme = 'hyper',
    config = {
      week_header = {
       enable = true,
      },
      shortcut = {
        { desc = ' Update', group = '@property', action = 'Lazy update', key = 'u' },
        {
          icon = '',
          icon_hl = '@variable',
          desc = 'Files',
          group = 'Label',
          action = 'Telescope find_files',
          key = 'f',
        },
        {
          desc = ' Apps',
          group = 'DiagnosticHint',
          action = 'Telescope app',
          key = 'a',
        },
        {
          desc = ' dotfiles',
          group = 'Number',
          action = 'Telescope dotfiles',
          key = 'd',
        },
      },
    },
  })
Doom
db.setup({
  theme = 'doom',
  config = {
    header = {}, --your header
    center = {
      {
        icon = '',
        icon_hl = 'Title',
        desc = 'Find File           ',
        desc_hl = 'String',
        key = 'b',
        keymap = 'SPC f f',
        key_hl = 'Number',
        action = 'lua print(2)'
      },
      {
        icon = '',
        desc = 'Find Dotfiles',
        key = 'f',
        keymap = 'SPC f d',
        action = 'lua print(3)'
      },
    },
    footer = {}  --your footer
  }
})
Changed
  • Removed Session as a start screen plugin speed is first.if you want use session you can take a look at glepnir/dbsession.nvim
  • Removed Ueberzug script. since the ueberzug author delete the repo.

TODO

  • I will write a plugin to implement some popular terminal evaluators image protocol then I think can make it work with dashboard

Backers

@RakerZh

Donate

If you'd like to support my work financially, buy me a drink through paypal

LICENSE

MIT

dashboard-nvim's People

Contributors

acksld avatar ahmedkhalf avatar akring avatar anurag3301 avatar carbosauce avatar claidler avatar diego-treitos avatar erven2016 avatar github-actions[bot] avatar glepnir avatar her avatar hugoppp avatar jwon avatar jxstxs avatar ktakayama avatar l-kershaw avatar leonheidelbach avatar mange avatar ndom91 avatar neelfrost avatar nemo256 avatar neur1n avatar novakne avatar plankcipher avatar rockerboo avatar siansiansu avatar sleepyswords avatar soooda avatar specter119 avatar ssxwcz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.