Comments (13)
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 polymode-lsp-integration
to nil in order to disable it.
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?
from poly-r.
polymode-lsp-integration
should be set before polymode is loaded though
from poly-r.
I experience the same issue, so it's reproducible. 😞
For now I'll disable it as @vspinu suggests.
from poly-r.
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 polymode-lsp-integration
before polymode is loaded? At the moment I'm loading poly-r
in my dotspacemacs-additional-packages
list and then using (setq polymode-lsp-integration nil)
in my user config.
from poly-r.
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
polymode-lsp-integration
before polymode is loaded? At the moment I'm loadingpoly-r
in mydotspacemacs-additional-packages
list and then using(setq polymode-lsp-integration nil)
in my user config.
As far as I am aware, if you're not using the ESS layer (you're specifying polymode
[not poly-r; you need to configure this for polymode - poly-r
is dependent on Polymode's configuration]), then the way to set the variable's value before the package is loaded is with the :init
property.
You should double-check the documentation, but the way I am doing it is with this line in my user-config
; I am not sure it is working, however, because I am using the ESS layer. The layer does not include Polymode, however, so it should be working.
I do still have the lsp
layer enabled, and an LSP server is not being started when I enter an R code block in an Rmd document just now, so I can at least say that it is disabled, yes.
(use-package eglot)
(use-package polymode
:init (setq polymode-lsp-integration nil))
I changed the backend to eglot
two days ago, and that may have had a fuller effect. I'm not sure. Spacemacs is going through a period of change right now and many layers and core functionality needs code review and refactoring. I'll be contributing to that this summer.
For clarity, this is what I have in my dotspacemacs/layers
:
(;; 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 additional-packages
list:
;; Language server
eglot
;;; Multi-language buffers, incl. Rmd
(polymode :location (recipe :fetcher github :repo "polymode/polymode"))
poly-R
poly-markdown
poly-noweb
poly-org
from poly-r.
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 polymode-lsp-integration
to nil in both the ess variables and using use-package in user-config.
from poly-r.
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
polymode-lsp-integration
to nil in both the ess variables and using use-package in user-config.
If I recall, you said you're using Spacemacs. In that case, the best place to put the setting of that variable is in dotspacemacs/user-init
, which will execute before layers and packages are loaded and initialized, so the variable will have the proper setting at the proper time with this location.
from poly-r.
That doesn't seem to work for me either :(
I added the below to dotspacemacs/user-init
:
(require 'use-package)
(use-package polymode
:init (setq polymode-lsp-integration nil))
And got (Spacemacs) Error in dotspacemacs/user-init: Cannot open load file: No such file or directory, use-package
. I had to require use-pacakge because otherwise I get (Spacemacs) Error in dotspacemacs/user-init: Symbol’s function definition is void: use-package
.
from poly-r.
Update: I successfully disabled polymode-lsp-integration
.
The solution: updating my packages.
I didn't take the "recent" part of what @vspinu said earlier seriously enough:
With the most recent polymode you should be able to set polymode-lsp-integration to nil in order to disable it.
Now for everything to work as expected (and still use LSP within Rmd R code chunks) I just need to do the following:
- Disable
polymode-lsp-integration
in theess
layer config:
(ess :variables
ess-r-backend 'lsp
polymode-lsp-integration nil)
- Add
poly-R
todotspacemacs-additional-packages
No need to load polymode
separately or to use dotspacemacs/user-init
.
from poly-r.
I wasn't aware of this issue when I opened this polymode/polymode#316
Setting (setq polymode-lsp-integration nil)
solves the issue for me.
from poly-r.
I am getting this too using doomemacs
. Setting (setq polymode-lsp-integration nil)
worked for me too.
from poly-r.
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.
from poly-r.
Related Issues (20)
- Menubar crashes Aquamacs when R buffer is open HOT 16
- poly-R start up error HOT 2
- Fontification error Rmd files HOT 2
- Losing track of org buffer with smartparens HOT 1
- How to change to latex-mode in math enviroments HOT 1
- template menu not populated HOT 1
- Support for Github-flavored markdown mode HOT 1
- poly-R no longer works in doom HOT 1
- File mode specification error: (void-variable keymap) HOT 1
- R chunks starting with a single-commented line not indented on first line HOT 1
- Cannot evaluate R in flatwhatson/emacs-pgtk-nativecomp build HOT 6
- Loading template for .Rmd file and using it
- Call bookdown exporter interactively HOT 3
- How to enable shell-escape latex option? HOT 2
- RMarkdown template menu population so slow making emacs menu system unusable
- poly-r fails to load when using `straight.el` HOT 1
- Latex (Math) highlight is broken when auctex is installed
- Inline code starting with `r#` not detected
- Eglot slow down polymode HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poly-r.