Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add possibility to inline options #8

Open
Jeansidharta opened this issue Oct 30, 2023 · 0 comments
Open

[Feature Request] Add possibility to inline options #8

Jeansidharta opened this issue Oct 30, 2023 · 0 comments

Comments

@Jeansidharta
Copy link

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant