diff --git a/dotfiles/.config/nvim/.vimrc b/dotfiles/.config/nvim/.vimrc deleted file mode 100644 index a849f6f..0000000 --- a/dotfiles/.config/nvim/.vimrc +++ /dev/null @@ -1,4 +0,0 @@ -:syntax on -:set tabstop=2 -:set hlsearch -:set relativenumber diff --git a/dotfiles/.config/nvim/coc-settings.json b/dotfiles/.config/nvim/coc-settings.json deleted file mode 100644 index ef1d99a..0000000 --- a/dotfiles/.config/nvim/coc-settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "diagnostic.checkCurrentLine": true -} diff --git a/dotfiles/.config/nvim/init.vim b/dotfiles/.config/nvim/init.vim deleted file mode 100644 index a42a7b7..0000000 --- a/dotfiles/.config/nvim/init.vim +++ /dev/null @@ -1,65 +0,0 @@ -" Smart indent and and better tab length -set formatoptions-=cro -set tabstop=3 softtabstop=3 -set shiftwidth=3 -set expandtab -set smartindent - -set nu -set relativenumber -set nohlsearch -set hidden -set incsearch -set scrolloff=8 -set colorcolumn=80 -set signcolumn=yes - -" Remove arrow keys to train my fingers -noremap -noremap -noremap -noremap - -" set to space -nnoremap -let mapleader=" " - -call plug#begin('~/.vim/plugged') -" Syntax highlighting and autocomplete for nvim -Plug 'neoclide/coc.nvim', {'branch': 'release'} - -" FZF for better file jumping. -Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } -Plug 'junegunn/fzf.vim' - -" Theme and Syntax Highlighting -Plug 'morhetz/gruvbox' -Plug 's3rvac/vim-syntax-yara' -call plug#end() - -" Set colorscheme -let g:gruvbox_contrast_dark = 'hard' - -" Transparent background with gruvbox theme -colorscheme gruvbox -set background=dark -hi Normal guibg=NONE ctermbg=NONE - -" Yara syntax highlighting -autocmd BufNewFile,BufRead *.yar,*.yara setlocal filetype=yara - -" FZF key bindings -nnoremap ff Files -nnoremap fg Rg -nnoremap fb Buffers - -" use 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 - -inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() diff --git a/home/neovim.nix b/home/neovim.nix index f6fe340..7ebbedb 100644 --- a/home/neovim.nix +++ b/home/neovim.nix @@ -10,7 +10,52 @@ }; plugins = with pkgs.vimPlugins; [ + supertab + nvim-fzf vim-airline + + # COC packages. + coc-sh + coc-css + coc-html + coc-json + coc-yaml + coc-svelte + coc-clangd + coc-docker + coc-tsserver + coc-rust-analyzer ]; + + extraConfig = '' + " Better smart indenting. + set formatoptions-=cro + set tabstop=4 softtabstop=4 + set shiftwidth=4 + set expandtab + set smartindent + + set nu + set relativenumber + set nohlsearch + set hidden + set incsearch + set scrolloff=8 + set colorcolumn=80 + set signcolumn=yes + + " Remove arrow keys to train my fingers + noremap + noremap + noremap + noremap + + " FZF key bindings + nnoremap pf Files + nnoremap pg Rg + + " Supertab start at top of completion list + let g:SuperTabContextDefaultCompletionType = "" + ''; }; }