markdown-oxide icon indicating copy to clipboard operation
markdown-oxide copied to clipboard

emacs support?

Open Aneeqasif opened this issue 1 year ago • 8 comments

is it supported in emacs lsp?

Aneeqasif avatar Apr 25 '24 09:04 Aneeqasif

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?

Feel-ix-343 avatar Apr 25 '24 11:04 Feel-ix-343

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

Aneeqasif avatar Apr 25 '24 11:04 Aneeqasif

That would be awesome hah

Feel-ix-343 avatar Apr 25 '24 12:04 Feel-ix-343

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.

Aneeqasif avatar Apr 25 '24 12:04 Aneeqasif

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

Feel-ix-343 avatar Apr 26 '24 02:04 Feel-ix-343

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"))))

BatmiBoom avatar May 07 '24 00:05 BatmiBoom

Hey thanks for the code snippet!

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

Feel-ix-343 avatar May 08 '24 21:05 Feel-ix-343

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.

RyanGreenup avatar May 28 '24 04:05 RyanGreenup

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

Feel-ix-343 avatar Sep 09 '24 04:09 Feel-ix-343