From c369e4a068302e94146832912e6eb4fb716ab2ae Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Mon, 11 Apr 2022 20:38:27 +0530 Subject: Update init.vim(2) --- .config/nvim/init.vim | 130 +++++++++++++++++++++++++++++++++++++++++++------- .config/shell/aliasrc | 1 + 2 files changed, 114 insertions(+), 17 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index fd5cb35..1a0009c 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -8,6 +8,7 @@ set smarttab set smartindent set ignorecase set mouse=a +set hidden set smartcase set undodir=~/.nvim/undodir set undofile @@ -18,49 +19,144 @@ set splitbelow splitright call plug#begin() -Plug 'glepnir/dashboard-nvim' "Dashboard +Plug 'glepnir/dashboard-nvim' "For awesome e-mac like dashboard Plug 'nvim-lua/telescope.nvim' "fuzzy finding -Plug 'nvim-lua/plenary.nvim' "dependency +Plug 'nvim-lua/plenary.nvim' " Dashboardutilities +Plug 'nvim-lua/popup.nvim' " +Plug 'akinsho/bufferline.nvim', { 'tag': '*' } -Plug 'vim-airline/vim-airline' " Vim-Airline -Plug 'preservim/nerdtree' " NerdTree -Plug 'ryanoasis/vim-devicons' " Developer Icons +Plug 'vim-airline/vim-airline' " Vim-Airline +Plug 'neoclide/coc.nvim', {'branch': 'release'} " Auto Completion +"Plug 'ryanoasis/vim-devicons' " Developer Icons + +Plug 'kyazdani42/nvim-tree.lua' +Plug 'kyazdani42/nvim-web-devicons' " for file icons Plug 'preservim/tagbar' " Tagbar for code navigation + +Plug 'folke/which-key.nvim' + Plug 'joshdick/onedark.vim' " One Dark theme Plug 'morhetz/gruvbox' " gruvbox theme +Plug 'arcticicestudio/nord-vim' "nord theme +Plug 'folke/tokyonight.nvim' "tokyonight theme +Plug 'tiagovla/tokyodark.nvim' "tokyodark theme + Plug 'prettier/vim-prettier' " Plug 'jiangmiao/auto-pairs' " Autodoublebrackets like vscode Plug 'alvan/vim-closetag' " Auto close HTML tags -Plug 'akinsho/bufferline.nvim' " Upper Bufferline -Plug 'ap/vim-css-color' " CSS Color Preview Plug 'tc50cal/vim-terminal' " Vim Terminal +Plug 'farmergreg/vim-lastplace' " Remembers-last edit-position +Plug 'ap/vim-css-color' " CSS Color Preview + Plug 'norcalli/nvim-colorizer.lua' " hexcode bgcolor Plug 'ap/vim-css-color' " vim css color -Plug 'neoclide/coc.nvim' " Auto Completion Plug 'blindFS/vim-taskwarrior' call plug#end() -"colorscheme onedark "using colorscheme toggle now -"colorscheme gruvbox - let g:mapleader="\" let g:dashboard_default_executive ='telescope' - } + + nmap ss :SessionSave nmap sl :SessionLoad nnoremap fh :DashboardFindHistory -nnoremap ff :DashboardFindFile +nnoremap ff :Telescope find_files hidden=true nnoremap tc :DashboardChangeColorscheme nnoremap fa :DashboardFindWord nnoremap fb :DashboardJumpMark nnoremap cn :DashboardNewFile + let g:dashboard_custom_header = [ + \ '', + \ ' ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ', + \ ' ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ', + \ ' ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ', + \ ' ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ', + \ ' ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ', + \ ' ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ', + \ ' ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ', + \ '⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ', + \ '⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ', + \ ' ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ', + \ ' ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ', + \ '', + \ ] -nnoremap :NERDTreeFocus -nnoremap :NERDTree -nnoremap :NERDTreeToggle -nmap :TagbarToggle +"nnoremap :NERDTreeFocus +"nnoremap :NERDTree +"nnoremap :NERDTreeToggle +"nmap :TagbarToggle +"let NERDTreeShowHidden=1 + + +"setup function +"set termguicolors +lua << EOF +require'nvim-tree'.setup {} +require("bufferline").setup{} +require("which-key").setup { + + } +EOF + +"nvim-tree config + +let g:nvim_tree_auto_close = 1 +let g:nvim_tree_indent_markers = 1 +let g:nvim_tree_git_hl = 1 +let g:nvim_tree_highlight_opened_files = 1 +let g:nvim_tree_root_folder_modifier = ':~' +let g:nvim_tree_symlink_arrow = ' >> ' +let g:nvim_tree_special_files = { 'README.md': 1, 'Makefile': 1, 'MAKEFILE': 1 } +let g:nvim_tree_show_icons = { + \ 'git': 1, + \ 'folders': 0, + \ 'files': 0, + \ 'folder_arrows': 0, + \ } + +let g:nvim_tree_icons = { + \ 'default': "", + \ 'symlink': "", + \ 'git': { + \ 'unstaged': "✗", + \ 'staged': "✓", + \ 'unmerged': "", + \ 'renamed': "➜", + \ 'untracked': "★", + \ 'deleted': "", + \ 'ignored': "◌" + \ }, + \ 'folder': { + \ 'arrow_open': "", + \ 'arrow_closed': "", + \ 'default': "", + \ 'open': "", + \ 'empty': "", + \ 'empty_open': "", + \ 'symlink': "", + \ 'symlink_open': "", + \ } + \ } + +nnoremap :NvimTreeToggle +nnoremap r :NvimTreeRefresh +nnoremap tf :NvimTreeFindFile + + +"Bufferline config + +nnoremap :BufferLineCycleNext "Ctrl+Tab +nnoremap :BufferLineCyclePrev "Ctrl+Shift nnoremap :call CocActionAsync('jumpDefinition') +"Which key config + +"vim.g.mapleader = ' ' +"local map = vim.api.nvim_set_keymap +map('n', '', 'h', {nnoremap = true, silent = false}) +map('n', '', 'l', {nnoremap = true, silent = false}) +map('n', '', 'j', {nnoremap = true, silent = false}) +map('n', '', 'k', {nnoremap = true, silent = false}) diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 84b2ca8..50f0018 100644 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -29,6 +29,7 @@ alias \ g2="git commit -S -m" \ g3="git push origin HEAD --force" \ gs="git status" \ + gc="git diff --staged" \ glg="git log --graph --abbrev-commit --decorate --format=format:'%C(bold green)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold yellow)(%ar)%C(reset)%C(auto)%d%C(reset)%n''%C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all" #useful command line substitutions -- cgit v1.2.3