Compare commits

...

5 Commits

View File

@ -7,14 +7,6 @@ if has('nvim')
endif endif
endif endif
if version >= 8.0
if ! filereadable(system('echo -n "$HOME/.vim/autoload/plug.vim"'))
silent !mkdir -p $HOME/.vim/autoload/
silent !curl --silent "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > $HOME/.vim/autoload/plug.vim
autocmd VimEnter * PlugInstall
endif
endif
let mapleader = "\<Space>" let mapleader = "\<Space>"
let g:python3_host_prog = expand('/usr/bin/python3') let g:python3_host_prog = expand('/usr/bin/python3')
let g:loaded_python_provider = 0 let g:loaded_python_provider = 0
@ -56,12 +48,12 @@ call plug#begin('~/.config/nvim/plugged')
Plug 'gruvbox-community/gruvbox', { 'as': 'gruvbox'} Plug 'gruvbox-community/gruvbox', { 'as': 'gruvbox'}
" Fzf plugin " Fzf plugin
" Plug 'junegunn/fzf.vim' Plug 'junegunn/fzf.vim'
" Plug 'junegunn/fzf' Plug 'junegunn/fzf'
" Telescope " Telescope
Plug 'nvim-lua/plenary.nvim' " Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim' " Plug 'nvim-telescope/telescope.nvim'
" CSS " CSS
Plug 'ap/vim-css-color' Plug 'ap/vim-css-color'
@ -96,11 +88,6 @@ function! s:check_back_space() abort
return !col || getline('.')[col - 1] =~# '\s' return !col || getline('.')[col - 1] =~# '\s'
endfunction endfunction
" Make <CR> auto-select the first completion item and notify coc.nvim to
" format on enter, <cr> could be remapped by other vim plugin
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
" Use tab for trigger completion with characters ahead and navigate. " Use tab for trigger completion with characters ahead and navigate.
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by " NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
" other plugin before putting this into your config. " other plugin before putting this into your config.
@ -120,6 +107,12 @@ nmap <silent> <leader>gp <Plug>(coc-diagnostic-prev)
nmap <silent> <leader>gn <Plug>(coc-diagnostic-next) nmap <silent> <leader>gn <Plug>(coc-diagnostic-next)
nnoremap <leader>cr :CocRestart nnoremap <leader>cr :CocRestart
" Commentry
xmap <leader>c <Plug>Commentary
nmap <leader>c <Plug>Commentary
omap <leader>c <Plug>Commentary
nmap <leader>cc <Plug>CommentaryLine
" Status-line " Status-line
set statusline= set statusline=
set statusline+=%#IncSearch# set statusline+=%#IncSearch#
@ -143,13 +136,13 @@ command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-h
command! -bang -nargs=* FindCurrentWord call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --hidden --follow --color "always" '.shellescape(expand('<cword>')), 1, <bang>0) command! -bang -nargs=* FindCurrentWord call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --hidden --follow --color "always" '.shellescape(expand('<cword>')), 1, <bang>0)
set grepprg=rg\ --vimgrep set grepprg=rg\ --vimgrep
nmap <Leader>e :Telescope buffers<CR> " nmap <Leader>e :Telescope buffers<CR>
nmap <Leader>q :Telescope live_grep<CR> " nmap <Leader>q :Telescope live_grep<CR>
nmap <Leader>w :Telescope find_files<CR> " nmap <Leader>w :Telescope find_files<CR>
"nmap <Leader>e :Buffers<CR> nmap <Leader>e :Buffers<CR>
"nmap <Leader>q :Rg<CR> nmap <Leader>q :Rg<CR>
"nmap <Leader>w :Files<CR> nmap <Leader>w :Files<CR>
" Resize window " Resize window
nnoremap <C-L> :vertical resize +5<CR> nnoremap <C-L> :vertical resize +5<CR>
@ -165,10 +158,6 @@ nnoremap - :split <CR>
nnoremap <F5> :edit <CR> nnoremap <F5> :edit <CR>
nnoremap <Leader><F5> :edit! <CR> nnoremap <Leader><F5> :edit! <CR>
" Copy using <Leader> anc c
nnoremap <Leader>c :w !xclip<CR><CR>
vnoremap <Leader>c "*y
" livepreviewer " livepreviewer
let g:livepreview_previewer = 'mupdf' let g:livepreview_previewer = 'mupdf'