From 9ab57ee255a03b86ed7303aa94959e3b104e1719 Mon Sep 17 00:00:00 2001 From: mms Date: Fri, 19 Jan 2024 15:22:13 +0100 Subject: feat: extract into dedicated repo --- mms-prog-ruby.org | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 mms-prog-ruby.org (limited to 'mms-prog-ruby.org') diff --git a/mms-prog-ruby.org b/mms-prog-ruby.org new file mode 100644 index 0000000..18908a1 --- /dev/null +++ b/mms-prog-ruby.org @@ -0,0 +1,49 @@ +#+TITLE: Michał Sapka's Emacs Config - Prog mode - Ruby +#+AUTHOR: Michał Sapka (https://michal.sapka.me) +#+STARTUP: showall indent logdoneGeneral settings + +#+HUGO_BASE_DIR: ~/ghq/vcs.sapka.me/michal-sapka-me/ +#+HUGO_WEIGHT: 400 +#+HUGO_SECTION: emacs/config +#+HUGO_CATEGORIES: emacs emacs-config +#+HUGO_MENU :menu "emacs-config" :name "Ruby" +#+HUGO_CUSTOM_FRONT_MATTER: :abstract "My emacs config - Ruby" +#+HUGO_CUSTOM_FRONT_MATTER: :menu-abstract "My Ruby language setup" +#+EXPORT_FILE_NAME: ruby + +* Intro + +I am a Ruby developer by trade (and still /heart), but I am no longer a code + +* Irb + +Inf-Ruby allows for interactive REPL inside Emacs. +You can create a buffer with IRB, you can send code there and you can run =babel= code blocks in ruby. +Cool! + +#+begin_src emacs-lisp + (use-package inf-ruby + :ensure t) +#+end_src + +* Robe + +Yes, we have LSP but they work /poorly/ in my experience. +Robe is a major mode designed to work with Ruby so let's ride it. + +#+begin_src emacs-lisp + (use-package robe + :ensure t) +#+end_src + +And I want it to be enable whenever I am /doing ruby./ +#+begin_src emacs-lisp + (add-hook 'ruby-mode-hook 'robe-mode) + (add-hook 'ruby-ts-mode-hook 'robe-mode) +#+end_src + +Let's also add it to autocomplete (for the future, as I have yet to setup company) +#+begin_src emacs-lisp + (eval-after-load 'company + '(push 'company-robe company-backends)) +#+end_src -- cgit v1.2.3