michaelb / sniprun

A neovim plugin to run lines/blocs of code (independently of the rest of the file), supporting multiples languages
MIT License
1.43k stars 46 forks source link

No Neorg support anymore? #267

Closed mjarus008 closed 8 months ago

mjarus008 commented 8 months ago

Describe the bug When I attempt to evaluate a line of code in a Neorg code block, I get the following error: "Filetype not officially supported, nor configured for the Generic interpreter"

To Reproduce Steps to reproduce the behavior:

  1. Open a Neorg file (file extension, file.norg) containing a code block, for example
    @code bash
    echo hello world
    @end
  2. Run the keybinding that uses for <Plug>SnipRun
  3. You should see the error, "Filetype not officially supported, nor configured for the Generic interpreter"

Expected behavior I expected that the code would be evaluated and that I would get the result displayed to me in the usual manner that SnipRun outputs code evaluations.

Markdown works perfectly and I've noticed when looking at the wiki that Neorg_original is missing from the list of interpreter configurations.

Screenshots If applicable, add screenshots to help explain your problem.

Environment:

michaelb commented 8 months ago

Hi, thanks for submitting this issue.

No, Neorg is still supported, so whatever is missing is an oversight. I probably forgot to add an entry in the wiki in the first place because of bad automation there is not much to be said about it, but run :SnipInfo and you'll see it.

The interpreter being there, it's possible your file doesn't have the correct filetype (not the same thing as file extension), see :set ft? to get the current's file filetype. Neorg is used on norg filetype, but you can tell it to get used on others through the use_on_filetypes key, see https://michaelb.github.io/sniprun/sources/common_options.html#common-options

Edit: :SnipInfo Neorg_original should be able to pull the neorg documentation while the wiki gets updated by me

michaelb commented 8 months ago

also ,the Neorg interpreter has indeed accidentally being broken since the v1.3.9 release -- whoops, fixing asap

This bug is likely the one that you encountered

mjarus008 commented 8 months ago

Hi @michaelb thanks for the prompt response!

Yes, I checked and the filetype is indeed norg, (running set ft? returns filetype=norg).

Just ran :SnipInfo Neorg_original and indeed I got the wiki and being able to name codeblocks would be super helpful for my workflow!

Thanks for taking a look and let me know if you need anything from me

michaelb commented 8 months ago

Thanks, I shouldn't need anything else

I think I've caught and fixed the bug but some more testing is on the table Expect a v1.3.10 release soon :-)

mjarus008 commented 8 months ago

Awesome, thank you so much! I'll be on the lookout :)

michaelb commented 8 months ago

Hi @mjarus008 , the v1.3.10 update is now out and fixes the Neorg (+documentation) issues

mjarus008 commented 8 months ago

Thanks!