summaryrefslogtreecommitdiff
path: root/.config/nvim/init.vim
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2021-08-12 19:04:01 -0700
committerxyz <gky44px1999@gmail.com>2021-08-12 19:04:01 -0700
commitd592979154042f3d6fd3216b8cabaa3a54f38414 (patch)
treea8473b653dd2f1b0be2519207a53b44460fdf6a9 /.config/nvim/init.vim
parent8e06cadf7c52a1f09de62416c7325259cfa20f72 (diff)
add colorscheme, disable fold, refactor
Diffstat (limited to '.config/nvim/init.vim')
-rw-r--r--.config/nvim/init.vim43
1 files changed, 28 insertions, 15 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index c76687b9..44fa10de 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -1,10 +1,23 @@
-" :h markdown
-let g:markdown_folding = 1
-let g:markdown_minlines = 200
-
" if without, nvim with no file will give error because it's not defined?
let fenc_bef = 0
+" https://github.com/junegunn/vim-plug
+call plug#begin()
+"Plug 'preservim/nerdtree'
+Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
+" https://github.com/junegunn/fzf.vim#commands
+Plug 'junegunn/fzf.vim'
+"Plug 'vim-airline/vim-airline'
+"Plug 'vim-perl/vim-perl', { 'for': 'perl', 'do': 'make clean carp dancer highlight-all-pragmas moose test-more try-tiny' }
+"Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } }
+" chriskempson/base16-vim doesn't do bold/italic for markdown syntax, and not maintained
+" below two base16 plugins seem both work, both support tree-sitter
+Plug 'fnune/base16-vim'
+"Plug 'RRethy/nvim-base16'
+" nvim-treesitter does not support markdown right now, so wait
+"Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} " We recommend updating the parsers on update
+call plug#end()
+
" I use only one return for better readability
function Autocmd_set_fenc()
" need to test &modifiable for gO
@@ -33,12 +46,23 @@ augroup mycmd
autocmd BufNewFile,BufRead *.csx setfiletype cs
augroup END
+" :h markdown, for vim default tpope/vim-markdown
+"let g:markdown_folding = 1
+let g:markdown_minlines = 500
+
" seems needs this for autocmd FileType * to work?
filetype plugin on
+" fold is slow and buggy, at least for different kinds of vim-markdown, disable it, not sure if works or not
+set nofoldenable
+
language en_US
set number relativenumber
+" need next line for base16 colorscheme to work?
+set termguicolors
+colorscheme base16-tomorrow-night
+
" set dir to current editing file's dir
set autochdir
@@ -71,17 +95,6 @@ set nobackup
set noswapfile
set noundofile
-" https://github.com/junegunn/vim-plug
-call plug#begin()
-"Plug 'preservim/nerdtree'
-Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
-" https://github.com/junegunn/fzf.vim#commands
-Plug 'junegunn/fzf.vim'
-"Plug 'vim-airline/vim-airline'
-"Plug 'vim-perl/vim-perl', { 'for': 'perl', 'do': 'make clean carp dancer highlight-all-pragmas moose test-more try-tiny' }
-"Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } }
-call plug#end()
-
" gg=G work for .xml files now,:h matchit-activate
" https://stackoverflow.com/questions/21408222/vim-indent-xml-file/28365920#28365920
packadd! matchit