Created
April 10, 2020 17:08
-
-
Save randywallace/20752a741a6245b8b0ad2677ddf748f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"diagnostic.virtualText": true, | |
"diagnostic.virtualTextPrefix": " ■ ", | |
"bash": { | |
"command": "bash-language-server", | |
"args": ["start"], | |
"filetypes": ["sh"], | |
"ignoredRootPaths": ["~"] | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set hidden | |
set termguicolors | |
set cmdheight=2 | |
set updatetime=300 | |
set shortmess+=c | |
set signcolumn=yes | |
filetype plugin on | |
set modelines=5 | |
set background=dark | |
set tabstop=2 | |
set softtabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set nowrap | |
set encoding=utf-8 | |
set number | |
set relativenumber | |
let mapleader = ',' | |
syntax on | |
set spell | |
set showmatch " show matching brackets/parenthesis | |
set incsearch " find as you type search | |
set backspace=indent,eol,start " backspace for dummies | |
set linespace=0 " No extra spaces between rows | |
set foldenable " auto fold code | |
set foldmethod=syntax | |
set guifont=PragmataPro\ 12 | |
set clipboard=unnamedplus | |
let g:python_host_prog = '/usr/bin/python2' | |
let g:python3_host_prog = '/usr/bin/python3' | |
set pyx=0 | |
call plug#begin('~/.local/share/nvim/plugged') | |
" Theme stuff | |
Plug 'vim-airline/vim-airline' | |
Plug 'vim-airline/vim-airline-themes' | |
Plug 'flazz/vim-colorschemes' | |
Plug 'phanviet/vim-monokai-pro' | |
Plug 'morhetz/gruvbox' | |
"Maven/Java | |
Plug 'mikelue/vim-maven-plugin' | |
" File Browser | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
" Buffer Explorer | |
Plug 'corntrace/bufexplorer' | |
" Autocompletion | |
" Plug 'neoclide/coc.nvim', {'tag': '*', 'do': './install.sh'} | |
" Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
" Terraform | |
Plug 'hashivim/vim-terraform' | |
" Plug 'juliosueiras/vim-terraform-completion' | |
" ListToggle - A simple vim plugin for toggling the display of the quickfix list and the location-list. | |
Plug 'Valloric/ListToggle' | |
" TagBar - an easy way to browse the tags of the current file and get an overview of its structure. | |
Plug 'majutsushi/tagbar' | |
" GitGutter - Show diff markers async | |
Plug 'airblade/vim-gitgutter' | |
Plug 'tpope/vim-fugitive' | |
" Gundo - visualize your Vim undo tree | |
Plug 'sjl/gundo.vim' | |
" Pig Syntax - very basic | |
Plug 'motus/pig.vim' | |
" A whole bunch of snippets | |
Plug 'honza/vim-snippets' | |
Plug 'tpope/vim-surround' | |
" Gradle integration | |
" Plug 'hsanson/vim-android' | |
" Plug 'neovim/nvim-lsp' | |
" Plug 'ervandew/supertab' | |
call plug#end() | |
" Airline (Statusbar) | |
let g:airline_powerline_fonts = 1 | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline#extensions#coc#enabled = 1 | |
" let g:airline#extensions#ale#enabled = 1 | |
" let g:airline_statusline_ontop=1 | |
" NERDTree Settings (Sidebar file browser) | |
let NERDTreeShowBookmarks=1 | |
let NERDTreeIgnore=['\.pyc', '\~$', '\.swo$', '\.swp$', '\.git', '\.hg', '\.svn', '\.bzr'] | |
let NERDTreeChDirMode=0 | |
let NERDTreeQuitOnOpen=1 | |
let NERDTreeShowHidden=1 | |
let NERDTreeKeepTreeInNewTab=1 | |
nnoremap <leader>e :NERDTreeToggle<CR> | |
let g:gruvbox_italic=1 | |
colorscheme gruvbox | |
" toggle Paste mode | |
nnoremap <leader>i :set invpaste paste?<CR> | |
""" Various CoC related Completion Items | |
function! s:check_back_space() abort | |
let col = col('.') - 1 | |
return !col || getline('.')[col - 1] =~ '\s' | |
endfunction | |
" use <tab> to trigger completion and navigate to the next complete item | |
inoremap <silent><expr> <TAB> | |
\ pumvisible() ? coc#_select_confirm() : | |
\ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" : | |
\ <SID>check_back_space() ? "\<TAB>" : | |
\ coc#refresh() | |
" Trigger Coc Completion manually | |
inoremap <silent><expr> <c-space> coc#refresh() | |
" setup all the extensions | |
let g:coc_global_extensions = [ 'coc-omni', 'coc-snippets', 'coc-json', 'coc-solargraph', 'coc-java', 'coc-word', 'coc-lists' ] | |
""" | |
" Any Coc errors or warnings show up in statusbar | |
" let g:airline_section_error = '%{airline#util#wrap(airline#extensions#coc#get_error(),0)}' | |
" let g:airline_section_warning = '%{airline#util#wrap(airline#extensions#coc#get_warning(),0)}' | |
" Terraform settings | |
" let g:terraform_align=1 | |
" let g:terraform_fold_sections=1 | |
" let g:terraform_remap_spacebar=1 | |
" let g:terraform_fmt_on_save=1 | |
" ListToggle | |
let g:lt_location_list_toggle_map = '<leader>l' | |
let g:lt_quickfix_list_toggle_map = '<leader>q' | |
let g:lt_height = 10 | |
" TagBar | |
nnoremap <silent> <leader>tt :TagbarToggle<CR> | |
" Gundo | |
nnoremap <leader>u :GundoToggle<CR> | |
let g:gitgutter_async=1 | |
" Exit terminal mode with esc | |
tnoremap <Esc> <C-\><C-n> | |
" Use `[c` and `]c` to navigate diagnostics | |
" nmap <silent> [c <Plug>(coc-diagnostic-prev) | |
" nmap <silent> ]c <Plug>(coc-diagnostic-next) | |
" Remap keys for gotos | |
" nmap <silent> gd <Plug>(coc-definition) | |
" nmap <silent> gy <Plug>(coc-type-definition) | |
" nmap <silent> gi <Plug>(coc-implementation) | |
" nmap <silent> gr <Plug>(coc-references) | |
" Use K to show documentation in preview window | |
" nnoremap <silent> K :call <SID>show_documentation()<CR> | |
" function! s:show_documentation() | |
" if (index(['vim','help'], &filetype) >= 0) | |
" execute 'h '.expand('<cword>') | |
" else | |
" call CocAction('doHover') | |
" endif | |
" endfunction | |
" Highlight symbol under cursor on CursorHold | |
" autocmd CursorHold * silent call CocActionAsync('highlight') | |
" Remap for rename current word | |
" nmap <leader>rn <Plug>(coc-rename) | |
" Remap for format selected region | |
" vmap <leader>f <Plug>(coc-format-selected) | |
" nmap <leader>f <Plug>(coc-format-selected) | |
" augroup mygroup | |
" autocmd! | |
" " Setup formatexpr specified filetype(s). | |
" autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') | |
" " Update signature help on jump placeholder | |
" autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') | |
" augroup end | |
" Remap for do codeAction of selected region, ex: `<leader>aap` for current paragraph | |
" vmap <leader>a <Plug>(coc-codeaction-selected) | |
" nmap <leader>a <Plug>(coc-codeaction-selected) | |
" Remap for do codeAction of current line | |
" nmap <leader>ac <Plug>(coc-codeaction) | |
" Fix autofix problem of current line | |
" nmap <leader>qf <Plug>(coc-fix-current) | |
" Use `:Format` to format current buffer | |
" command! -nargs=0 Format :call CocAction('format') | |
" Use `:Fold` to fold current buffer | |
" command! -nargs=? Fold :call CocAction('fold', <f-args>) | |
if !exists('g:airline_symbols') | |
let g:airline_symbols = {} | |
endif | |
let g:airline_symbols.paste = " " | |
let g:airline_symbols.spell = " " | |
let g:airline_symbols.notexists = " " | |
"let g:SuperTabDefaultCompletionType = "context" | |
"lua << EOF | |
"vim.lsp.set_log_level("trace"); | |
"require'nvim_lsp'.terraformls.setup{ | |
" log_level = vim.lsp.protocol.MessageType.Log; | |
" root_dir = function(fname) | |
" return vim.fn.getcwd() | |
" end; | |
" settings = { | |
" terraform = { | |
" indexing = { | |
" enabled = true | |
" }, | |
" languageServer = { | |
" enabled = true | |
" }, | |
" telemetry = { | |
" enabled = false | |
" } | |
" } | |
" } | |
"}; | |
"EOF | |
" | |
"autocmd Filetype terraform setlocal omnifunc=v:lua.vim.lsp.omnifunc(1) | |
" | |
"nnoremap <silent> gd <cmd>lua vim.lsp.buf.declaration()<CR> | |
"nnoremap <silent> <c-]> <cmd>lua vim.lsp.buf.definition()<CR> | |
"nnoremap <silent> K <cmd>lua vim.lsp.buf.hover()<CR> | |
"nnoremap <silent> gD <cmd>lua vim.lsp.buf.implementation()<CR> | |
"nnoremap <silent> <c-k> <cmd>lua vim.lsp.buf.signature_help()<CR> | |
"nnoremap <silent> 1gD <cmd>lua vim.lsp.buf.type_definition()<CR> | |
"nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR> | |
" | |
:nnoremap <Leader>q" ciw""<Esc>P | |
:nnoremap <Leader>q' ciw''<Esc>P | |
:nnoremap <Leader>qd daW"=substitute(@@,"'\\\|\"","","g")<CR>P | |
let g:xml_syntax_folding=1 | |
au FileType xml setlocal foldmethod=syntax |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment