Skip to content

Commit

Permalink
neovim stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
jmftrindade committed Mar 22, 2023
1 parent 67ef4e1 commit 660214f
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 22 deletions.
1 change: 1 addition & 0 deletions .bash_aliases.sdp
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ alias open='xdg-open'
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'
alias s='subl'
alias nv='nvim'
3 changes: 3 additions & 0 deletions .config/nvim/init.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc
59 changes: 37 additions & 22 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ set wildmode=longest,list,full
" Enable basic mouse behavior such as resizing buffers.
set mouse=a
if exists('$TMUX') " Support resizing in tmux
set ttymouse=xterm2
" https://neovim.io/doc/user/nvim.html#nvim-from-vim
if has('nvim')
tnoremap <Esc> <C-\><C-n>
else
set ttymouse=xterm2
endif
endif

" keyboard shortcuts
Expand Down Expand Up @@ -114,18 +119,23 @@ endif
" Don't copy the contents of an overwritten selection.
vnoremap p "_dP
" https://github.com/powerline/powerline
set guifont=Monaco\ for\ Powerline:h12
let g:Powerline_symbols = 'fancy'
set encoding=utf-8
set t_Co=256
set fillchars+=stl:\ ,stlnc:\
set term=xterm-256color
set termencoding=utf-8
" for compatibility with powerline:
set laststatus=2 " Always display the statusline in all windows
set showtabline=2 " Always display the tabline, even if there is only one tab
set noshowmode " Hide the default mode text (e.g. -- INSERT -- below the statusline)
" Powerline only when not in neovim mode.
if !has('nvim')
" https://github.com/powerline/powerline
set guifont=Monaco\ for\ Powerline:h12
let g:Powerline_symbols = 'fancy'
set encoding=utf-8
set t_Co=256
set fillchars+=stl:\ ,stlnc:\
set term=xterm-256color
set termencoding=utf-8
" for compatibility with powerline:
set laststatus=2 " Always display the statusline in all windows
set showtabline=2 " Always display the tabline, even if there is only one tab
set noshowmode " Hide the default mode text (e.g. -- INSERT -- below the statusline)
else
let g:powerline_loaded = 1
endif

" gui settings
if (&t_Co == 256 || has('gui_running'))
Expand All @@ -139,15 +149,20 @@ if (&t_Co == 256 || has('gui_running'))
"colorscheme desert
endif

" https://github.com/Valloric/YouCompleteMe
let g:ycm_confirm_extra_conf = 0
"let g:ycm_server_use_vim_stdout = 1
"let g:ycm_server_keep_logfiles = 1
let g:ycm_server_log_level = 'debug'
let g:ycm_max_diagnostics_to_display = 10000
let g:ycm_enable_diagnostic_signs = 1
let g:ycm_enable_diagnostic_highlighting = 0
let g:ycm_always_populate_location_list = 1 "default 0
" YouCompleteMe only when not in neovim mode.
if !has('nvim')
" https://github.com/Valloric/YouCompleteMe
let g:ycm_confirm_extra_conf = 0
"let g:ycm_server_use_vim_stdout = 1
"let g:ycm_server_keep_logfiles = 1
let g:ycm_server_log_level = 'debug'
let g:ycm_max_diagnostics_to_display = 10000
let g:ycm_enable_diagnostic_signs = 1
let g:ycm_enable_diagnostic_highlighting = 0
let g:ycm_always_populate_location_list = 1 "default 0
else
let g:loaded_youcompleteme = 1
endif

" https://github.com/google/vim-codefmt
augroup autoformat_settings
Expand Down

0 comments on commit 660214f

Please sign in to comment.