Last active
March 8, 2018 03:25
-
-
Save googolmo/d05f7a0b55017ee4c6a370647ebe0c11 to your computer and use it in GitHub Desktop.
NeoVim Config
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
" Specify a directory for plugins | |
" - For Neovim: ~/.local/share/nvim/plugged | |
call plug#begin("~/.local/share/nvim/plugged") | |
Plug 'autozimu/LanguageClient-neovim', { 'do': ':UpdateRemotePlugins' } | |
Plug 'roxma/nvim-completion-manager' | |
" Using a tagged release; wildcard allowed (requires git 1.9.2 or above) | |
Plug 'fatih/vim-go', { 'tag': '*' } | |
" vim-airline | |
Plug 'vim-airline/vim-airline' | |
Plug 'vim-airline/vim-airline-themes' | |
Plug 'pangloss/vim-javascript' | |
Plug 'pbrisbin/vim-colors-off' | |
" Plug 'arakashic/chromatica.nvim' | |
call plug#end() | |
syntax enable | |
set number | |
" enable line and column display | |
set ruler | |
" improved keyboard navigation | |
nnoremap <leader>h <C-w>h | |
nnoremap <leader>j <C-w>j | |
nnoremap <leader>k <C-w>k | |
nnoremap <leader>l <C-w>l | |
" improved keyboard support for navigation (especially terminal) | |
" https://neovim.io/doc/user/nvim_terminal_emulator.html | |
tnoremap <Esc> <C-\><C-n> | |
tnoremap <A-h> <C-\><C-n><C-w>h | |
tnoremap <A-j> <C-\><C-n><C-w>j | |
tnoremap <A-k> <C-\><C-n><C-w>k | |
tnoremap <A-l> <C-\><C-n><C-w>l | |
nnoremap <A-h> <C-w>h | |
nnoremap <A-j> <C-w>j | |
nnoremap <A-k> <C-w>k | |
nnoremap <A-l> <C-w>l | |
tnoremap <C-x> <C-\><C-n><C-w>q | |
" http://vim.wikia.com/wiki/Highlight_current_line | |
" http://stackoverflow.com/questions/8750792/vim-highlight-the-whole-current-line | |
" http://vimdoc.sourceforge.net/htmldoc/autocmd.html#autocmd-events | |
autocmd BufEnter * setlocal cursorline | |
autocmd WinEnter * setlocal cursorline | |
autocmd BufLeave * setlocal nocursorline | |
autocmd WinLeave * setlocal nocursorline | |
" Required for operations modifying multiple buffers like rename. | |
set hidden | |
let g:LanguageClient_serverCommands = { | |
\ 'dart': ['dart_language_server'], | |
\ } | |
" ===================================== | |
" Go | |
" https://github.com/fatih/vim-go | |
" ===================================== | |
let g:go_highlight_functions = 1 | |
let g:go_highlight_methods = 1 | |
let g:go_highlight_fields = 1 | |
let g:go_highlight_types = 1 | |
let g:go_highlight_operators = 1 | |
let g:go_highlight_build_constraints = 1 | |
" ===================================== | |
" Init | |
" ===================================== | |
autocmd VimEnter * wincmd p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment