-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
add core.execute
#618
add core.execute
#618
Conversation
perhaps call the subcommand which is now called |
vim.api.nvim_buf_set_lines( | ||
curr_task.buf, | ||
curr_task.code_block['end'].row + 1, | ||
curr_task.code_block['end'].row + #curr_task.output + 1, |
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.
shouldn't this be the same as the start
if not lines below the code block are overwritten
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.
This is for deleting the previous output lines if present, havent experienced any bugs yet on my side(on this line).
0, 0, {} | ||
) | ||
-- IMP: check for existng marks and return if it exists. | ||
local cr, _ = unpack(vim.api.nvim_win_get_cursor(0)) |
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.
couldn't you just get rid of the , _
?
the value would just be ignored
also
I think cr
isn't a really descriptive variable name
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.
couldn't you just get rid of the , _ ?
Was indexing the first item(row), but was testing with both.
I think cr isn't a really descriptive variable name
let me know what else you want to call it
end | ||
|
||
module.config.public = require("neorg.modules.core.execute.config") | ||
module.config.private = {} |
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.
no need to add this if it's unused
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.
There was some settings on my local repo, will delete the line if its not used 👍🏻
local spinner = require("neorg.modules.core.execute.spinner") | ||
|
||
local module = neorg.modules.create("core.execute") | ||
local ts = require("nvim-treesitter.ts_utils") |
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.
we got a module for this
not sure what's preferred
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.
will discuss and resolve with vhyrro 👍🏻
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.
Here you probably want to use module.required["core.integrations.treesitter"].get_ts_utils()
@@ -0,0 +1,41 @@ | |||
-- TODO: code cleanup |
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.
@vhyrro perhaps add some standard location of things like this? (basically util files)
By the way, this module is not forgotten. I think about this every now and again but just have other priorities. The thought of implementing code execution does excite me though heh |
Hi @tamton-aquib ... I just copy-pasted this as an external module on my filesystem, and it's working beautifully for me. Very cool work. I just had to What do you think about re-creating this as an external module & publishing in its own repo, while this core module is under review? It might take a while for this to get merged as a core module, and in the meantime we could collaborate. I & others could fork & contribute. (Or I can publish my copy-paste and credit you, but that would feel like the wrong way round). I know it belongs in Thanks again |
Heyyo @laher ,
I talked to vhyrro on discord and it might take some time for him to review this PR.
This would be better. I guess you could just link this PR instead of credits btw 😅 PS: i dont know if the code is ugly, so feel free to refactor or anything hehe |
Cool, I'll do that. I haven't written much lua myself, but what you've done is working & simple enough that I could add a couple of languages easily. I'll add some linting and stuff and go from there... I'll pop onto discord for discussion once I have something. |
Hi again, I've been reading the specs and getting my head around tags and norg generally, and I think I know where I'd like to take this. Repo: https://github.com/laher/neorg-exec
See the planning section for examples of what this might look like: https://github.com/laher/neorg-exec#planning I'm very new to norg, so I'd appreciate some feedback about how well this tagging approach might work with norg. OK I'll stop spamming this PR now and move discussion into discord + my repo. |
Closing the PR as the development regarding this features is moved to an external module: |
This module is aimed to provide an
execute
command for neorg.2022-10-28_23-26-32.mp4
Possible todos: