Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an add on generator #3217

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Hungle2911
Copy link
Contributor

Motivation

Closes #2901

Add-ons have a bit of boilerplate code that is tedious to setup. This pull request will add generator command into executable that can both add the add-on structure to an existing gem or create a brand new add-on gem.

Implementation

Add-on Creation Logic:

  • Add executable ruby-lsp --new-addon [ADD-ON]

=> If inside an existing project (detected by Gemfile), creates add-on files in lib/ruby_lsp/<addon_name>.

=> If outside a project, prompts to create a new gem using bundle gem and then adds the add-on files.

  • Added a private camelize method to transform some_name into SomeName for module naming.

  • Creates addon.rb and addon_test.rb with boilerplate code following best practices.

  • Updates notes on the add-on docs to include the newest feature

Manual Tests

Screen.Recording.2025-02-19.at.5.55.42.PM.mov
Screen.Recording.2025-02-19.at.6.03.14.PM.mov

@Hungle2911 Hungle2911 requested a review from a team as a code owner February 19, 2025 23:45
Copy link

graphite-app bot commented Feb 19, 2025

How to use the Graphite Merge Queue

Add the label graphite-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an add-on generator
1 participant