Chris 5 سال پیش
والد
کامیت
b045061a7f
7فایلهای تغییر یافته به همراه40 افزوده شده و 21 حذف شده
  1. 9 1
      README.md
  2. 4 4
      init.vim
  3. 2 2
      modules/goyo-limelight.vim
  4. 18 6
      modules/markdowm_preview.vim
  5. 4 6
      modules/plugins.vim
  6. 1 0
      modules/sneak.vim
  7. 2 2
      modules/vim_wiki.vim

+ 9 - 1
README.md

@@ -93,6 +93,12 @@ yarn install --frozen-lockfile
 
 ## ALE Linting
 
+## Markdown Preview
+
+I had to cd into `dein/repos/github.com/iamcco/markdown-preview.nvim/`
+
+and run 'npx yarn install'
+
 ## TODO 
 
 - make better use of ftplugin
@@ -100,7 +106,7 @@ yarn install --frozen-lockfile
 - configure coc settings better 
 - need formatter for other languages
 - set up ale
-- Java support
+- Java support for Lombock, figured it out on work machine
 - Need support for image in current ranger implementation
 - https://github.com/kevinhwang91/rnvimr (Note Ueberzug doesn't work on mac which sucks, also neither does this plugin)
 - Check out more coc extensions
@@ -111,6 +117,8 @@ yarn install --frozen-lockfile
 - create keymap file and move combinations from general
 - ultisnips for autogenerate front matter with data and stuff
 - setup blog with vimwiki
+- vimwiki hijacks my TAB complete in md files so I'm disabling [link to issue](https://github.com/vimwiki/vimwiki/issues/353)
+- vimwiki also hijacks conceal level 
 
 ## Notes
 

+ 4 - 4
init.vim

@@ -9,7 +9,7 @@ source $HOME/.config/nvim/modules/general.vim
 source $HOME/.config/nvim/modules/fzf.vim
 source $HOME/.config/nvim/modules/ranger.vim
 source $HOME/.config/nvim/modules/nerdtree.vim
-source $HOME/.config/nvim/modules/markdown-preview.vim
+source $HOME/.config/nvim/modules/markdowm_preview.vim
 source $HOME/.config/nvim/modules/goyo-limelight.vim
 source $HOME/.config/nvim/modules/relativenums.vim
 source $HOME/.config/nvim/modules/emmet.vim
@@ -17,11 +17,11 @@ source $HOME/.config/nvim/modules/colorizer.vim
 source $HOME/.config/nvim/modules/rainbow.vim
 source $HOME/.config/nvim/modules/vim-which-key.vim
 source $HOME/.config/nvim/modules/echodoc.vim         " I forget what this does
-source $HOME/.config/nvim/modules/vim_wiki.vim
+source $HOME/.config/nvim/modules/coc.vim         
+source $HOME/.config/nvim/modules/sneak.vim         
 
 "source $HOME/.config/nvim/modules/gutentags_plus.vim " disabled until 141 error is fixed
 "source $HOME/.config/nvim/modules/ale.vim
 "source $HOME/.config/nvim/modules/pydocstring.vim
 "source $HOME/.config/nvim/modules/neosnippets.vim " I need to do my homework on snippets
-let g:sneak#label = 1
-
+"source $HOME/.config/nvim/modules/vim_wiki.vim

+ 2 - 2
modules/goyo-limelight.vim

@@ -10,7 +10,7 @@ let g:goy_height=95
 function! s:goyo_enter()
   
   "call deoplete#custom#option('auto_complete', v:false)
-  set spell spelllang=en_us
+  "set spell spelllang=en_us
   set wrap
   set conceallevel=0
   set tw=100
@@ -25,7 +25,7 @@ endfunction
 function! s:goyo_leave()
 
   "call deoplete#custom#option('auto_complete', v:true)
-  set nospell
+  "set nospell
   set wrap!
   set showcmd
   set scrolloff=5

+ 18 - 6
modules/markdown-preview.vim → modules/markdowm_preview.vim

@@ -1,4 +1,4 @@
-" set to 1, the nvim will open the preview window once enter the markdown buffer
+" set to 1, nvim will open the preview window after entering the markdown buffer
 " default: 0
 let g:mkdp_auto_start = 1
 
@@ -7,21 +7,21 @@ let g:mkdp_auto_start = 1
 " default: 1
 let g:mkdp_auto_close = 1
 
-" set to 1, the vim will just refresh markdown when save the buffer or
+" 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 just can be use in markdown file
+" 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 only listens on localhost (127.0.0.1)
+" by default, the server listens on localhost (127.0.0.1)
 " default: 0
-let g:mkdp_open_to_the_world = 0
+let g:mkdp_open_to_the_world = 1
 
 " use custom IP to open preview page
 " useful when you work in remote vim and preview on local browser
@@ -52,20 +52,32 @@ let g:mkdp_browserfunc = ''
 "   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
 let g:mkdp_preview_options = {
     \ 'mkit': {},
     \ 'katex': {},
     \ 'uml': {},
     \ 'maid': {},
     \ 'disable_sync_scroll': 0,
-    \ 'sync_scroll_type': 'middle'
+    \ 'sync_scroll_type': 'middle',
+    \ 'hide_yaml_meta': 1,
+    \ 'sequence_diagrams': {},
+    \ 'flowchart_diagrams': {}
     \ }
 
 " 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}」'
+

+ 4 - 6
modules/plugins.vim

@@ -64,7 +64,9 @@ if dein#load_state('~/.config/nvim/dein')
   call dein#add('junegunn/goyo.vim')
   call dein#add('junegunn/limelight.vim')
   "Markdown viewer TODO Fix this stupid thing
-  call dein#add('iamcco/markdown-preview.nvim', { 'do': 'cd app & yarn install'  })
+  "call dein#add('iamcco/markdown-preview.nvim', { 'do': 'cd app & yarn install'  })
+  call dein#add('iamcco/markdown-preview.nvim', {'on_ft': ['markdown', 'pandoc.markdown', 'rmd'],
+					\ 'build': 'sh -c "cd app & yarn install"' })
 ""  call dein#add('iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }})
 ""  call dein#add('euclio/vim-markdown-composer')
   call dein#add('~/.config/nvim/dein/repos/github.com/Shougo/dein.vim')
@@ -75,7 +77,7 @@ if dein#load_state('~/.config/nvim/dein')
   call dein#add('Shougo/neosnippet-snippets')
   call dein#add('mattn/emmet-vim')
   " Vim Wiki
-  call dein#add('vimwiki/vimwiki')
+  "call dein#add('vimwiki/vimwiki')
   "echo doc 
   call dein#add('Shougo/echodoc.vim')
   "Colorizer "
@@ -96,7 +98,3 @@ endif
 if dein#check_install()
   call dein#install()
 endif
-
-
-" TODO inside dein/repos/ somewhere there are cach and state files which keep
-" screwing me for installing new plugins

+ 1 - 0
modules/sneak.vim

@@ -0,0 +1 @@
+let g:sneak#label = 1

+ 2 - 2
modules/vim_wiki.vim

@@ -6,9 +6,9 @@ let g:vimwiki_list = [{'path': '~/wiki/',
                       \ 'syntax': 'markdown', 'ext': '.md'}]
 
 " TAB in general mode will move to text buffer
-nnoremap <TAB> :bnext<CR>
+"nnoremap <TAB> :bnext<CR>
 " SHIFT-TAB will go back
-nnoremap <S-TAB> :bprevious<CR>
+"nnoremap <S-TAB> :bprevious<CR>
 
 let g:indentLine_setConceal = 0
 let g:indentLine_concealcursor = ""