neovim update

master
Ewen 2 years ago
parent 9ab1d6c9f3
commit e5991c2cd6

@ -1,81 +1,125 @@
" Created: Wed 12 Jul 2017 08:31:59 PM CEST
" Modified: Sat 14 Mar 2020 04:25:18 PM CET
" General config
set nocompatible
set number
set autoindent
set tabstop=2
set shiftwidth=2
set noexpandtab
set showmatch
syntax enable
" Created: Sat 09 Jan 2021 11:11:19 AM CET
" Modified: Sat 09 Jan 2021 12:16:32 PM CET
"
"""""""""""""
" Plugins (vim-plug)
"""""""""""""
call plug#begin('~/.config/nvim/plugged')
""" Style
"Plug 'arcticicestudio/nord-vim' " Nord color scheme
Plug 'sonph/onehalf', { 'rtp': 'vim' } " onehalf color theme
Plug 'vim-scripts/timestamp.vim' " Add the date of creation/edition at the beginning of the file
let python_highlight_all = 1
Plug 'vim-airline/vim-airline' " Fancy bottom line in vim/neovim
Plug 'vim-airline/vim-airline-themes' " Themes for vim-airlines
Plug 'vim-pandoc/vim-pandoc' " Pandoc support
Plug 'vim-pandoc/vim-pandoc-syntax' " Markdown syntax support
Plug 'dpelle/vim-Grammalecte' " French ortho/grammar spelling
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
" To install, run in vim: ':PlugInstall'
call plug#begin('~/.local/share/nvim/plugged')
Plug 'tpope/vim-commentary' " Easy commenting
Plug 'preservim/nerdtree'
Plug 'iamcco/markdown-preview.vim'
Plug 'vim-scripts/timestamp.vim'
" Plug 'python-mode/python-mode'
Plug 'vimwiki/vimwiki'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'michal-h21/vim-zettel'
Plug 'davidhalter/jedi-vim'
Plug 'scrooloose/nerdtree' " Side window files navigation
Plug 'Xuyuanp/nerdtree-git-plugin' " To see new or modified files in the nerdtree window
""" Auto completion
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'zchee/deoplete-jedi' " source for python autocompletion
Plug 'Shougo/neco-syntax' " other sources for autocompletion
Plug 'davidhalter/jedi-vim' " Code jump
" Initialize plugin system
call plug#end()
" Mouse support
set mouse=a
" Markdown preview
let g:mkdp_path_to_chrome = "firefox"
" HTML indentation: only two spaces
autocmd Filetype html setlocal tabstop=2
autocmd Filetype html setlocal shiftwidth=2
autocmd Filetype css setlocal tabstop=2
autocmd Filetype css setlocal shiftwidth=2
" vim-zettel configuration
" Filename format. The filename is created using strftime() function
let g:zettel_format = "%y%m%d-%H%M-%title"
" command used for VimwikiSearch
" possible values: "ag", "rg", "grep"
let g:zettel_fzf_command = "ag"
" Disable default keymappings
let g:zettel_default_mappings = 0
" This is basically the same as the default configuration
augroup filetype_vimwiki
autocmd!
autocmd FileType vimwiki imap <silent> [[ [[<esc><Plug>ZettelSearchMap
autocmd FileType vimwiki nmap T <Plug>ZettelYankNameMap
autocmd FileType vimwiki xmap z <Plug>ZettelNewSelectedMap
autocmd FileType vimwiki nmap gZ <Plug>ZettelReplaceFileWithLink
augroup END
" Settings for Vimwiki
let g:vimwiki_list = [{'path':'~/Documents/zettel/markdown',
\ 'path_html':'~/Documents/zettel/html',
\ 'ext':'.md',
\ 'syntax':'markdown'},
\ {'path':'~/these/doc/wiki/markdown',
\ 'path_html':'~/these/doc/wiki/html',
\ 'ext':'.md',
\ 'syntax':'markdown'}]
" to not consider all .md files as wiki files
let g:vimwiki_global_ext = 0
let g:zettel_options = [{"front_matter": {"tags": ""}}]
""" Airline
let g:airline_powerline_fonts=1
let g:airline#extensions#wordcount#filetypes='pandoc\|text\|' "Add support when pandoc is activated
let g:airline_theme='onehalflight'
""" Autocompletion
let g:deoplete#enable_at_startup=1 " start deoplete at startup
autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif " Close suggestion window at completion
let g:jedi#completions_enabled=0 " disable autocompletion, cause we use deoplete for completion
let g:jedi#use_splits_not_buffers="right" " open the go-to function in split, not another buffer
"""""""""""""
" sets
"""""""""""""
set smartindent
set tabstop=4
set expandtab
set softtabstop=4
set shiftwidth=4
set showcmd " Show (partial) command in status line
set showmode " Show indication of having changed modes
set showmatch " Show matching brackets
set ignorecase " Do case insensitive matching
set smartcase " Do smart case matching
set hlsearch " Highlight search
"let g:rg_highlight='true' " Activate ripgrep Highlighting
"nnoremap <silent> <C-l> :nohlsearch<CR><C-l> " set C-l to :nohlsearch
"set autowrite " Automatically save before commands like :next and :make
set hidden " Hide buffers when they are abandoned
set mouse=a " Enable mouse usage (all modes)
set linebreak " Line wrap
set tw=79 " Lines longer than 79 chars will be wrapped
autocmd FileType gitcommit set textwidth=72 " Wrap lines longer than 72 chars for git messages
"set colorcolumn=+1 " Colors the tw+1 column
autocmd FileType gitcommit set colorcolumn+=51 " Add a colored column at 51 chars for git message titles
set number " Line numbering
"au TermOpen * setlocal listchars= nonumber norelativenumber " Start terminal buffer without line numbering
set cursorline " Color the cursor line
"set modeline " Support modelines
set clipboard+=unnamedplus " Copy to clipboard with +y
""" Spelling
set spell " Spelling activated
set spelllang=fr,en " by default for French, English
let g:grammalecte_cli_py='/usr/bin/grammalecte-cli' " Path for grammalecte-cli to get grammar check in French
""" Folding
set foldmethod=syntax
set foldlevel=1
" Default fold type for HTML
autocmd FileType html set tabstop=2
autocmd FileType html set softtabstop=2
autocmd FileType html set shiftwidth=2
" Default fold type for XML
let g:xml_syntax_folding=3
au FileType xml setlocal foldmethod=syntax
autocmd FileType xml set foldlevel=1
"""""""""""""
" Filetypes
"""""""""""""
" Filetype detection
filetype plugin on
" Format indentation
if has("autocmd")
filetype plugin indent on
endif
"""""""""""""
" Theme
"""""""""""""
syntax enable
colorscheme onehalflight

@ -0,0 +1,81 @@
" Created: Wed 12 Jul 2017 08:31:59 PM CEST
" Modified: Sat 09 Jan 2021 11:10:17 AM CET
" General config
set nocompatible
set number
set autoindent
set tabstop=2
set shiftwidth=2
set noexpandtab
set showmatch
syntax enable
let python_highlight_all = 1
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
" To install, run in vim: ':PlugInstall'
call plug#begin('~/.local/share/nvim/plugged')
Plug 'preservim/nerdtree'
Plug 'iamcco/markdown-preview.vim'
Plug 'vim-scripts/timestamp.vim'
" Plug 'python-mode/python-mode'
Plug 'vimwiki/vimwiki'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'michal-h21/vim-zettel'
Plug 'davidhalter/jedi-vim'
" Initialize plugin system
call plug#end()
" Mouse support
set mouse=a
" Markdown preview
let g:mkdp_path_to_chrome = "firefox"
" HTML indentation: only two spaces
autocmd Filetype html setlocal tabstop=2
autocmd Filetype html setlocal shiftwidth=2
autocmd Filetype css setlocal tabstop=2
autocmd Filetype css setlocal shiftwidth=2
" vim-zettel configuration
" Filename format. The filename is created using strftime() function
let g:zettel_format = "%y%m%d-%H%M-%title"
" command used for VimwikiSearch
" possible values: "ag", "rg", "grep"
let g:zettel_fzf_command = "ag"
" Disable default keymappings
let g:zettel_default_mappings = 0
" This is basically the same as the default configuration
augroup filetype_vimwiki
autocmd!
autocmd FileType vimwiki imap <silent> [[ [[<esc><Plug>ZettelSearchMap
autocmd FileType vimwiki nmap T <Plug>ZettelYankNameMap
autocmd FileType vimwiki xmap z <Plug>ZettelNewSelectedMap
autocmd FileType vimwiki nmap gZ <Plug>ZettelReplaceFileWithLink
augroup END
" Settings for Vimwiki
let g:vimwiki_list = [{'path':'~/Documents/zettel/markdown',
\ 'path_html':'~/Documents/zettel/html',
\ 'ext':'.md',
\ 'syntax':'markdown'},
\ {'path':'~/these/doc/wiki/markdown',
\ 'path_html':'~/these/doc/wiki/html',
\ 'ext':'.md',
\ 'syntax':'markdown'}]
" to not consider all .md files as wiki files
let g:vimwiki_global_ext = 0
let g:zettel_options = [{"front_matter": {"tags": ""}}]
Loading…
Cancel
Save