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/layers.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

17 lines
519 B
EmacsLisp

;;; layers.el --- Ruby Layer declarations 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
(when (and (boundp 'ruby-backend)
(eq ruby-backend 'lsp))
(configuration-layer/declare-layer-dependencies '(dap)))
(when (boundp 'ruby-prettier-on-save)
(configuration-layer/declare-layer-dependencies '(prettier)))