Programming for dopamine.
Harmonic Pattern technical analysis screener with on-chart buy and sell targets: https://www.tradingview.com/script/LzFt8cCN-Harmonic-Indicator/
Editor Agnostic PKM: you bring the text editor and we bring the PKM - inspired by and compatible with Obsidian
License: Creative Commons Zero v1.0 Universal
Programming for dopamine.
Harmonic Pattern technical analysis screener with on-chart buy and sell targets: https://www.tradingview.com/script/LzFt8cCN-Harmonic-Indicator/
reference: #24
Without folder (both current file and file cta.md
in root folder of workspace),
With folder (both current file and file cta.md in pages
subfolder of workspace),
LspInfo
Detected filetype: markdown
2 client(s) attached to this buffer:
Client: markdown_oxide (id: 3, bufnr: [2])
filetypes: markdown
autostart: true
root directory: /Users/rayx/obsidian
cmd: /Users/rayx/bin/markdown-oxide
Installing binary on Intel / Windows 11 / 64bit with
:MasonInstall markdown-oxide
fails with
Failed
◍ markdown-oxide
▼ Displaying full log
The current platform is unsupported.
this is because in the Mason registry (do you have access to it?) it is tagged with
"source": {
"id": "pkg:github/feel-ix-343/[email protected]",
"asset": [
{
"target": "win_x86",
"file": "markdown-oxide-{{version}}-x86_64-pc-windows-gnu.zip",
"bin": "markdown-oxide-{{version}}-x86_64-pc-windows-gnu/markdown-oxide.exe"
}
]
},
which means 32-bit but filename says ...-x86_64-...
and will be 64 bit. Target has to be changed to win_x64
in the registry definition!
Meanwhile we can use
:MasonInstall --target=win_x86 markdown-oxide
Add markdown-oxide to homebrew. This is related to adding markdown-oxide support to Zed.dev in this PR zed-industries/zed#8463
Hi there, this is a really neat project and I appreciate your efforts!
I'm not sure if this is intentional, a quirk of Helix, etc., but I thought it might be worth reporting that, at least in MacOS with Helix v24.3, this language server doesn't work without a .git
root to, as far as I know, establish a workspace.
At first I thought I was reproducing #17 in Helix, but in my case the completions don’t work only when there’s already a tag before on the same line:
#existing-tag #Im-not-completed
Obsidian allows users to specify where dailyNotes, templates etc are stored.
currently configuration doesn't allow to replicate same structure. As it allows creating files, there should be some config to allow users to define file placement (esp. dailynotes)
I realise this doesn't fall under the purview of a lsp but I could think of alternate solution than to include a config in lsp.
I have two Obsidian vaults – one smaller, one larger. markdown-oxide works fine in the smaller one, but in the larger one, I get this error in nvim:
Error executing vim.schedule lua callback: /usr/local/share/nvim/runtime/lua/vim/lsp.lua:1308: RPC[Error] code_name = InvalidParams, message = "Invalid params"
stack traceback:
[C]: in function 'assert'
/usr/local/share/nvim/runtime/lua/vim/lsp.lua:1308: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
I don't really understand what's the problem though.
What can I do to debug this? I built it with cargo from this commit: 2c57711 , I'm using NVIM v0.9.5 with these settings:
local capabilities = vim.lsp.protocol.make_client_capabilities()
lspconfig['markdown_oxide'].setup({
capabilities = capabilities,
on_attach = on_attach,
})
(on_attach
is a pretty long function)
For the following markdown # python comment is not heading
should not appear in document symbols.
# this is a heading
\```python
# python comment is not heading
print('hello world')
\```
Paragraph preview for neovim lspsaga is not correct, only show heading, but whole paragraph is expected.
Cannot find extension "Feel-ix-343/markdown-oxide" in VSCodium to install
tip: Grab the .visx and install it that way.
Alas: "I have yet to set this up. Sorry!! By any chance could you open an issue for this? It would help me in prioritizing"
It will be a cool feature to show the title of the page.
e.g. amazon will shows amazon.com spend less....
related to #6
The LSP emits a warning for every URL that’s labelled.
For example,
[link to website](https://example.org)
Shows Unresolved Reference
warning.
Hello!
Love the LSP! Use it all the time for Obsidian and it works great for almost everything.
I have format on save in my Nvim config right now, and I had to disable that for markdown files because it causes my nested Todos to be broken into multiple lines.
So if I have something like this:
- [ ] Some todo
- [ ] A nested todo
The formatting will add a line break between my todos (and even move the todo back a little, but not fully).
It will end up something like this:
- [ ] Some todo
- [ ] A nested todo
EDIT: That will not happen if I have more todos underneath that. Or if I have multiple nested layers.
Like so:
- [ ] Some todo
- [ ] A nested todo
- [ ] Another todo
EDIT2: What an edge case, apparently, it needs to have another todo further down to "draw" the todo from it's parent:
This will cause it to happen:
- [ ] Some todo
- [ ] A nested todo
- [ ] Another todo
related to #53
is it supported in emacs lsp?
I have been noticing that completions and semantic tokens are quite slow on my vault.
I find cargo-binstall helpful when downloading cargo binaries, at least much faster than wget
or cargo install
. It would be great to integrate it into markdown-oxide. I could submit a PR if you are fine with it!
I am sorry I am bringing this up again. I have noticed a small bug when parsing tags.
According to the Obsidian manual, a tag is defined this way:
Tag format
You can use any of the following characters in your tags:
Tags must contain at least one non-numerical character. For example, #1984 isn't a valid tag, but #y1984 is.
When I use tag auto-completion, I get this:
It seems parsing only tests for at least one non-numerical character between #
and a space. That is why #2024
is parsed correctly as a non-tag, but not the links. Those tags include the full URL. #7
wouldn't be a tag, but if we include ]
and the rest as valid characters for a tag name, we end up with the tag shown in the dialogue. The same goes for #seven
.
The tree-sitter markdown parser considers this a tag:
_tag_name: $ => seq($._word_no_digit, repeat(choice($._word_no_digit, $._digits, '-'))),
that means after the #
there cannot be a digit as first character, but then they are allowed, so #y1984 is valid, but #1984y isn't.
So I think the regular expression needs some tweaking, something like:
/(^| )+#[a-zA-Z_\-\/][0-9a-zA-Z_\-\/]*/
I don't know about #-/_/tag
, but it doesn't seem the spec rejects it. Maybe you prefer to tweak the first part so the first character doesn't include _-/
either.
Thank you!
I notice that currently <c-]> can follow the link to file under cursor. However this throws No tags file
error when link is not resolved.
Proposed behaviour: when link in unresolved, <c-]> creates the file and then opens it.
personally I'd prefer gf
command, that is more accessible.
If I don't add ./
before a link to a local image file, it shows the warning. Could you please also support this format? Current behavior:
![](img/2024-04-17-15-14-12.png)
shows warning.
![](./img/2024-04-17-15-14-12.png)
no warning.
Hi, thank you for the great LSP server! It is really fast, and I am hoping it will provide a full solution for markdown/obsidian editing in Neovim. I have been using it for a couple of weeks, and there are two things I find missing:
Tag auto-completion: I use tags extensively, and marksman and obsidian.nvim both have tag auto-completion. I understand it should be a relatively easy addition, as moxide already supports go to tag definitions and references, so they are parsed.
Bug: I think moxide parses anything starting by #
as a section-type entry. However, it doesn't check whether the symbol happens within a code block. For example, when I ask for document symbols for this small document (sh
fenced code block), I get comment lines as sections.
# Real Section
# Just a comment
cd ..
I would get both Real Section
and Just a comment
as document symbols instead of just Real Section
.
Thank you very much for your work.
After installing the markdown-oxide extension on VSCode, it fails to start the language server:
[Error - 10:41:30 AM] Markdown Oxide client: couldn't create connection to server.
Error: Unsupported server configuration {
"command": null
}
at c:\Users\user\.vscode\extensions\felixzeller.markdown-oxide-1.0.4\client\node_modules\vscode-languageclient\lib\node\main.js:466:35
at LanguageClient.createConnection (c:\Users\user\.vscode\extensions\felixzeller.markdown-oxide-1.0.4\client\node_modules\vscode-languageclient\lib\common\client.js:1144:28)
at LanguageClient.start (c:\Users\user\.vscode\extensions\felixzeller.markdown-oxide-1.0.4\client\node_modules\vscode-languageclient\lib\common\client.js:681:32)
Building markdown-oxide and setting it in the path solves the problem
The vscode markdown lsp uses customer message markdown/getReferencesToFileInWorkspace
.
How do I get something similar in oxide
?
One of my most used operations (as a longtime vimwiki user moving over to Obsidian) is to open a daily note. I really like the ability to use today
, tomorrow
, etc. to link to the daily note for the corresponding day and would like a corresponding way to open daily notes.
Would it be possible to also add today
, tomorrow
, etc. as workspace symbols, or otherwise add a command to open these notes?
Link to other heading inside same file doesn't work, like inside a.md, link xxx doesn't work, it has to be [xxx])(a#test).
Thanks for this project.
Most people might know but I would add the following option to the readme:
cargo install --git https://github.com/Feel-ix-343/markdown-oxide.git markdown-oxide
Telescope lsp_buf_references
directly jumps to file (likely has only one reference). I expected a telescope picker.Plugin works flawlessly otherwise. Just for peace of mind, wanted to ask if texts, headings, filenames etc are being indexed somewhere for easy searching.
Also, a heavier operation, block completion could be manually invoked after typing ^ (similar to obsidian's feature)
Apologies for mixing everything up. Feel free to pick ones actionable and close this issue.
Hey there!
I installed markdown-oxide via cargo and I'm trying to set it up for Neovim via lspconfig as per the instructions in the README.
However, on Neovim startup, I get the following message:
[lspconfig] Cannot access configuration for markdown_oxide. Ensure this server is listed in
server_configurations.md
or added as a custom server.
Of course, it is listed in the lspconfig's server_configuration.md
since that's where I found instructions on how to set it up.
This is my LSP configuration (with lazy.nvim):
{
"neovim/nvim-lspconfig",
dependencies = { "williamboman/mason-lspconfig.nvim", "hrsh7th/cmp-nvim-lsp" },
opts = {
diagnostics = require("core.diagnostics"),
inlay_hints = { enabled = true },
autoformat = false,
capabilities = {
textDocument = {
documentFormattingProvider = false,
codelens = { enable = true },
completion = {
completionItem = {
snippetSupport = true,
resolveSupport = { properties = { "documentation", "detail", "additionalTextEdits" } },
},
},
},
},
},
config = function(_, opts)
local lspconfig = require("lspconfig")
local mason_lspcfg = require("mason-lspconfig")
local has_cmp, lspcmp = pcall(require, "cmp_nvim_lsp")
local lsp_attach = F.LspAttach
vim.diagnostic.config(vim.deepcopy(opts.diagnostics))
local capabilities = vim.tbl_deep_extend(
"force",
{},
has_cmp and lspcmp.default_capabilities(vim.lsp.protocol.make_client_capabilities()) or {},
opts.capabilities or {}
)
mason_lspcfg.setup({ ensure_installed = vim.tbl_keys(opts.servers) })
local capabilities_oxide = capabilities
capabilities_oxide.workspace = { didChangeWatchedFiles = { dynamicRegistration = true } }
lspconfig.markdown_oxide.setup({
on_attach = lsp_attach,
capabilities = capabilities_oxide,
filetypes = { "markdown" },
root_dir = lspconfig.util.root_pattern(".git", ".obsidian", ".moxide.toml", "*.md"),
single_file_support = true,
cmd = { "markdown-oxide" },
})
end
}
I would appreciate it if anyone could point me in the right direction for debugging this further.
Thank you!
I'm getting this error when using the code action to create new files
2024-04-17T15:41:35-03:00 [INFO] starting language server "markdown-oxide", path: "/Users/[REDACTED]/Library/CloudStorage/GoogleDrive-[REDACTED]/My Drive/Notes", id: 28
2024-04-17T15:41:35-03:00 [INFO] starting language server. binary path: "/Users/[REDACTED]/Library/Application Support/Zed/extensions/work/markdown-oxide/markdown-oxide-v0.0.16/markdown-oxide-v0.0.16-aarch64-apple-darwin/markdown-oxide", working directory: "/Users/[REDACTED]/Library/CloudStorage/GoogleDrive-[REDACTED]/My Drive/Notes", args: []
2024-04-17T15:41:41-03:00 [ERROR] crates/editor/src/element.rs:324: Permission denied (os error 13)
Hello again! After adding that git root I start to get completions, but only for the file I'm currently in :-)
Checking Helix's logs, they write of a broken pipe. I'd like to help looking into this when I have a little time, but I'm not sure when that will be so I figured I could at least report it.
2024-04-10T23:08:17.900 helix_lsp::client [WARN] language server failed to terminate gracefully - server closed the stream
2024-04-10T23:08:17.900 helix_lsp::transport [ERROR] markdown-oxide err: <- StreamClosed
2024-04-10T23:08:17.900 helix_lsp::transport [ERROR] markdown-oxide err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
Thanks for the project. I am trying to move from marksman to oxide project with nvim
But with latest nvim nightly and lspconfig. The lsp server failed to start.
If I run lspconfig.markdown_oxide.setup{}
, I have following errors
Error executing vim.schedule lua callback: ...software/nvim-nightly/share/nvim/runtime/lua/vim/lsp.lua:1431: RPC[Error] code_name = InvalidParams,
message = "Invalid params"
stack traceback:
[C]: in function 'assert'
...software/nvim-nightly/share/nvim/runtime/lua/vim/lsp.lua:1431: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Are there anything must be setup for this lsp?
I am a veteran Obsidian user and have the option New link format
set to Shortest path when possible
in it.
When I use moxide
, on inserting a link that is in a subfolder, moxide also adds the folder name to the link.
Is there a way to turn this off?
This would make it easy to configure alongside other LSPs directly inside neovim: https://github.com/mason-org/mason-registry
The features list is helpful, but I think that a gif/video showing all of the features off would be better.
TY for the amazing job I would like to ask if it is possible to use the auto completion features without hrsh7th/nvim-cmp and with ms-jpq/coq_nvim. I have done everything except adding the source
{
name = 'nvim_lsp',
option = {
markdown_oxide = {
keyword_pattern = [[\(\k\| \|\/\|#\)\+]]
}
}
},
In my configs as I don't use nvim-cmp and I am pretty close to a fully working functionality( see the screenshot)
So I was wondering if we can communicate to ms-joq and add markdown-oxide as a third party source.
In the next days I will try to manually add it and provide some configs. The next best thing other than supporting it out of the box is to document the required work to support it.
Hey,
I've been trying this LSP out, coming from Marksman, and it's working great in certain cases but not in others. I have followed the recommended setup, but I still cannot get go-to definitions / references to work. Some of the basic LSP features that Marksman provides are missing
Have I set something up incorrectly, or is this currently broken? The roadmap lists most of these things as supported, which makes me confused.
🍻
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.