Closed wuqui closed 4 years ago
You should be able to just copy that block into your config. The way it should work is by creating a temporary file for the LSP server to be called on, linking it to the buffer, and starting LSP up. It's not my own code (credit to @seagle0128), but it's worked fairly well for me :)
Does it something similar to lsp-org
from lsp-mode
or is that something you use additionally?
Do you do your coding in the org buffer or in org-edit-special
buffers?
Edit: it seems to work now. Just in org-edit-special
buffers, but that's still nice. The only downside is that the completions etc. only know about the current code block and can't make intelligent suggestions for variables defined in other blocks or libraries loaded in other blocks. But I guess that's just a general limitation and not some error on my side, right?
Unfortunately, yea. Not sure how well lsp-org
works, it wasn't around when I started using this.
I have now switched from using LSP to just using anaconda-mode
in the org file. I'm using emacs-jupyter
and I'm evaluating stuff from the org buffer using C-x C-e
, so I don't even have to rely on org-edit-special
buffers anymore. This is a great setup for me now, just to let you know in case you're interested. I haven't found anybody else suggesting this, to my surprise. And thanks anyways.
Thanks for sharing your awesome config!
I'm very interested in getting LSP to play nicely with org source blocks, and I've only had limited success so far. I saw you have a section in your config on that topic. Unfortunately, I don't know what it does exactly and how to get it running. Could you elaborate? Would be much appreciated.