Feel-ix-343 / markdown-oxide

Robust PKM on the LSP
https://oxide.md
GNU General Public License v3.0
929 stars 15 forks source link

emacs support? #61

Closed Aneeqasif closed 3 weeks ago

Aneeqasif commented 5 months ago

is it supported in emacs lsp?

Feel-ix-343 commented 5 months ago

Not yet I don't believe, but great idea!

I'm really not to familiar with emacs and emacs lsp mode, so do you have any suggestions for building this support?

Aneeqasif commented 5 months ago

Not yet I don't believe, but great idea!

I'm really not to familiar with emacs and emacs lsp mode, so do you have any suggestions for building this support?

Yeah i can dive in but i am literally a couple of months in emacs and not that experienced with elisp. If I do, beware you may get a little more notifications then normal :p

Feel-ix-343 commented 5 months ago

That would be awesome hah

Aneeqasif commented 5 months ago

ok then i am not promising but ill try to squeeze some time for it and then get back to you. until then if anyone stumble upon this issue and want to implement lsp support for emacs feel free to do so if you don't see any progress from my side.

Feel-ix-343 commented 5 months ago

Awesome; looking forward to it. (I have always been scared of emacs lisp tbh)

BatmiBoom commented 4 months ago

Hey! This wouldn't be to hard. Emacs has lsp built-in through the package Eglot. To be able to use markdown-oxide in Emacs, I need to know how is the command, how it executes in the cli.

For example for using pyright you do

  (add-to-list 'eglot-server-programs
               '(web-mode . ("typescript-language-server" "--stdio"))
               '(python-mode . ("pyright"))
               '(markdown-mode . ("cli-command"))))
Feel-ix-343 commented 4 months ago

Hey thanks for the code snippet!

Once installed, markdown-oxide is available under the command markdown-oxide; that's it

RyanGreenup commented 4 months ago

Hey! This wouldn't be to hard. Emacs has lsp built-in through the package Eglot. To be able to use markdown-oxide in Emacs, I need to know how is the command, how it executes in the cli.

For example for using pyright you do

  (add-to-list 'eglot-server-programs
               '(web-mode . ("typescript-language-server" "--stdio"))
               '(python-mode . ("pyright"))
               '(markdown-mode . ("cli-command"))))

Yeah this is exactly right, so for me (on Doom Emacs) I was able to add this to config.el, open ~/Notes/slipbox/home.md and then M-x eglot got it right. If ~/.cargo/bin isn't in $PATH add the full path to elisp:

(with-eval-after-load 'eglot
  (add-to-list 'eglot-server-programs
               `(markdown-mode . ,(eglot-alternatives
                                   '(("markdown-oxide"))))))

I'm not sure about lsp-mode though, have a look at the docs here. I've always just used eglot -- lifes too short :)

This issue should be tagged as a documentation issue.

Feel-ix-343 commented 3 weeks ago

(if i forget to do this in v1, please reopen)