summaryrefslogtreecommitdiff
path: root/.config/nvim
diff options
context:
space:
mode:
authorseth <[email protected]>2022-07-01 21:51:47 -0400
committerseth <[email protected]>2022-08-04 04:40:57 -0400
commit210adb6461ec9ac8243f39e4efd6f78b041d4a01 (patch)
treee99d7010394d970e017c7fa9f5d7b420c502ae39 /.config/nvim
parentac74db5a8fa69e5d3047b35f70c65b27dc07cfcb (diff)
xdg-ified
Diffstat (limited to '.config/nvim')
-rwxr-xr-x.config/nvim/coc-settings.json18
-rw-r--r--.config/nvim/init.vim38
2 files changed, 52 insertions, 4 deletions
diff --git a/.config/nvim/coc-settings.json b/.config/nvim/coc-settings.json
new file mode 100755
index 0000000..22e27a8
--- /dev/null
+++ b/.config/nvim/coc-settings.json
@@ -0,0 +1,18 @@
+{
+ "languageserver": {
+ "bash": {
+ "command": "bash-language-server",
+ "args": [
+ "start"
+ ],
+ "filetypes": [
+ "sh",
+ "PKGBUILD"
+ ]
+ }
+ },
+ "python.linting.flake8Enabled": true,
+ "coc.preferences.formatOnSaveFiletypes": [
+ "json"
+ ]
+}
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'
+ \ },
+ \ }