mirror of
https://github.com/ksyasuda/rice.git
synced 2025-12-05 02:53:39 -08:00
updates
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
syntax on
|
||||
set noshowmode "disable default vim insert text at bottom
|
||||
set laststatus=2
|
||||
set number
|
||||
set colorcolumn=80
|
||||
@@ -6,9 +7,11 @@ set tw=80
|
||||
set shiftwidth=4
|
||||
set tabstop=4
|
||||
set autoindent
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set incsearch
|
||||
set smartindent
|
||||
set hlsearch
|
||||
set smartcase
|
||||
set ignorecase
|
||||
set noerrorbells
|
||||
set title
|
||||
@@ -21,6 +24,7 @@ set scrolloff=8
|
||||
set sidescrolloff=8
|
||||
" show candidates for vim commands with tab
|
||||
set wildmenu
|
||||
set background=dark
|
||||
|
||||
set encoding=UTF-8
|
||||
set guifont=FiraCode\ Nerd\ Font\ 18
|
||||
@@ -28,6 +32,17 @@ set guifont=FiraCode\ Nerd\ Font\ 18
|
||||
" lsp handled by coc
|
||||
let g:ale_disable_lsp = 1
|
||||
|
||||
" Install vim-plug if not found
|
||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
endif
|
||||
|
||||
" Run PlugInstall if there are missing plugins
|
||||
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
||||
\| PlugInstall --sync | source $MYVIMRC
|
||||
\| endif
|
||||
|
||||
call plug#begin('~/.vim/plugged')
|
||||
|
||||
Plug 'mhinz/vim-startify'
|
||||
@@ -40,26 +55,24 @@ Plug 'pechorin/any-jump.vim'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'shime/vim-livedown'
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
Plug 'alvan/vim-closetag'
|
||||
Plug 'MaxMEllon/vim-jsx-pretty'
|
||||
Plug 'ap/vim-css-color'
|
||||
Plug 'ap/vim-buftabline'
|
||||
Plug 'itchyny/lightline.vim'
|
||||
Plug 'wakatime/vim-wakatime'
|
||||
Plug 'itchyny/vim-gitbranch'
|
||||
Plug 'preservim/nerdtree' | Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||
Plug 'prettier/vim-prettier', { 'do': 'yarn install' }
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
Plug 'dense-analysis/ale'
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
Plug 'maximbaz/lightline-ale'
|
||||
" On-demand lazy load
|
||||
Plug 'liuchengxu/vim-which-key', { 'on': ['WhichKey', 'WhichKey!'] }
|
||||
Plug 'osyo-manga/vim-over'
|
||||
" colorschemes
|
||||
Plug 'joshdick/onedark.vim'
|
||||
Plug 'kaicataldo/material.vim', { 'branch': 'main' }
|
||||
Plug 'sainnhe/sonokai'
|
||||
Plug 'romgrk/doom-one.vim'
|
||||
Plug 'dracula/vim', { 'as': 'dracula' }
|
||||
Plug 'morhetz/gruvbox'
|
||||
Plug 'vv9k/vim-github-dark'
|
||||
|
||||
call plug#end()
|
||||
|
||||
@@ -297,6 +310,8 @@ let g:prettier#exec_cmd_path = "/usr/bin/prettier"
|
||||
let g:lightline = {}
|
||||
" 'one', 'material', 'darcula', 'deus'
|
||||
let g:lightline.colorscheme = "deus"
|
||||
" let g:lightline.colorscheme = "one"
|
||||
" let g:lightline.colorscheme = "darcula"
|
||||
let g:lightline.component_function = {
|
||||
\ 'fugitive': 'MyFugitive',
|
||||
\ 'readonly': 'Readonly',
|
||||
@@ -378,20 +393,29 @@ endfunction
|
||||
"COLORSCHEME
|
||||
"------------------------------------------------------------------------------
|
||||
set t_Co=256
|
||||
set termguicolors
|
||||
set noshowmode "disable default vim insert text at bottom
|
||||
let g:onedark_termcolors=256 "enable 256 colors
|
||||
" set termguicolors
|
||||
" let g:onedark_termcolors=256 "enable 256 colors
|
||||
" colorscheme onedark "set colorsheme as onedark
|
||||
|
||||
"material theme
|
||||
" let g:material_theme_style = 'default' | 'palenight' | 'ocean' | 'lighter' | 'darker' | 'default-community' | 'palenight-community' | 'ocean-community' | 'lighter-community' | 'darker-community'
|
||||
let g:material_terminal_italics = 1
|
||||
let g:material_theme_style = 'darker'
|
||||
" let g:material_theme_style = 'darker-community'
|
||||
colorscheme material
|
||||
" colorscheme material
|
||||
|
||||
let g:doom_one_terminal_colors = v:true
|
||||
" let g:doom_one_terminal_colors = v:true
|
||||
" colorscheme doom-one
|
||||
|
||||
let g:gruvbox_contrast_dark = "medium" "default
|
||||
" let g:gruvbox_contrast_dark = "soft"
|
||||
let g:gruvbox_improved_strings = 0
|
||||
let g:gruvbox_improved_warnings = 1
|
||||
colorscheme gruvbox
|
||||
|
||||
" let g:gh_color = "soft"
|
||||
" colorscheme ghdark
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
"""bash language server
|
||||
"------------------------------------------------------------------------------
|
||||
@@ -518,21 +542,29 @@ command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.org
|
||||
set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
|
||||
" Mappings for CoCList
|
||||
" Show all diagnostics.
|
||||
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr>
|
||||
nnoremap <silent><nowait> <space>cd :<C-u>CocCommand fzf-preview.CocDiagnostics<cr>
|
||||
" Manage extensions.
|
||||
nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr>
|
||||
nnoremap <silent><nowait> <space>ce :<C-u>CocList extensions<cr>
|
||||
" Show commands.
|
||||
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr>
|
||||
nnoremap <silent><nowait> <space>cc :<C-u>CocCommand fzf-preview.CommandPallete<cr>
|
||||
" Find symbol of current document.
|
||||
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr>
|
||||
nnoremap <silent><nowait> <space>co :<C-u>CocOutline<cr>
|
||||
" Search workspace symbols.
|
||||
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr>
|
||||
nnoremap <silent><nowait> <space>cs :<C-u>CocCommand fzf-preview.BufferLines<cr>
|
||||
" Do default action for next item.
|
||||
nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR>
|
||||
nnoremap <silent><nowait> <space>cj :<C-u>CocNext<CR>
|
||||
" Do default action for previous item.
|
||||
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
|
||||
nnoremap <silent><nowait> <space>ck :<C-u>CocPrev<CR>
|
||||
" Resume latest coc list.
|
||||
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>
|
||||
nnoremap <silent><nowait> <space>cp :<C-u>CocListResume<CR>
|
||||
" show references with fzf
|
||||
nnoremap <silent><nowait> <space>cr :<C-u>CocCommand fzf-preview.CocReferences<CR>
|
||||
" show implementations with fzf
|
||||
nnoremap <leader><nowait> <space>ci :<C-U>CocCommand fzf-preview.CocImplementations<Cr>
|
||||
"------------------------------------------------------------------------------
|
||||
"which key
|
||||
"------------------------------------------------------------------------------
|
||||
set timeoutlen=400
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" custom commands
|
||||
@@ -542,7 +574,10 @@ command! Config execute ":e ~/.vimrc"
|
||||
"------------------------------------------------------------------------------
|
||||
"KEYBINDINGS
|
||||
"------------------------------------------------------------------------------
|
||||
let mapleader = "\<Space>"
|
||||
let g:mapleader = "\<Space>"
|
||||
let g:maplocalleader = ','
|
||||
nnoremap <silent> <leader> :<c-u>WhichKey '<Space>'<CR>
|
||||
nnoremap <silent> <localleader> :<c-u>WhichKey ','<CR>
|
||||
map <F5> :!
|
||||
map <C-n> :NERDTreeToggle<CR>
|
||||
map <C-l> :LivedownToggle<CR>
|
||||
@@ -550,12 +585,16 @@ nnoremap <C-T> :wa<CR>:vertical botright term ++kill=term<CR>
|
||||
" fzf
|
||||
nmap // :CocCommand fzf-preview.Lines<CR>
|
||||
nmap ?? :CocCommand fzf-preview.BufferLines<CR>
|
||||
" search fzf, refs, impls, defs
|
||||
nmap <leader>sf :FZF<CR>
|
||||
" buffers
|
||||
nmap <leader>bb :CocCommand fzf-preview.Buffers<CR>
|
||||
nmap <leader>bB :CocCommand fzf-preview.AllBuffers<CR>
|
||||
nmap <leader>bk :bdelete<CR>
|
||||
nmap <leader>bn :enew<CR>
|
||||
nmap <leader>bn :bnext<CR>
|
||||
nmap <leader>bp :bprev<CR>
|
||||
map <C-J> :bnext<CR>
|
||||
map <C-K> :bprev<CR>
|
||||
" git
|
||||
nmap <leader>gg :tab term ++close lazygit<CR>
|
||||
nmap <leader>gc :CocCommand fzf-preview.GitLogs<CR>
|
||||
@@ -568,15 +607,9 @@ nmap <leader>hk :Maps<CR>
|
||||
nmap <leader>j :AnyJump<CR>
|
||||
" toggle/open
|
||||
nmap <leader>on :NERDTreeToggle<CR>
|
||||
nmap <leader>ot :vertical botright ter<CR>
|
||||
" peek/preview
|
||||
nmap <leader>pr :CocCommand fzf-preview.CocReferences<Cr>
|
||||
nmap <leader>pi :CocCommand fzf-preview.CocImplementations<Cr>
|
||||
nmap <leader>pd :CocCommand fzf-preview.CocDiagnostics<Cr>
|
||||
nmap <leader>ot :vertical botright ter ++kill=terminal ++close<CR>
|
||||
nmap <leader>oo :OverCommandLine<CR>
|
||||
" search
|
||||
nmap <leader>sc :nohls<Cr>
|
||||
"toggle coc outline
|
||||
nmap <leader>to :CocOutline<CR>
|
||||
"which key
|
||||
set timeoutlen=400
|
||||
nnoremap <silent> <leader> :WhichKey '<Space>'<CR>
|
||||
noremap <leader>to :CocOutline<CR>
|
||||
|
||||
@@ -111,7 +111,7 @@ HISTCONTROL=ignoreboth
|
||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(zsh-autosuggestions zsh-syntax-highlighting colored-man-pages vi-mode)
|
||||
plugins=(zsh-autosuggestions zsh-syntax-highlighting colored-man-pages vi-mode git zsh-z)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
#source ~/.oh-my-zsh/plugins/git/git.plugin.zsh
|
||||
|
||||
Reference in New Issue
Block a user