mdeval.nvim
mdeval.nvim copied to clipboard
[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 :)