-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: allows showing output as virtual text #11
base: master
Are you sure you want to change the base?
Conversation
c823028
to
1583f30
Compare
UPDATE: Now it is working great! It cleans previous output when your run |
ok, it is almost done now... but I cant pass any options via Via opts with Lazy: {
url = "https://github.com/jubnzv/mdeval.nvim",
opts = { virt_text = true },
cmds = { "MdEval" },
}, Via setup: lua require 'mdeval'.setup({}) In both scenarios I get the following error
|
@jubnzv can you give some feedback? |
Hey @uwla, thank you for the contribution. I’m in the middle of something, but I’ll get to it in a couple of days. |
lua/defaults.lua
Outdated
@@ -9,6 +9,7 @@ lang_conf["markdown.pandoc"] = { "```", "```" } | |||
|
|||
M.lang_conf = lang_conf | |||
|
|||
M.virt_text = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename here and everywhere to virtual_text
in order to increase readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The users will also need this in the documentation and the example in README.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@uwla How could I enable the virtual text output?
I'm trying to use your branch with the following configuration:
require 'mdeval'.setup({
virt_text=true,
require_confirmation=false,
eval_options = { },
})
When I call :MdEval
with a markdown file containing a JS snippet, it prints results as virt_text
is not set:
Hi, this is because I set the default display to NOT be virtual_text and I was having trouble passing the option I'll push the code such that the virtual text is the default one, that way you can test it. |
The virtual text works!
However, there is one problem:
Output should not be cleaned when the code block is run again or with
MdEvalClean
.Let us work to get it done!