Skip to content

Commit

Permalink
Initial org-mode integration (#1745)
Browse files Browse the repository at this point in the history
- check docs/page/lsp-org.md
- fixed diagnostics reporting (there will be additional PR to fix `lsp-treemacs-errors-list`).
  • Loading branch information
yyoncho committed Jun 6, 2020
1 parent fd6c372 commit 73dbfa5
Show file tree
Hide file tree
Showing 13 changed files with 1,328 additions and 319 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Expand Up @@ -47,3 +47,9 @@ flycheck_*.el
/*-autoloads.el
/*-pkg.el
/.ecukes-failing-scenarios

# java stuff
target
.classpath
.project
.settings
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -37,7 +37,7 @@ install:
script:
- cask build
- cask clean-elc
- cask exec ert-runner -t '!no-win'
- cask exec ert-runner -t '!no-win' -t '!org'
- |
if (( ${EMACS_VERSION:0:2} < 26 )); then
cask exec ecukes
Expand Down
45 changes: 45 additions & 0 deletions docs/page/lsp-org.md
@@ -0,0 +1,45 @@
# Literate programming using LSP and org-mode(alpha)
`lsp-mode` provides **experimental** support for running the language servers
inside of [org-mode](https://orgmode.org/) source blocks. `lsp-mode` is doing
that by obtaining the information about the source block and then translating
the point to the LSP positions back and forth so the server is which so the
server actually 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.


``` org
#+BEGIN_SRC python :tangle "python.py"
print "Hello!"
#+END_SRC
```

## Commands
* `lsp-org` start `lsp-mode` in source buffer.
* `lsp-virtual-buffer-disconnect` turn off `lsp-mode`.

## What works
* `lsp-mode` core features (finding references, going to definitions, completion, lenses, highlighting, etc)
* `company-mode`
* `flycheck`
* `lsp-treemacs-symbols`
* `lsp-treemacs-errors-list`

## Known limitations
* 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
behavour because the server expects file to be open only once.

## What does not work
* `dap-mode`
* `lsp-ui`
* `flymake`(?)

## What's next
- Finishing the virtual buffers `API`.
- `lsp-ui` support
- `dap-mode` support
- `markdown-mode` integration

0 comments on commit 73dbfa5

Please sign in to comment.