emacs-ess / ESS

Emacs Speaks Statistics: ESS
https://ess.r-project.org/
GNU General Public License v3.0
620 stars 162 forks source link

Syntax highlighting for base R pipe operator `|>` #1206

Open maxecharel opened 2 years ago

maxecharel commented 2 years ago

Hi, Thanks to the variable ess-R-fl-keyword:%op%, the maggritr pipe operator %>% can be highlighted. Would it be possible to have the same for the 'recently' introduced base R pipe |> ?

(thanks for the amazing work with ESS)

maxecharel commented 2 years ago

actually I think that's a good opportunity for me to learn to contribute and to build elisp skills. I will try to implement that next week

cddesja commented 2 years ago

@maxecharel not sure if you ever figured this out (or if it's now supported by ESS), but the following works for me

      (with-eval-after-load 'ess
      (cl-pushnew "|>" ess-R-assign-ops :test 'string=))