asok / projectile-rails

Emacs Rails mode based on projectile
258 stars 59 forks source link

Customize rails skeletons / templates #164

Open fmichaut-diff opened 1 year ago

fmichaut-diff commented 1 year ago

Currently when I open a new file under app/jobs/foo/bar.rb, the following skeleton gets generated :

class Foo::Bar < ApplicationJob

end

I would like to be able to customize the template myself, for instance to have something like this :

# frozen_string_literal: true

module Foo
  class Bar < ApplicationJob
  end
end

I am using snippet-mode on Emacs, but I do not see the projectile-rails templates listed there, and the only reference I found or a job template was in projectile-rails.el:1057 , so not likely customizable.

Could it be possible to move the templates as regular templates files that could be overwritten by custom ones ?