GithubHelp home page GithubHelp logo

jubnzv / mdeval.nvim Goto Github PK

View Code? Open in Web Editor NEW
160.0 160.0 7.0 123 KB

Neovim plugin that evaluates code blocks inside documents

License: MIT License

Lua 98.12% Vim Script 1.88%
markdown neovim neovim-plugin norg nvim orgmode-nvim vimwiki

mdeval.nvim's People

Contributors

intr-cx avatar jubnzv avatar oko-nasa avatar viperx7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mdeval.nvim's Issues

[Feature Request] Add possibility to inline options

Hello

I have a particular use case that requires a little tweak to work with this plugin. I'm using this to run SQL queries to a database. However, the only way to provide the database to connect it through a CLI option. The command is something like usql <DATABASE_URL> -f <QUERY_FILE>. So my idea would be to have something like this:

```usql <DATABASE_URL>
SELECT * FROM table_name;
```

And in the neovim config you could have something like this:

mdeval.setup({
	eval_options = {
		usql = {
			command = { "usql", "$$", "-f" },
			exec_type = 'interpreted',
			language_code = 'usql',
		},
	},
})

Where the "$$" option is replaced by the first inline option.

I have already implemented this in a fork of mine here. I'm currently using it right now. I'm creating this issue just to know if this would be desirable in the main repo. If so, I'll make a PR :)

Source code blocks' issues in Norg files

Python source code blocks produce IndentationErrors if they're placed inside a Neorg heading.
This doesn't happen for some other code blocks (Lua and C++ that I tested)
2022-10-28-101640_1920x1080_scrot

Python source code blocks also work properly if they're above all headings.

made a similar plugin some time ago, discussing

Hi, I'm the main dev of https://github.com/michaelb/sniprun.

It's not really an issue, more of a discussion (but discussion aren't enabled on your repo). Feel free to close at any time if not relevant or anything.

Just some context; Sniprun is a code-runner plugin that can execute code from the editor. It has several features such as various possible output; REPL-like mode for some languages, markdown-blocs support, auto-fetch of imports...

  • What motivated you to make this plugin ?
  • Did you search for any alternatives before starting your project, and if so, how ?
  • Did you know about sniprun (I guess not but your never know) ?
  • How do you think the two compare ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.