Skip to content

Instantly share code, notes, and snippets.

@eightseventhreethree
Last active October 7, 2023 02:28
Show Gist options
  • Save eightseventhreethree/72e49bf52ae891ab4dc097769bc97a7d to your computer and use it in GitHub Desktop.
Save eightseventhreethree/72e49bf52ae891ab4dc097769bc97a7d to your computer and use it in GitHub Desktop.
.nvimrc
filetype plugin indent on
set autowrite
set shiftwidth=2
set softtabstop=2
set expandtab
set tabstop=2
set visualbell
set mouse-=a
set backspace=indent,eol,start
set smartindent
set guicursor=
set nofixendofline
syntax on
" VimPlug
"call plug#begin('~/.vim/plugged')
"Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
"Plug 'itchyny/lightline.vim'
"Plug 'stephpy/vim-yaml'
"Plug 'yggdroot/indentline'
"Plug 'dense-analysis/ale'
"Plug 'towolf/vim-helm'
"Plug 'hashivim/vim-terraform'
"Plug 'rhadley-recurly/vim-terragrunt'
"Plug 'rust-lang/rust.vim'
"Plug 'jeffkreeftmeijer/vim-numbertoggle'
"Plug 'preservim/nerdtree'
"Plug 'wellle/context.vim'
"Plug '~/.fzf'
""call plug#end()
" Keybindings
" Clear space after lines
nnoremap <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar><CR>
" Enable vim-numbertoggle
set number relativenumber
" Toggle relative line number off and disable IndentLines
nnoremap <F6> :set nornu nonu<CR>:IndentBlanklineDisable<CR>
" Toggle relative line number back on and enable IndentLines
nnoremap <F7> :set number relativenumber<CR>:IndentBlanklineEnable<CR>
" NERDTree
" Start NERDTree when Vim is started without file arguments.
" autocmd StdinReadPre * let s:std_in=1
" autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | endif
" vim context
let g:context_enabled = 1
" YAML
let g:syntastic_yaml_checkers = ['yamllint']
" Terraform
let g:terraform_fmt_on_save=1
let g:hcl_fmt_autosave = 1
let g:terraform_align=1
let g:terraform_commentstring='//%s'
" Go syntax highlighting
let g:go_highlight_fields = 1
let g:go_highlight_functions = 1
let g:go_highlight_function_calls = 1
let g:go_highlight_extra_types = 1
let g:go_highlight_operators = 1
" Go Auto formatting and importing
let g:go_fmt_autosave = 1
let g:go_fmt_command = "goimports"
" Go Status line types/signatures
let g:go_auto_type_info = 1
au filetype go inoremap <buffer> . .<C-x><C-o>
" Rustfmt
let g:rustfmt_autosave = 1
:highlight ExtraWhitespace ctermbg=red guibg=red
:match ExtraWhitespace /\s\+$/
@eightseventhreethree
Copy link
Author

eightseventhreethree commented Aug 21, 2023

load in lazyvim: ~/.config/nvim/init.lua

-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")
vim.cmd("source ~/.nvimrc")

load plugins w/ lazyvim: ~/.config/nvim/lua/plugins/plugins.lua

return {
  { "fatih/vim-go" },
  { "itchyny/lightline.vim" },
  { "stephpy/vim-yaml" },
  { "towolf/vim-helm" },
  { "hashivim/vim-terraform" },
  { "rhadley-recurly/vim-terragrunt" },
  { "rust-lang/rust.vim" },
  { "jeffkreeftmeijer/vim-numbertoggle" },
  { "wellle/context.vim" },
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment