This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+lang/ruby/config.el
Sid Raval 9b6a49d6c0
Support prettier formatter for Ruby layer (#14252)
* First working pass

- Runs prettier on save when in ruby-mode.
- Adds `node_modules/.bin/` to local `exec-path`
  - This means project-local `prettier` executables are preferred

* Making ruby layer prettier formatting configurable

- Adds a variable to control whether prettier is used to format-on-save.
- Documents use, configuration, and keybindings in the README

* Add to CHANGELOG.develop

* Delete spurious comment

* Use prettier as a dependency only when config variable is present
2021-01-09 08:34:04 +01:00

36 lines
1.1 KiB
EmacsLisp

;;; config.el --- Ruby Layer configuration File for Spacemacs
;;
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;; Variables
(spacemacs|define-jump-handlers enh-ruby-mode)
(spacemacs|define-jump-handlers ruby-mode)
(defvar ruby-backend 'robe
"Defines the backend for IDE features, defaulting to robe.
Possible values are `robe', and `lsp'.
If `nil' then `robe' is the default backend unless `lsp' layer is used.")
(defvar ruby-enable-enh-ruby-mode nil
"If non-nil, use `enh-ruby-mode' package instead of the built-in Ruby Mode.")
(defvar ruby-version-manager nil
"If non nil, defines the Ruby version manager.
Possible values are `rbenv', `rvm' or `chruby'.)")
(defvar ruby-test-runner 'ruby-test
"Test runner to use. Possible values are `ruby-test', `minitest' or `rspec'.")
(defvar ruby-highlight-debugger-keywords t
"If non-nil, enable highlight for debugger keywords.")
(defvar ruby-prettier-on-save nil
"Use prettier and run on buffer save")