The purpose of this extension is to navigate Rails files with the help of shortcuts.
-
Template engines
.erb
,.slim
, andhaml
are already supported for view files. They can be customized by changingnavigateRailsFiles.templateEngines
in the VSCode settings. -
RSpec is used for test files, but Minitest has not been supported yet.
-
ViewComponent is supported out of the box. If sidecar directories are being used, set
navigateRailsFiles.useViewComponentsSidecar
totrue
.
-
Files ending with template engines (
erb
,slim
, andhaml
as default or custom ones) are checked one-by-one. -
If there is no html file, a turbo_stream file is opened if it exists.
-
So the order of checked files is as follows:
html.erb
,html.slim
,html.haml
,turbo_stream.erb
,turbo_stream.slim
, andturbo_stream.haml
.
This extension contributes the following settings:
navigateRailsFiles.allowToOpenRbFile
: Allows using the shortcut to open Ruby files ("true" by default).navigateRailsFiles.allowToOpenAppHtmlFile
: Allows using the shortcut to open view (.html) files ("true" by default).navigateRailsFiles.allowToOpenAppTurboStreamFile
: Allows using the shortcut to open view (.turbo_stream) files ("true" by default).navigateRailsFiles.allowToOpenRspecFile
: Allows using the shortcut to open test (RSpec) files ("true" by default).
- Press "F1" and select "Debug: Select and Start Debugging." Then select "Extension Tests."
The extension can be customized by any developer easily. Please follow the steps below to use your custom version.
- Clone the repository.
- Run
npm install -g @vscode/vsce
to install vsce if necessary. - Customize any part of the project.
- Run
vsce package
. - Open your VSCode.
- Press "F1" and select "Extensions: Install from VSIX." Then, select the generated file ending with
.vsix
.
Reach out to us at one of the following places!
👤 Hasan Özovalı
- LinkedIn: Hasan Ozovali
- Github: @ozovalihasan
- Twitter: @ozovalihasan
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like the extension!