diff --git a/README.md b/README.md index 0e1c01d7..e9761c32 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,13 @@ # Markdown Oxide -Obsidian Language Server: Obsidian-flavored-markdown language server -Implementing obsidian PKM features (and possibly more) in the form of a language server allows us to use these features in our favorite text editors (neovim or vscode!) and reuse other lsp related plugins (like Telescope, outline, and builtin lsp support) -## Testing + +Implementing obsidian PKM features (and possibly more) in the form of a language server allows us to use these features in our favorite text editors and reuse other lsp related plugins (like Telescope, outline, refactoring tools, ...) + +## Usage + +==I am trying to get this into package distributions right now!!! This should be easier soon== First, compile the plugin. Clone the repo and then run `cargo build --release` @@ -68,55 +71,59 @@ vim.api.nvim_exec_autocmds('User', { pattern = 'LspAttached' }) NOTE: To get references on files, you must place your cursor/pointer on the first character of the first line of the file, and then get references. (In VSCode, you can also use the references code lens) +## Note on Linking Syntax + +The linking syntax is that of obsidian's and can be found here https://help.obsidian.md/Linking+notes+and+files/Internal+links + +Generally, this is [[relativeFilePath(#heading)?(|display text|)?]] e.g. [[articles/markdown oxide#Features|Markdown Oxide Features]] to link to a heading in `Markdown Oxide.md` file in the `articles` folder or [[Obsidian]] for the `Obsidian.md` file in the root folder. + ## Features -- [ ] Go to definition (or definitions) from ... - - [X] File references - - [X] Heading references - - [X] Indexed block references. (I call indexed blocks the blocks that you directly link to. The link will look like [[file#^index]]. When linking from the obsidian editor, an *index* ^index is appended to the paragraph/block you are referencing) - - [X] Tags: This will get the locations where the tag is placed; it will give all the locations where the #tag/subtag is written. This is different than the functionality of the reference, which will get all tag and subtag usages: references on #tag will give #tag, #tag/subtag, #tag/sub/subtag ... - - [X] Footnotes - - [ ] Metadata tag -- [ ] Get references - - [X] To file - - [X] to heading - - [X] to indexed block - - [X] to tag (explained above) - - [X] Footnotes +- Go to definition (or definitions) from ... + - [X] File references [[file]] + - [X] Heading references [[file#heading]] + - [X] Block references. [[file#^index]] (I call indexed blocks the blocks that you directly link to. The link will look like [[file#^index]]. When linking from the obsidian editor, an *index* ^index is appended to the paragraph/block you are referencing) + - [X] Tags #tag and #tag/subtag/.. + - [X] Footnotes: "paraphrased text[^footnoteindex]" - [ ] Metadata tag -- [ ] Completions - - [X] File completions (requires extra nvim cmp configuration) - - [X] Heading Completions (requires extra nvim cmp config) - - [X] Established Indexed block completions. - - [X] Footnotes - - [X] New Block Completions: to use this, type `[[ `, and after you press space, completions for every block in the vault will appear; continue typing to fuzzy match the block that you want; finally, select the block; a link will be inserter to the text document and an index (ex ^1j239) will be appended to the block in its respective file - - [ ] Create file completions - - [ ] Make file completions faster in NvimCmp (this is mostly a neovim issue as moxide generates very many completions for large vaults) - - [ ] Callout completions +- Get references + - [X] For File when cursor is on the first character of the first line of the file. This will produce references not only to the file but also to headings and blocks in the file + - [X] For block when the cursor is on the blocks index "...text *^index*" + - [X] For tag when the cursor is on the tags declaration. Unlike go to definition for tags, this will produce all references to the tag and to the tag with subtags + - [X] Footnotes when the cursor is on the declaration line of the footnote; *[^1]: description...* +- Completions (requires extra nvim cmp config; follow the directions above) + - [X] File link completions + - [X] Heading link Completions + - [ ] Subheading compeltions in the form [[file#heading#subheading]] from https://help.obsidian.md/Linking+notes+and+files/Internal+links#Link+to+a+heading+in+a+note (Note: right now you can link to subheadings through [[file#subheading]]) + - [X] Block link completions (searches the text of the block) + - [X] Footnote link completions + - [X] New Block link Completions through grep: to use this, type `[[ `, and after you press space, completions for every block in the vault will appear; continue typing to fuzzy match the block that you want; finally, select the block; a link will be inserter to the text document and an index (ex ^1j239) will be appended to the block in its respective file + - [ ] Callout/admonition completions - [ ] Metadata completions - - [ ] Dataview? - - [ ] Metadata tag - - [ ] \`\`\`query\`\`\` code blocks -- [X] Preview + - [ ] Dataview completions + - [ ] Metadata tag completions + - [ ] \`\`\`query\`\`\` code block completions +- Hover Preview - [X] File - [X] Headings - [X] Indexed Blocks - [X] Footnotes - [ ] Code Actions - - [x] Missing file for link -> Create the file + - [x] Unresolved file link -> Create the file + - [x] Unresolved heading link -> append heading to file and create file - [ ] Link suggestions (by text match or other) - [ ] Refactoring: Move headers or selections to a new file - [ ] Link an unlinked reference - [ ] Link all unlinked references to a referenceable - [X] Diagnostics - - [X] Missing reference + - [X] Unresolved reference - [ ] Unlinked reference - [X] Symbols - [X] File symbols: Headings and subheadings - [X] Workspace headings: everythign linkable: files, headings, tags, ... Like a good search feature - [ ] Lists and indented lists - [ ] Rename - - [X] File + - [X] File (cursor must be in the first character of the first line) - [X] Headings - [X] Tags - [ ] Indexed Blocks @@ -129,14 +136,6 @@ NOTE: To get references on files, you must place your cursor/pointer on the firs - [ ] Influence from logseq shortcut completions; such as to dates like /tomorrow - [ ] Proper integration tests - - -### Dev Todo's - -- [X] Extract the RwLock read pattern -- [ ] Fix: update vault (diagnostics and references) after code action -- [ ] Caching: As of right now, the completions really don't need to be recalcualted; there are many other functions like this - # Alternatives **I love open source and all open source authors!! I also believe healthy competition is good! Moxide is competing with some alternatives, and I want to make it the best at its job!!** @@ -147,20 +146,7 @@ Here are the alternatives (open source authors are welcom to make PRs adding the - https://github.com/WhiskeyJack96/logseqlsp ; This is a cool project and a great inspiration for logseq support (which is upcoming). status: it doesn't seem that it is maintained; no commites for 3 months - The og https://github.com/artempyanykh/marksman ; I used this for a while, but it is not obsidian specific and didn't act well w my vault -# Workflows - -- Linking to daily notes in the future to set todos; checking references to those notes using the language server - -# Obsidian Graph Flexing (and maybe a little exigence for the project) - -This is my vault. As you can see, there is a lot of stuff in it. Along with notes, I also like speed. Obsidian, logseq, and other language servers are a little slow with my vault (and a little high latency in general). I need speed; Neovim and this LSP CMPs my needs! (I am using this daily, right now even). - -![image](https://github.com/Feel-ix-343/moxide/assets/88951499/3de26de6-1113-469f-8807-40dd6c2e1e03) - -![image](https://github.com/Feel-ix-343/moxide/assets/88951499/9204ebf9-f927-4f1e-8563-12e79099debd) - - # ---The--bottom--line-------------------------------------------------------- -Listen. I really like vim motions. I also really like low latency terminal editing. I very much so also like my neovim plugins and config. And wow I also like using obsidian (and other md apps). Can't I just have it all??? Can't I brute text edit in neovim and preview and fine edit in the JS madness? Well, I thought I could; that is why I am making this. (And hopefully why you might help me!) +Listen. I really like vim motions. I also really like low latency terminal editing. I very much so also like my neovim plugins and config. And wow I also like using obsidian (and other md apps). Can't I just have it all??? Can't I brute text edit in neovim and preview and fine edit in the JS madness? Well, I thought I could; that is why I am making this.