victorb / obsidian-wielder Goto Github PK
View Code? Open in Web Editor NEWClojure inside your Obsidian documents!
Home Page: https://wielder.victor.earth/
License: MIT License
Clojure inside your Obsidian documents!
Home Page: https://wielder.victor.earth/
License: MIT License
The plugin templater has the ability to set a "startup template" that runs when Obsidian is started. However, when wielder is enabled, the startup template fails to run with a vast error. Prior to the template running (as it happens onLayoutReady
), Wielder prints the following error:
Uncaught (in promise) TypeError: import_sci.default.init is not a function
at initialize (plugin:wielder:85392:29)
at ObsidianClojure.eval (plugin:wielder:85553:21)
at Generator.next (<anonymous>)
at fulfilled (plugin:wielder:36:24)
After that, the startup template runs and results in a very big error that mentions certain wielder properties. The error is massive, and hence is attached as a error.txt.
From a basic scan of the error, it looks like it may be related to my startup template's use of obsidian-requirejs that isn't playing nicely with it.
I hadn't restarted Obsidian in a while and hence only just saw this!
I just started using the Wielder plugin and I'm loving it. Many kudos @victorb!
Today I was using it to prototype a plugin idea of my own, and as the code grew I found myself wishing for a way to break it up, while remaining within Obsidian. Essentially what I'm proposing is a built-in function that can "load" an arbitrary Vault note. Loading a note would consist of evaluating each Clojure code block it contains in the current context.
The function itself may look something like:
(*load "[[clojure/libraries/foo]]")
This could leverage Obsidian links to benefit from the existing autocomplete and make the paths easy to understand given the context. Wielder is already awesome, and I think this simple change could turn Obsidian into a very capable ClojureScript literate programming environment.
I would be happy to work on this and attempt to put a working Pull request together. However, before I get started I'd like to know if @victorb or other people from the community that may stumble onto this have any feedback or pointers.
Would you consider making the plugin available for mobile?
I did install it via BRAT and can't wait to try it out.
Thank you!
I'd love to try this plugin out, but I'm slightly worried that due to the eager evaluation model (it seems to try and parse all code blocks in a page eagerly) it won't cope with large files? I don't necessarily want to use it in massive files, but I'm more worried about opening a huge file in general and having things bog down. Are there any plans to make it less eagerly evaluated?
Hi,
your repository showed up as user of the sanitizer-polyfill.
Thank you for showing your interest in our tiny project. Unfortunately, the implementation does not match what browsers currently do and also does not match the intended specification end state for the Sanitiezr API.
This issue is to tell you that you are of course welcome to use the polyfill as you see fit but also to remind you that this is likely to change in the forseeable future.
Is it possible to evaluate code blocks on command rather than instantaneously as code gets typed? I could see this potentially being problematic if I’m typing code that does something state changing like, say, modifies my vault (e.g., I’m deleting a file by path name and I’m typing out the path name in quotes).
Could you move the information to the Github wiki, or place it in the project so it's available if your website is down again in the future?
Currently, publish.js is kind of big (3.6M on disk, 446KB gzipped) because we're not doing any minifying nor tree-shaking (which is hard when we want to evaluate arbitrary code). Biggest reason for not doing any minifying yet is because it'll make the errors a lot harder to understand when you're doing something wrong, so not sure if we can address that somehow.
But in the meantime, we could probably offer two versions of the publish.js. The first one being the existing one which is the full errors / non-minified
one. And a second one which is minified/production/cryptic errors one, that people can use if they want to instead of the full-errors one.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.