Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 25 20:23
    a-torgovitsky commented #306
  • Nov 25 19:24
    hgvhgv commented #237
  • Nov 17 22:47
    elshize opened #347
  • Nov 17 20:36
    p3palazzo commented #290
  • Nov 12 14:20
    yushangakki opened #392
  • Nov 07 14:20
    twsh closed #391
  • Nov 07 14:20
    twsh commented #391
  • Nov 07 14:19

    fmoralesc on master

    hypertext: fall back to implici… (compare)

  • Nov 07 14:19
    fmoralesc closed #390
  • Nov 07 14:19
    fmoralesc commented #390
  • Nov 07 14:15
    fmoralesc commented #391
  • Nov 07 14:14
    fmoralesc commented #391
  • Nov 07 13:21
    twsh edited #391
  • Nov 07 13:17
    twsh opened #391
  • Nov 06 23:00
    Chris-Slade opened #390
  • Nov 03 22:44
    hgvhgv commented #237
  • Nov 03 21:53
    Konfekt commented #237
  • Nov 03 13:14
    JanSurft edited #346
  • Nov 03 13:10
    JanSurft edited #346
  • Nov 03 13:10
    JanSurft edited #346
Caleb Maclennan
@alerque
Hey what do you think about the idea of actually splitting this off as a different plugin? I don't see how pulldown-cmark is going to support all of Pandoc's extentions any time soon which means we could only merge this work as some sort of alternate reality to the default Pandoc mode until we get our hands on commonmark-hs or similar. I'm actually really hopefull the latter will happen soon and/or we can directly wire into it in a similar way. I see the need for a strict CommonMark syntax variant, and maybe the GFM mode too, both of which pulldown-cmark works for now. We could reuse all/part of the design or make it a dependency if there is anything we can gain now.
I'm not sure on this, just brain-storming. Trying to convince myself maybe ;-)
Caleb Maclennan
@alerque
...I actually headed down that road in a new repo. I'm open to redirection though, I'm not super confident an independent plugin is the right approach, but it seemed like the most likely way to get something usable out there without getting blocked on Pandoc extension support.
Felipe Morales
@fmoralesc
That sounds fine to me ;) I was thinking we could split the rust library from the plugin.
Caleb Maclennan
@alerque
I thought about that, but I think it would make more sense if we were using it as an RPC end-point. Right now it's pretty closely tied to what we want to call through the vim interface code.
I may have another use for a Lua library wrapping pulldown-cmark so that might make sense ultimately, but I'm not sure yet where to draw the boundary between the various API levels. Since pulldown-cmark already is an idiomatic Rust interface, I'm not sure a 100% Lua wrapper around that is an improvement over a customized wrapper that does exactly what the Lua endpoint needs.
Felipe Morales
@fmoralesc
Sure.
Perhaps one idea for vim-pandoc-syntax could be to use this as a base and override the highlighting for unrecognized block types in some way. For example, I make use of yaml blocks, and this breaks them.
Caleb Maclennan
@alerque
I could see that working.
Felipe Morales
@fmoralesc
I'm digging in ;)
Caleb Maclennan
@alerque
I'm still at the point of rebasing master as I wire stuff together, but it's working on Arch/Neovim using a vim-plug install + make ;-)
Felipe Morales
@fmoralesc
I'm trying out seeing what happens if I install it through vim-plug with :Plug alerque/vim-commonmark {'do': 'make'}
It works. But oh the colors~ :p
Caleb Maclennan
@alerque
I imported your Python code too because I have an idea we might need to go down the Python road after all if we want this to support Vim8. I looked at the VIM8 Lua interface and it just doesn't have an API that works the same way.
It might still work, but it would require some rewiring. There is no vim.api, only a bunch of piecemeal hooks via vim.window, vim.buffer, etc.

It works. But oh the colors~ :p

Ay, it's ugly an dirt. I was mostly worried about checking what it was or wasn't matching, not in making it look good.

Felipe Morales
@fmoralesc
My python was constructed around neovim's remote plugin architecture, though, I don't know if vim8 offers something similar. One advantage it might have over the lua version is that it runs in a separate process.

It works. But oh the colors~ :p

Ay, it's ugly an dirt. I was mostly worried about checking what it was or wasn't matching, not in making it look good.

I understand. But it's in a public repo now, so maybe it's a good idea to provide some 'release' defaults ;)

Caleb Maclennan
@alerque
Yup yup.
Caleb Maclennan
@alerque
So @fmoralesc you are probably interested in this comment and this AUR package I just setup (precompiled package in my repo).
Some preliminary testing suggests commonmark-cli doing syntax coloring runs about 2× orders of magnitude slower than pulldown-cmark doing an HTML render. So that's not good. On the plus side it does cover all or most of the Pandoc flavor syntax! If we work out how to background the job of parsing and only block during updates to a limited portion of the buffer at a time we can probably make it work.
I figured out how to get Haskell→Lua bindings but not Lua→Haskell yet. We probably want to go down the RPC path for this.
I still want to finish off a working vim-commonmark using the Rust parser, but the lessons learned will be directly applicable to wiring in a different backend.
Felipe Morales
@fmoralesc
@alerque :+1: sounds good to me
ivanvgav
@ivanvgav
Hello, i'm trying to setting up vim-pandoc around vimwiki and a zettelkasten system. I would like to have the autocompletion feature from vim-pandoc but i can't make it works. I'm on nvim
My settings are: " Pandoc
let g:vimwiki_filetypes = ['pandoc', 'markdown', 'textile']
let g:vimwiki_folding = 'custom'
let g:pandoc#folding#fdc = 0
let g:pandoc#folding#level = 999
let g:pandoc#folding#mode = 'stacked'
let g:pandoc#modules#enabled = ['folding', 'command']
let g:pandoc#biblio#sources = 'gy'
let g:pandoc#biblio#use_bibtool = 1
let g:pandoc#completion#bib#mode = 'citeproc'
let g:pandoc#biblio#bibs = ["Documents/biblio.bib"]
" Pandoc Autocomplete
augroup my_cm_setup
autocmd!
autocmd BufEnter * call ncm2#enable_for_buffer()
autocmd Filetype pandoc call ncm2#register_source({
\ 'name': 'pandoc',
\ 'priority': 8,
\ 'scope': ['pandoc'],
\ 'mark': 'md',
\ 'word_pattern': '\w+',
\ 'complete_pattern': ['@'],
\ 'on_complete': ['ncm2#on_complete#omni', 'pandoc#completion#Complete'],
\ })
augroup END
Domenico Ipri
@emeralit_gitlab
Hi,
please see issue #377
ivanvgav
@ivanvgav
Thanks I'll check it