Literate programming using LSP and org-mode(alpha)#
lsp-mode provides experimental support for running the language servers
inside of org-mode source blocks.
achieving this by obtaining the information about the source block from the
source block header(language +
:tangle) then translating the point to the LSP
positions back and forth so the language server thinks that Emacs has opened the
original file. In order that to work the files has to be present on the disk as
well because the server expects to find them.
Here it is a sample source block:
#+BEGIN_SRC python :tangle "python.py" print "Hello!" #+END_SRC
lsp-modein source buffer. Must be executed with cursor being source block.
lsp-modecore features (finding references, going to definitions, completion, lenses, highlighting, etc)
- Incremental updates are performed by sending the whole buffer each time(they simulate full updates).
- Deleting content that spans across the source block and the content of the org document is not handled.
- Opening and editing the actual file from the disk might cause undefined behaviour because the server expects file to be open only once.
What does not work#
- Finishing the virtual buffers