-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug when typing in Markdown after using ESS with LSP #34
Comments
There is a half backed lsp integration in polymode since recently but I got interrupted and it's not yet fully tested. That might be an issue. With the most recent polymode you should be able to set I will have a closer look at this issue some time later. Do I understand correctly that R lsp server does understand markdown documents, thus no special integration is needed on polymode side? |
|
I experience the same issue, so it's reproducible. 😞 For now I'll disable it as @vspinu suggests. |
Thanks @vspinu! I'm not sure how to answer your question about the R lsp server understanding markdown documents unfortunately. Also, can you clarify how I should set |
As far as I am aware, if you're not using the ESS layer (you're specifying You should double-check the documentation, but the way I am doing it is with this line in my I do still have the (use-package eglot)
(use-package polymode
:init (setq polymode-lsp-integration nil)) I changed the backend to For clarity, this is what I have in my (;; TODO: configure `lsp', `company', `company-box', etc.
ess :variables
ess-r-backend 'eglot
ess-use-company 't
markdown-code-block-braces t
polymode-lsp-integration nil
:config (add-to-list 'auto-mode-alist '("\\.[rR]md\\'" . poly-markdown+r-mode))) and this is what I have in my ;; Language server
eglot
;;; Multi-language buffers, incl. Rmd
(polymode :location (recipe :fetcher github :repo "polymode/polymode"))
poly-R
poly-markdown
poly-noweb
poly-org
|
Thanks! Unfortunately it's still not selectively disabling it in Rmd code chunks even after I load polymode in addition to poly-R as you have, and set |
If I recall, you said you're using Spacemacs. In that case, the best place to put the setting of that variable is in |
That doesn't seem to work for me either :( (require 'use-package)
(use-package polymode
:init (setq polymode-lsp-integration nil)) And got |
Update: I successfully disabled The solution: updating my packages. I didn't take the "recent" part of what @vspinu said earlier seriously enough:
Now for everything to work as expected (and still use LSP within Rmd R code chunks) I just need to do the following:
(ess :variables
ess-r-backend 'lsp
polymode-lsp-integration nil)
No need to load |
I wasn't aware of this issue when I opened this polymode/polymode#316 Setting |
- Fixes polyr issue: polymode/poly-R#34
I am getting this too using |
It seems that polymode-lsp-integration only works with lsp-mode? I am using eglot, and editing rmarkdown file is extremely slow, when typing in the code block, emacs frequently hangs for 2-3 seconds to respond to input characters. |
I do have the same problem. Using the suggestion of @vspinu I solved it and I'm able to work with Rmd files. I still have issues fontifyng the script. All is white (dark background) and some colored word randomly appear. Any suggestion? |
When I write in an rmd file everything is normal when editing the markdown parts. After I enter an ESS code chunk, subsequent typing in markdown leads to weird things, including jumping to the end of the buffer and typing in reverse. Editing is fine within the code chunk. The issue persists even after deleting the code chunk but "resets" after I close and reopen the buffer. Also the bug doesn't happen when I don't load the
lsp
layer in spacemacs so I assume it has something to do with that. I usually have(ess :variables ess-r-backend 'lsp)
in the layer config but the issue happens even when I just loadess
. Everything is fine in a normal ESS buffer. See below for a demonstration:poly-r-bug.mov
Setup
The text was updated successfully, but these errors were encountered: