oorg-mode babel - how to set up code blocks?
I'm sorry if this is the wrong spot to post this.
How do I set up org-mode babel code blocks to evaluate java code blocks with lsp-java? More specifically, to highlight warnings and errors, and sync class codeblocks to a workspace I believe I need to set org-babel-execute to the proper command on lsp-java This functionality appears to have been present in emacs-eclim, so I think it should be possible to set it up. But it is not a common use case
relevant documentation https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-java.html
This might be a dumb question
setting (org-babel-do-load-languages 'org-babel-load-languages '((java . t)))
allows the command (C-c C-c) to work, but no IDE is present in the code block, and it returns "Can't compile java block without classname" (but there is a class present. Will research more now)
OK, so the solution is defining a classname in the block metadata as per https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-java.html#orgb7540b8. so far it runs fine, but it doesnt have any of the annotating power of lsp-server. So I'm wondering how to get org-mode to enable lsp-server (perhaps there is a hook or mode) within code blocks, and then how to get that code block to be linked to the right workspace
have you checked https://github.com/emacs-lsp/lsp-mode/issues/2842#issuecomment-870807018
Thanks mate I'll try this