-
Notifications
You must be signed in to change notification settings - Fork 3
add my useful lua scripts #3
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
base: main
Are you sure you want to change the base?
Conversation
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.
First of all, thanks for the effort for collecting this.
However, since this is a lot (I'd really prefer small PRs) it took a while to get through this and left a lot of comments. Some of these I don't think can really work, code styles differ wildly. So yeah, decide which ones you want to pursue to actually include because I don't think it's all written by you.
I also don't want to be this repo to become a dumping ground of random scripts, so I tried to do a fairly detailed code review to set some standards.
@@ -0,0 +1,9 @@ | |||
--- |
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.
Should this file really be called AdminitionWidget?
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.
I'm pretty sure this is 0.x legacy, this "widget" shouldn't do anything and it's misnamed.
- See how your slides look in real-time as you modify your markdown | ||
- Use the Marp Preview panel to navigate through your slides and see them in action | ||
|
||
See [source](https://community.silverbullet.md/t/marp-preview-plugin/741) |
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 link appears to be broken, should be https://community.silverbullet.md/t/marp-plug-markdown-presentation-rendering/3145 ?
@@ -0,0 +1,107 @@ | |||
# Admonition Widget |
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.
How about "Advanced Adminitions"?
Since this is not really a widget.
name = "ad-"..v, | ||
description= "admonition for "..v, | ||
run = function() | ||
tpl="> **"..v.."** |^|\n" |
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.
Can you indent this nicely?
"warning", | ||
"note" | ||
} | ||
for i, v in ipairs(admonitionList) do |
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.
Minor: I think i
can be _
here?
end | ||
``` | ||
|
||
| Header A | Header B | |
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 would be a good example to include at the top of the page, not at the bottom. What's not really clear to me is how these headers map to the cell identifiers? Does Header A mean A
?
|
||
Feel free to explore the theme and its various features to create a writing environment that reflects your love for the cosmos! | ||
|
||
--- |
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.
Should this be here?
} | ||
``` | ||
|
||
.treeview-root { |
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.
Should this be here?
end | ||
|
||
-- Function to get help information on how to use the search feature | ||
local getHelp = function() |
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.
local function
@@ -0,0 +1,171 @@ | |||
# VSCode Palette |
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.
Not sure this is a very descriptive name. What does this have to do with VS code?
Thank you for your feedback. I understand your perspective. In my view, many contributions aren't immediately visible on the forum, which is why I've shared them via my scripts. The Lua editor in Space is very limited, making it quite difficult to develop advanced scripts. Would it be possible to provide features like a code style checker, quality gates, coding conventions for Space Lua, or even a sandbox for developing Space Lua in VSCode? That would be a fantastic improvement. I often declare functions as global to debug them more easily. After reading your comments, I will refactor my code. I plan to stay with my fork for now, as I want to preserve and share all these ideas. They serve as a source of inspiration and could be very useful for other users. I will create new pull requests once I have applied the necessary quality rules. Many thanks for your work. |
Yeah I know. I'll probably make some improvements over time, but it will never be a full IDE.
Technically yes, but this is a huge project in itself. Not sure what to do about this. One option could be to write scripts as plain .lua files (rather than embedding them in pages) so you can use VS code to edit them. This is doable, but then you won't really be able to edit them in SB itself anymore, because they'd become documents. Unless somebody develops a Lua file editor again 😆 |
No description provided.