summaryrefslogtreecommitdiff
path: root/.config/nvim/init.vim
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/init.vim')
-rw-r--r--.config/nvim/init.vim38
1 files changed, 34 insertions, 4 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index 3589bf3..cbedb8e 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -6,10 +6,32 @@
call plug#begin()
Plug 'itchyny/lightline.vim'
-Plug 'ayu-theme/ayu-vim'
+Plug 'joshdick/onedark.vim'
+Plug 'arcticicestudio/nord-vim'
+Plug 'rose-pine/neovim', {'as': 'rose-pine'}
+Plug 'neoclide/coc.nvim', {'branch': 'release'}
call plug#end()
+" coc settings
+"" use <tab> for trigger completion and navigate to the next complete item
+function! s:check_back_space() abort
+ let col = col('.') - 1
+ return !col || getline('.')[col - 1] =~ '\s'
+endfunction
+
+"" for lightline.vim
+function! CocCurrentFunction()
+ return get(b:, 'coc_current_function', '')
+endfunction
+
+inoremap <silent><expr> <Tab>
+ \ pumvisible() ? "\<C-n>" :
+ \ <SID>check_back_space() ? "\<Tab>" :
+ \ coc#refresh()
+
+inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
+
" options
set tabstop=2
set shiftwidth=2
@@ -20,7 +42,15 @@ set smartindent
syntax on
filetype plugin indent on
set termguicolors
-let ayucolor="mirage"
-colorscheme ayu
+colorscheme onedark
let g:lightline = {
- \ 'colorscheme': 'ayu_mirage'}
+ \ 'colorscheme': 'onedark',
+ \ 'active': {
+ \ 'left': [ [ 'mode', 'paste' ],
+ \ [ 'cocstatus', 'currentfunction', 'readonly', 'filename', 'modified' ] ]
+ \ },
+ \ 'component_function': {
+ \ 'cocstatus': 'coc#status',
+ \ 'currentfunction': 'CocCurrentFunction'
+ \ },
+ \ }