Skip to content

Commit

Permalink
ess: Fix local vars
Browse files Browse the repository at this point in the history
- Labelled `ess-backend` as safe local variable.
- Added local variable hooks of ess modes:
  - `spacemacs//ess-may-setup-r-lsp`

See: syl20bnr#14653
  • Loading branch information
lebensterben committed Apr 17, 2021
1 parent bc713b1 commit 7bb1aa1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions layers/+lang/ess/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

(defvar ess-r-backend (if (configuration-layer/layer-used-p 'lsp) 'lsp 'ess)
"The backend to use for IDE features. Possible values are `ess' and `lsp'.")
(put 'ess-r-backend 'safe-local-variable #'symbolp)

(defvar ess-assign-key nil
"Call `ess-insert-assign'.")
6 changes: 2 additions & 4 deletions layers/+lang/ess/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
("\\.[Jj][Oo][Gg]\\'" . ess-jags-mode)
("\\.[Jj][Mm][Dd]\\'" . ess-jags-mode))
:commands (R stata julia SAS ess-julia-mode)
:hook (ess-r-mode-local-vars . spacemacs//ess-may-setup-r-lsp)
(inferior-ess-mode . spacemacs//ess-fix-read-only-inferior-ess-mode)
:init
(progn
(setq ess-use-company nil
Expand All @@ -91,10 +93,6 @@

(spacemacs/register-repl 'ess-site #'spacemacs/ess-start-repl)

(add-hook 'ess-r-mode-hook #'spacemacs//ess-may-setup-r-lsp)
(add-hook 'inferior-ess-mode-hook
'spacemacs//ess-fix-read-only-inferior-ess-mode)

(with-eval-after-load 'ess-julia
(spacemacs/ess-bind-keys-for-julia))
(with-eval-after-load 'ess-r-mode
Expand Down

0 comments on commit 7bb1aa1

Please sign in to comment.