Skip to content

Instantly share code, notes, and snippets.

Created August 15, 2019 22:28
Show Gist options
  • Save jbaxleyiii/2f84714a121422af95bd8e49cd7e1c11 to your computer and use it in GitHub Desktop.
Save jbaxleyiii/2f84714a121422af95bd8e49cd7e1c11 to your computer and use it in GitHub Desktop.
set nocompatible
set hidden
syntax enable
colorscheme norma
" colorscheme dracula
let g:airline_theme='bubblegum'
filetype off
call plug#begin('~/.vim/plugged')
if filereadable(expand("~/.vimrc.plugs"))
source ~/.vimrc.plugs
call plug#end()
filetype plugin indent on
set fileformat=unix
set autoindent
set autoread
set backspace=indent,eol,start
set clipboard=unnamed
set directory-=.
set encoding=utf8
set expandtab
set ignorecase
set incsearch
set laststatus=2
set nolist
set number
set ruler
set scrolloff=3
set shiftwidth=2
set showcmd
set smartcase
set softtabstop=2
set tabstop=8
set wildignore=log/**,node_modules/**,target/**,tmp/**,*.rbc
set wildmenu
set wildmode=longest,list,full
set ve=onemore
" set term=screen-256color
set t_ut=
set mouse=a
set noshowmatch
set t_ZH=x27[3m
set t_ZR=x27[23m
set pastetoggle=<F9>
" set completeopt+=menu,longest,menuone,preview
set shortmess+=c
" set completeopt+=noinsert,noselect
set completeopt=noinsert,menuone,noselect
set noswapfile
set noerrorbells
set clipboard+=unnamedplus
" <TAB>: completion.
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
let mapleader = ','
inoremap jj <ESC>
noremap <C-h> <C-w>h
noremap <C-j> <C-w>j
noremap <C-k> <C-w>k
noremap <C-l> <C-l>l
noremap <leader>l :Align
noremap <leader>d :NERDTreeToggle<CR>
noremap <leader>f :NERDTreeFind<CR>
noremap <leader><space> :call whitespace#strip_trailing()<CR>
noremap <leader>g :GitGutterToggle<CR>
noremap gcc :vsc Edit.CommentSelection<CR>
noremap gc :vsc Edit.CommentSelection<CR>
let g:python_host_prog = '/home/linuxbrew/.linuxbrew/bin/python'
let s:python_version=has("python3") ? 3 : 2
let g:ctrlp_cmd='CtrlPBuffer'
let g:ctrlp_cache_dir=$HOME . '/.vim/.cache/ctrlp'
let g:NERDSpaceDelims=1
let g:gitgutter_enabled=1
let g:indent_guides_auto_colors=0
let g:jsx_ext_required=0
let g:jsx_pragma_required=0
let g:typescript_indent_disabled=1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#fnamemod = 1
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 0
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 0
let g:syntastic_check_on_wq = 0
let g:syntastic_cs_checkers = ['syntax', 'semantic', 'issues']
let g:prettier#autoformat = 0
" autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue PrettierAsync
autocmd BufNewFile,BufRead *.ts set filetype=typescript
autocmd BufNewFile,BufRead *.tsx set filetype=typescript
let g:ale_sign_column_always = 1
let g:ale_statusline_format = ['⨉ %d', '⚠ %d', '⬥ ok']
let NERDTreeMinimalUI = 1
let NERDTreeDirArrows = 1
let NERDChristmasTree = 1
let g:airline_powerline_fonts=1
" let g:airline_symbols_ascii = 1
" Automatically start language servers.
let g:LanguageClient_autoStart = 1
let g:LanguageClient_loggingLevel = 'DEBUG'
let g:LanguageClient_loggingFile = expand('~/.local/share/nvim/LanguageClient.log')
let g:LanguageClient_serverStderr = expand('~/.local/share/nvim/LanguageServer.log')
" Minimal LSP configuration for JavaScript
let g:LanguageClient_serverCommands = {
\ 'javascript': ['javascript-typescript-stdio'],
\ 'typescript': ['typescript-language-server', '--stdio'],
\ 'graphql': ['node', '~/Projects/apollo/apollo-tooling/packages/apollo-language-server/lib/server.js', '--stdio']
noremap <silent> H :call LanguageClient_textDocument_hover()<CR>
noremap <silent> Z :call LanguageClient_textDocument_definition()<CR>
noremap <silent> R :call LanguageClient_textDocument_rename()<CR>
noremap <silent> S :call LanguageClient_textDocument_documentSymbol()<CR>
function! LspMaybeHover(is_running) abort
if a:is_running.result
call LanguageClient_textDocument_hover()
function! LspMaybeHighlight(is_running) abort
if a:is_running.result
call LanguageClient#textDocument_documentHighlight()
augroup lsp_aucommands
au CursorHold * call LanguageClient#isAlive(function('LspMaybeHover'))
au CursorMoved * call LanguageClient#isAlive(function('LspMaybeHighlight'))
augroup END
autocmd BufEnter * call ncm2#enable_for_buffer()
" let g:deoplete#enable_at_startup = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment