dotfiles

Configuration files to dump into your home directory.
git clone git://git.swab.dev/dotfiles.git
Log | Files | Refs

commit cebc6e94bed77a232f31a0a66ca7b226e9897273
parent ed1fae583f09c916fb617d0a2ae6b6a965275ea7
Author: Jaron Swab <jaron@swab.dev>
Date:   Fri, 15 Oct 2021 23:20:04 -0400

fixed merge conflict

Diffstat:
M.config/nvim/init.vim | 124+++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------
1 file changed, 80 insertions(+), 44 deletions(-)

diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim @@ -1,53 +1,84 @@ -set nocompatible " be iMproved, required +set nocompatible " be iMproved, required " junegunn/vim-plug call plug#begin('~/.local/share/nvim/plugs') -Plug 'wikitopian/hardmode' -Plug 'vim-syntastic/syntastic' +" ------------- Plugins ------------- +" Plugin Manager -> junegunn/vim-plug +call plug#begin(stdpath('data') . '/plugs') +" Utility Plugins +Plug 'neovim/nvim-lspconfig' " Neovim Language Server (0.5.0+) +Plug 'airblade/vim-gitgutter' " On screen Git updates +Plug 'nvim-lua/completion-nvim' " Auto completion +Plug 'itchyny/vim-gitbranch' " Git branch in status bar +" Syntax Based Plugins Plug 'fatih/vim-go' Plug 'koalaman/shellcheck' -" themes +Plug 'vim-syntastic/syntastic' +" Theme Based Plugins Plug 'arcticicestudio/nord-vim' -" All of your Plugins must be added before the following line -call plug#end() " required +Plug 'itchyny/lightline.vim' " Status line themes +call plug#end() -"no arrow keys -no <up> <Nop> -no <down> <Nop> -no <left> <Nop> -no <right> <Nop> +" ----------- Lua Scripts ----------- +" Must use Neovim 0.5.0+ +lua <<EOF + lspconfig = require "lspconfig" -ino <up> <Nop> -ino <down> <Nop> -ino <left> <Nop> -ino <right> <Nop> + lspconfig.gopls.setup { + cmd = {"gopls", "serve"}, + filetyes = {"go"}, + settings = { + gopls = { + analyses = { + unusedparams = true, + }, + staticcheck = true, + }, + }, + } +EOF +" --------- End Lua Scripts --------- -vno <up> <Nop> -vno <down> <Nop> -vno <left> <Nop> -vno <right> <Nop> +" ------ Colors & Highlighting ------ +syntax on +colorscheme nord -" No shift to enter command mode -nnoremap ; : +set colorcolumn=100 +highlight ColorColumn ctermbg=0 + +" More Colors for Golang +let g:go_highlight_types = 1 +let g:go_highlight_fields = 1 +let g:go_highlight_functions = 1 +let g:go_highlight_function_calls = 1 + +" ----------- Status Line ----------- +set laststatus=2 +" For 'itchyny/lightline.vim' plugin +set noshowmode +let g:lightline = { + \ 'colorscheme': 'nord', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], + \ [ 'readonly', 'filename', 'modified' ] ], + \ 'right': [ [ 'lineinfo' ], + \ [ 'percent' ], + \ [ 'fileformat', 'fileencoding', 'filetype', 'gitbranch' ] ] + \ }, + \ 'component_function': { + \ 'gitbranch': 'gitbranch#name' + \ }, + \ } -" Interface Options +" ------- Interface Options --------- set number -" set relativenumber set noerrorbells +set nowrap set cursorline set ruler set title set linebreak set showmatch " highlight matching {}[]() etc. -colorscheme nord -" Change color to red in over length -highlight OverLength ctermbg=red ctermfg=white guibg=#592929 -match OverLength /\%81v.*/ -" More Colors for Golang -let g:go_highlight_types = 1 -let g:go_highlight_fields = 1 -let g:go_highlight_functions = 1 -let g:go_highlight_function_calls = 1 " Search set hlsearch @@ -70,24 +101,29 @@ set shiftwidth=2 " Display of vim tab commands such as `>` and `<` set softtabstop=0 set noexpandtab " Don't change tabs to spaces -" Status Line -set laststatus=2 -set statusline= -set statusline+=%f " file -set statusline+=\ -\ " " separator -set statusline+=FileType: " label -set statusline+=%y " File type of file -set statusline+=\ -\ " " separator -set statusline+=col:\ %c " Column numbers +" ------- Utility & Usability ------- +" No shift to enter command mode +nnoremap ; : " Leader Keybindings let mapleader="," noremap <leader>q :wq<cr> + "" Best used with Programmer Dvorak keyboard layout inoremap <leader>. <Esc> vnoremap <leader>. <Esc> - -" Miscellaneous Options set history=1000 -syntax on +" Disable Arrow Keys +no <up> <Nop> +no <down> <Nop> +no <left> <Nop> +no <right> <Nop> +ino <up> <Nop> +ino <down> <Nop> +ino <left> <Nop> +ino <right> <Nop> +vno <up> <Nop> +vno <down> <Nop> +vno <left> <Nop> +vno <right> <Nop>