Browse Source

replace startify with dashboard

Chris 4 years ago
parent
commit
b67c80c70c
6 changed files with 46 additions and 7 deletions
  1. 3 1
      README.md
  2. 1 0
      init.lua
  3. 35 0
      lua/nv-dashboard/init.lua
  4. 2 0
      lua/nv-utils/init.lua
  5. 3 1
      lua/plugins.lua
  6. 2 5
      vimscript/nv-whichkey/init.vim

+ 3 - 1
README.md

@@ -139,15 +139,16 @@ Topic](https://github.com/topics/vscode-snippets)
 
 **HIGH PRIORITY**
 
+- configure vim-bookmarks
 - learn nvim-dap in depth
 - vim ult test
-- potentially switch to dashboard
 - Implement what I can from this java config:
   [link](https://github.com/mfussenegger/nvim-jdtls/wiki/Sample-Configurations)
   - better ui for code actions - formatting
   - setup junit tests for java
 - neovim lightbulb config
 
+
 **LOW PRIORITY**
 
 - look into autoinstall lsp
@@ -161,6 +162,7 @@ Topic](https://github.com/topics/vscode-snippets)
 - configure neogit
 - list all binaries needed for functionality
 - html snippets in react (maybe)
+- configure kshenoy/vim-signature
 
 **PLUGIN BUGS**
 

+ 1 - 0
init.lua

@@ -36,6 +36,7 @@ else
   require('nv-gitblame')
   require('nv-galaxyline')
   require('nv-nvim-peekup')
+  require('nv-dashboard')
   require('nv-dial')
 
   -- Which Key (Hope to replace with Lua plugin someday)

+ 35 - 0
lua/nv-dashboard/init.lua

@@ -0,0 +1,35 @@
+vim.g.dashboard_custom_header = {
+    '███╗   ██╗██╗   ██╗ ██████╗ ██████╗ ██████╗ ███████╗',
+    '████╗  ██║██║   ██║██╔════╝██╔═══██╗██╔══██╗██╔════╝',
+    '██╔██╗ ██║██║   ██║██║     ██║   ██║██║  ██║█████╗',
+    '██║╚██╗██║╚██╗ ██╔╝██║     ██║   ██║██║  ██║██╔══╝',
+    '██║ ╚████║ ╚████╔╝ ╚██████╗╚██████╔╝██████╔╝███████╗',
+    '╚═╝  ╚═══╝  ╚═══╝   ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝'
+}
+
+vim.g.dashboard_default_executive = 'telescope'
+
+vim.g.dashboard_custom_section = {
+    a = {description = {' Find File          '}, command = 'Telescope find_files'},
+    b = {description = {' Recently Used Files'}, command = 'Telescope oldfiles'},
+    c = {description = {' Load Last Session  '}, command = 'SessionLoad'},
+    d = {description = {' Find Word          '}, command = 'Telescope live_grep'},
+    e = {description = {' Marks              '}, command = 'Telescope marks'},
+}
+
+
+
+
+-- file_browser = {description = {' File Browser'}, command = 'Telescope find_files'},
+
+-- vim.g.dashboard_custom_shortcut = {
+--     a = 'f',
+--     find_word = 'SPC f a',
+--     last_session = 'SPC s l',
+--     new_file = 'SPC c n',
+--     book_marks = 'SPC f b'
+-- }
+-- find_history = 'SPC f h',
+
+-- vim.g.dashboard_session_directory = '~/.cache/nvim/session'
+vim.g.dashboard_custom_footer = {'chrisatmachine.com'}

+ 2 - 0
lua/nv-utils/init.lua

@@ -34,6 +34,8 @@ nv_utils.define_augroups({
         {'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'},
         {'FileType', 'markdown', 'setlocal wrap'},
         -- {'BufWinEnter', '.sol', 'setlocal filetype=solidity'},
+
+        -- { 'FileType', 'dashboard', 'set showtabline=0 | autocmd WinLeave <buffer> set showtabline=2'},
         {'BufRead', '*.sol', 'setlocal filetype=solidity'},
         {'BufNewFile', '*.sol', 'setlocal filetype=solidity'}
         -- autocmd! BufRead,BufNewFile *.{jsx,jx,js} setlocal filetype=javascript.jsx

+ 3 - 1
lua/plugins.lua

@@ -101,7 +101,8 @@ return require('packer').startup(function(use)
     use 'unblevable/quick-scope'
     use 'airblade/vim-rooter'
     use 'kevinhwang91/rnvimr'
-    use 'mhinz/vim-startify'
+    -- use 'mhinz/vim-startify'
+    use 'glepnir/dashboard-nvim'
     use 'metakirby5/codi.vim'
     use 'psliwka/vim-smoothie'
     use 'moll/vim-bbye'
@@ -117,6 +118,7 @@ return require('packer').startup(function(use)
     use 'tpope/vim-sleuth'
     use 'sheerun/vim-polyglot'
     use 'monaqa/dial.nvim'
+    use 'MattesGroeger/vim-bookmarks' -- Look for more up to date version of this
 
 	-- TODO put this back when stable for indent lines
 -- 	use { 'lukas-reineke/indent-blankline.nvim', branch = 'lua'}

+ 2 - 5
vimscript/nv-whichkey/init.vim

@@ -121,11 +121,8 @@ let g:which_key_map.s = {
 
 let g:which_key_map.S = {
       \ 'name' : '+Session' ,
-      \ 'c' : [':SClose'          , 'Close Session'],
-      \ 'd' : [':SDelete'         , 'Delete Session'],
-      \ 'l' : [':SLoad'           , 'Load Session'],
-      \ 's' : [':Startify'        , 'Start Page'],
-      \ 'S' : [':SSave'           , 'Save Session'],
+      \ 's' : [':SessionSave'           , 'save session'],
+      \ 'l' : [':SessionLoad'           , 'load Session'],
       \ }
 
 " g is for git