diff --git a/bin/rubocop-daemon-wrapper b/bin/rubocop-daemon-wrapper index 5c4012d..ec93aa9 100755 --- a/bin/rubocop-daemon-wrapper +++ b/bin/rubocop-daemon-wrapper @@ -4,7 +4,7 @@ set -e COMMAND_PREFIX="" -if [ -n "$RUBOCOP_DAEMON_USE_BUNDLER" ]; then +if [ -n "$RUBOCOP_DAEMON_USE_BUNDLER" ] || [ -n "$BUNDLER_VERSION" ]; then COMMAND_PREFIX="bundle exec" fi @@ -91,7 +91,10 @@ mkdir -p "$LOCK_PATH" for ARG in $@; do if [ -z "$STDIN_CONTENT" ] && [ "$ARG" == "--stdin" ] || [ "$ARG" == "-s" ]; then # Preserve final new lines when ingesting from STDIN - STDIN_CONTENT="$(cat; printf x)" + STDIN_CONTENT="$( + cat + printf x + )" STDIN_CONTENT=${STDIN_CONTENT%x} fi done diff --git a/modules/languages/siren-ruby.el b/modules/languages/siren-ruby.el index 298dfe3..c167584 100644 --- a/modules/languages/siren-ruby.el +++ b/modules/languages/siren-ruby.el @@ -85,6 +85,9 @@ :custom (lsp-solargraph-multi-root nil)) +(use-package bundler + :defer t) + (use-package inf-ruby :defer t :hook diff --git a/snippets/ruby-mode/rubocop/rud b/snippets/ruby-mode/rubocop/rud new file mode 100644 index 0000000..bf6e136 --- /dev/null +++ b/snippets/ruby-mode/rubocop/rud @@ -0,0 +1,4 @@ +# name: rubocop:disable ... +# key: rud +# -- +# rubocop:disable $0 \ No newline at end of file diff --git a/snippets/ruby-mode/rubocop/rue b/snippets/ruby-mode/rubocop/rue new file mode 100644 index 0000000..d1c86fd --- /dev/null +++ b/snippets/ruby-mode/rubocop/rue @@ -0,0 +1,4 @@ +# name: rubocop:enable ... +# key: rue +# -- +# rubocop:enable $0 \ No newline at end of file