add plugins

This commit is contained in:
Jeff Lance 2021-03-27 17:01:57 +01:00
parent c26998d583
commit 8454b2cf14
2 changed files with 140 additions and 13 deletions

View File

@ -219,10 +219,19 @@ au BufNewFile,BufRead *.js, *.html, *.css
\ set tabstop=2
\ set softtabstop=2
\ set shiftwidth=2
" Treat all .md files as markdown
au BufNewFile,BufRead *.md set filetype=markdown
" astroid format=flowed
au FileType mail setlocal tw=72
au FileType mail setlocal fo+=q
au FileType mail setlocal comments+=nb:>
" markdown
" Hide and format markdown elements like **bold**
au FileType markdown set conceallevel=2
" Set spell check to British English
au FileType markdown setlocal spell spelllang=fr_fr
" Let the cursor traverse to the previous or following line when at the or the
" end of a line
@ -478,6 +487,7 @@ let g:EditorConfig_exclude_patterns = ['fugitive://.*', 'scp://.*']
au FileType gitcommit let b:EditorConfig_disable = 1
au FileType conf let b:EditorConfig_disable = 1
au FileType cls let b:EditorConfig_disable = 1
au FileType md let b:EditorConfig_disable = 1
au FileType sty let b:EditorConfig_disable = 1
au FileType tex let b:EditorConfig_disable = 1
@ -518,11 +528,116 @@ let g:header_auto_add_header = 0
" }}}
" Markdown {{{
" -----
let g:vim_markdown_conceal = 2
let g:vim_markdown_conceal_code_blocks = 0
let g:vim_markdown_math = 1
let g:vim_markdown_toml_frontmatter = 1
let g:vim_markdown_frontmatter = 1
let g:vim_markdown_strikethrough = 1
let g:vim_markdown_autowrite = 1
let g:vim_markdown_edit_url_in = 'tab'
let g:vim_markdown_follow_anchor = 1
" -----
" }}}
" Markdown preview {{{
" -----
let vim_markdown_preview_toggle=1
let vim_markdown_preview_browser='x-www-browser'
" set to 1, nvim will open the preview window after entering the markdown buffer
" default: 0
let g:mkdp_auto_start = 1
" set to 1, the nvim will auto close current preview window when change
" from markdown buffer to another buffer
" default: 1
let g:mkdp_auto_close = 1
" set to 1, the vim will refresh markdown when save the buffer or
" leave from insert mode, default 0 is auto refresh markdown as you edit or
" move the cursor
" default: 0
let g:mkdp_refresh_slow = 0
" set to 1, the MarkdownPreview command can be use for all files,
" by default it can be use in markdown file
" default: 0
let g:mkdp_command_for_global = 0
" set to 1, preview server available to others in your network
" by default, the server listens on localhost (127.0.0.1)
" default: 0
let g:mkdp_open_to_the_world = 0
" use custom IP to open preview page
" useful when you work in remote vim and preview on local browser
" more detail see: https://github.com/iamcco/markdown-preview.nvim/pull/9
" default empty
let g:mkdp_open_ip = ''
" specify browser to open preview page
" default: ''
let g:mkdp_browser = ''
" set to 1, echo preview page url in command line when open preview page
" default is 0
let g:mkdp_echo_preview_url = 0
" a custom vim function name to open preview page
" this function will receive url as param
" default is empty
let g:mkdp_browserfunc = ''
" options for markdown render
" mkit: markdown-it options for render
" katex: katex options for math
" uml: markdown-it-plantuml options
" maid: mermaid options
" disable_sync_scroll: if disable sync scroll, default 0
" sync_scroll_type: 'middle', 'top' or 'relative', default value is 'middle'
" middle: mean the cursor position alway show at the middle of the preview page
" top: mean the vim top viewport alway show at the top of the preview page
" relative: mean the cursor position alway show at the relative positon of the preview page
" hide_yaml_meta: if hide yaml metadata, default is 1
" sequence_diagrams: js-sequence-diagrams options
" content_editable: if enable content editable for preview page, default: v:false
" disable_filename: if disable filename header for preview page, default: 0
let g:mkdp_preview_options = {
\ 'mkit': {},
\ 'katex': {},
\ 'uml': {},
\ 'maid': {},
\ 'disable_sync_scroll': 0,
\ 'sync_scroll_type': 'middle',
\ 'hide_yaml_meta': 1,
\ 'sequence_diagrams': {},
\ 'flowchart_diagrams': {},
\ 'content_editable': v:false,
\ 'disable_filename': 0
\ }
" use a custom markdown style must be absolute path
" like '/Users/username/markdown.css' or expand('~/markdown.css')
let g:mkdp_markdown_css = ''
" use a custom highlight style must absolute path
" like '/Users/username/highlight.css' or expand('~/highlight.css')
let g:mkdp_highlight_css = ''
" use a custom port to start server or random for empty
let g:mkdp_port = ''
" preview page title
" ${name} will be replace with the file name
let g:mkdp_page_title = '「${name}」'
" recognized filetypes
" these filetypes will have MarkdownPreview... commands
let g:mkdp_filetypes = ['markdown']
" -----
" }}}
@ -537,6 +652,20 @@ let g:python3_host_prog = '/usr/bin/python3'
" }}}
" OCaml {{{
" -----
" merlin
let g:opamshare = substitute(system('opam config var share'),'\n$','','''')
execute "set rtp+=" . g:opamshare . "/merlin/vim"
" ocp-indent
set rtp^="/home/jeff/.opam/default/share/ocp-indent/vim"
" -----
" }}}
" Slime {{{
" -----
let g:slime_target = "tmux"

View File

@ -41,6 +41,9 @@ call plug#begin('~/.local/share/nvim/plugged')
" Startup screen
Plug 'mhinz/vim-startify'
" Ansible
Plug 'pearofducks/ansible-vim'
" Deoplete
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'Shougo/defx.nvim', { 'do': ':UpdateRemotePlugins' }
@ -61,8 +64,9 @@ Plug 'Konfekt/FastFold'
Plug 'dpelle/vim-Grammalecte'
" Markdown
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() } }
" Plug 'plasticboy/vim-markdown', { 'for': 'markdown' }
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
Plug 'godlygeek/tabular'
Plug 'plasticboy/vim-markdown'
" Git integration
Plug 'tpope/vim-fugitive'
@ -76,9 +80,6 @@ Plug 'tpope/vim-commentary'
" Abolish
Plug 'tpope/vim-abolish'
" " Vinegar
" Plug 'tpope/vim-vinegar'
" Show hex codes as colors
" Plug 'chrisbra/Colorizer'
Plug 'norcalli/nvim-colorizer.lua'
@ -91,12 +92,6 @@ Plug 'lervag/vimtex'
" Open file
Plug 'amix/open_file_under_cursor.vim'
" Python autocompletion
" Plug 'deoplete-plugins/deoplete-jedi'
" Completion from other opened files
" Plug 'Shougo/context_filetype.vim'
" Linting
Plug 'dense-analysis/ale'
@ -154,6 +149,9 @@ Plug 'neoclide/coc.nvim', {'branch': 'release'}
" REPL
Plug 'jpalardy/vim-slime'
" " Mermaid diagram
" Plug 'zhaozg/vim-diagram'
" Required {{{
" -----