neovim: only set line number for actual file buffers
This commit is contained in:
parent
ce8405840f
commit
28d1ed543a
|
@ -18,7 +18,6 @@ colorscheme gruvbox-material
|
||||||
" Miscellaneous boilerplate
|
" Miscellaneous boilerplate
|
||||||
set nocompatible " Disable vi compatibility
|
set nocompatible " Disable vi compatibility
|
||||||
set ignorecase
|
set ignorecase
|
||||||
set nu " Line numbers
|
|
||||||
set cc=80 " 80 characters
|
set cc=80 " 80 characters
|
||||||
set noswapfile
|
set noswapfile
|
||||||
set backupdir=~/.cache/nvim
|
set backupdir=~/.cache/nvim
|
||||||
|
@ -35,5 +34,14 @@ set autoindent
|
||||||
" Syntax highlighting
|
" Syntax highlighting
|
||||||
set syntax=on
|
set syntax=on
|
||||||
|
|
||||||
|
" Show line numbers on non-toolbar buffers
|
||||||
|
fun! ShowNumberIfNecessary()
|
||||||
|
if &ft =~ 'neo-tree'
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
setlocal nu
|
||||||
|
endfun
|
||||||
|
autocmd BufEnter * call ShowNumberIfNecessary()
|
||||||
|
|
||||||
" Startup commands
|
" Startup commands
|
||||||
autocmd UIEnter * Neotree
|
autocmd UIEnter * Neotree
|
||||||
|
|
Loading…
Reference in a new issue