-
Notifications
You must be signed in to change notification settings - Fork 132
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
Support for org files #143
Comments
I tried to keep
The LSP server might need more work as it is more coupled to Markdown (especially for the auto-completion). I don't use Org Mode and I'm not familiar at all with its syntax, so I don't think I would implement this myself. But I'm open for external contributions related to this and I'm happy to talk about architecture. There are many Go libraries parsing Org Mode which could be used: https://github.com/search?q=org+mode+parser+go |
By the way I've been toying with the idea of adding a JavaScript plugin architecture in |
What do you think about letting people configure how
[metadata]
title-prefix = "#+TITLE:" This would let This would make
The metadata that By the way the plugin idea is awesome. That could take Let me know how I can help, my experience with go is none and I'm still learning programming, but with some guidance I could be helpful, or maybe I can help with testing. I truly like |
Prefixes or regexes might be too fragile, as you also need to validate the context, for example that you are inside a YAML frontmatter. It gets even more complicated with lists (e.g. tags). This would also be pretty limited to give a proper support in the LSP server. So I'd rather add an extension endpoint and let people decide on the best strategy for each format.
I'm open to alternatives, but my reasoning was:
This is not super high on my roadmap though, there are other stuff I'd like to add to
Thanks! Discussing ideas is always useful. Go is quite easy to learn as it is pretty limited, if you're interested. I actually learned Go for this project. Are there other areas except from the note format that you wish were extensible? |
Yes, you're right, the concern I had with my ideas is that you need to validate some context or set some rules for the prefix/regex so it doesn't match actual body text by mistake. And making any fileformat work with LSP sounds very complicated.
Oh that makes sense, in that case Lua could limit the amount of potential plugin creators. Didn't know Lua was that dreaded, I wonder why.
Oh yes renaming and deleting is definitely needed, but I'd also add moving notes between folders. I have folders in my notebook for specific categories, like cheatsheets, howto, etc. Whenever I move notes I have to do the whole filtering and pipe it into
The only reason I asked for the possibility of With the plugin architecture, other people might be able to add the whole TODO, TASK, AGENDA managing. But I'd argue that is much better to just add support for org files, the format has existed for almost 20 years and has already figured out the moving tasks around and semantic meaning between all of it. The other thing I think would be cool to add is adding non text files to a notebook and being able to link those files to other notes, like images and documents. In my case, I have images that I link to notes, mostly for giving a visual representation of a concept. If One final thing I want to ask. I have my notes in version control and I didn't add |
Maybe the unorthodox syntax or quirks like 1-indexed arrays?
Yes, also an important feature 👍
Not the first time this was raised, also a very useful feature, as well as the auto-completion of media links.
Ignoring There's no real concept of "note ID" with When you use Footnotes
|
I wonder if leveraging pandoc to convert formats on the fly as a preprocess step would be an idea? It'd give the option to use a lot of common formats |
It could be a workaround for the parser/indexation. It wouldn't work with the LSP server though. |
How difficult would it be to add support for org files ? Like reading the metadata, for example:
#+TITLE: This is a title
,#+TAGS: :org:
,#+ID: note-id
,#+DATE:
, etcHow does zk searches for those patterns in a markdown file with the yaml frontamatter ? does it uses regex or some other method to retrieve that data ?
The text was updated successfully, but these errors were encountered: