annotate_models icon indicating copy to clipboard operation
annotate_models copied to clipboard

[Feature request] attribute YARD documentation for solargraph support

Open Samsinite opened this issue 5 years ago • 7 comments

Hi, love this gem, been using it for years.

Recently, I started using the solargraph ruby language server in my editor, which uses YARD documentation to provide intellisense like features for ruby projects. Is there any interest in adding support for this to annotate_models? If not, do you have any recommendations on the best approach to build an extension to this gem to assist with generating that documentation?

Cheers!

Samsinite avatar Jan 13 '20 19:01 Samsinite

Hi,

I'm currently working on an implementation of this but i don't know if there is any interest here in adding yard support...

tvallois avatar Jan 14 '20 16:01 tvallois

@tvallois would you be interested in assistance if support for documentation can be added?

Samsinite avatar Jan 22 '20 20:01 Samsinite

Ah I may have misunderstood, it looks like you meant that you are working on adding support for yard, but you weren't sure if the maintainers were interested in adding yard support. Would you be interested in collaborating?

Samsinite avatar Jan 22 '20 20:01 Samsinite

hi @Samsinite, there is already a pull request on this https://github.com/ctran/annotate_models/pull/724 Yeah we can collaborate to improve this.

tvallois avatar Jan 22 '20 20:01 tvallois

I've tried to use the develop version of this project in our rails app using YARD but i have an error

Unable to annotate app/models/preview.rb: undefined method `map_col_type_to_ruby_classes' for AnnotateModels:Module

Any idea @Samsinite @drwl ?

tvallois avatar Jan 30 '20 21:01 tvallois

@tvallois Can you run it with --trace?

drwl avatar Feb 01 '20 04:02 drwl

tvallois@tvallois-G3-3579:~/enlaps/enlaps-web$ bundle exec bin/rake db:migrate --trace
Running via Spring preloader in process 14460
** Invoke db:migrate (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:load_config
** Execute db:migrate
** Invoke db:_dump (first_time)
** Execute db:_dump
** Invoke db:schema:dump (first_time)
** Invoke db:load_config 
** Execute db:schema:dump
** Invoke set_annotation_options (first_time)
** Execute set_annotation_options
** Invoke annotate_models (first_time)
** Invoke set_annotation_options 
** Invoke environment 
** Execute annotate_models
Unable to annotate app/models/user.rb: undefined method `map_col_type_to_ruby_classes' for AnnotateModels:Module
Unable to annotate app/models/user.rb: no implicit conversion of nil into Array

tvallois avatar Feb 03 '20 10:02 tvallois