-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: various features + prepare for alpha release
- Loading branch information
1 parent
2858fef
commit 2f66a0f
Showing
18 changed files
with
523 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
node_modules | ||
main.dist.js | ||
main.dist.js | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## Version 0.5 - Alpha | ||
|
||
### FEATURES | ||
|
||
- Added Rails project detection | ||
- Added Rails Server Task | ||
- Added Rails About sidebar | ||
- Added Rails Documentation search | ||
- Added Rails list and last migration commands | ||
- Added Rails alternate file command | ||
- Added Erb Tag Switcher | ||
- Added Status Notifications |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Tommaso Negri | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Ruby on Rails for Nova editor - ALPHA | ||
|
||
This extension is still in Alpha and various features will be added later on. If you have any suggestion or you have some free time you are free to contribute. | ||
|
||
## Features | ||
|
||
### Rails Server Task | ||
|
||
Automatically generate a Task for running the Rails Server command. | ||
|
||
### Search in various documentations | ||
|
||
Run the Search Documentation command for searching in different documentations online. | ||
|
||
### Open the last migration or list them all | ||
|
||
Run the Last Migration or the List Migrations commands for streamlining those operations. | ||
|
||
### Open Alternate File | ||
|
||
Run the Open Alternate File for rapidly switching between tests and model/controller/etc files. | ||
|
||
### ERB Tag Switcher | ||
|
||
Quickly switch between `<%`, `<%=` & `<%#` with a single shortcut. | ||
|
||
Select a text to wrap it in ERB tags or just use `⌘-shift->` to create a tag and start typing the expression. | ||
|
||
## Features on their way | ||
|
||
- Solargraph support | ||
- Solargrah settings exposed | ||
- Scaffolding Solargraph Files for better Rails Support | ||
|
||
## Contributors | ||
|
||
You are welcome to contribute in any way you can think of! | ||
|
||
Thanks to @devjah, @jonathanpike and @Wylan for their work on different extensions which have been integrated in this suite. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
CHANGELOG.md | ||
README.md | ||
LICENSE | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
## Version 1.0 | ||
## Version 0.5 - Alpha | ||
|
||
Initial release | ||
### FEATURES | ||
|
||
- Added Rails project detection | ||
- Added Rails Server Task | ||
- Added Rails About sidebar | ||
- Added Rails Documentation search | ||
- Added Rails list and last migration commands | ||
- Added Rails alternate file command | ||
- Added Erb Tag Switcher | ||
- Added Status Notifications |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Ruby on Rails for Nova editor - ALPHA | ||
|
||
This extension is still in Alpha and various features will be added later on. If you have any suggestion or you have some free time you are free to contribute. | ||
|
||
## Features | ||
|
||
### Rails Server Task | ||
|
||
Automatically generate a Task for running the Rails Server command. | ||
|
||
### Search in various documentations | ||
|
||
Run the Search Documentation command for searching in different documentations online. | ||
|
||
### Open the last migration or list them all | ||
|
||
Run the Last Migration or the List Migrations commands for streamlining those operations. | ||
|
||
### Open Alternate File | ||
|
||
Run the Open Alternate File for rapidly switching between tests and model/controller/etc files. | ||
|
||
### ERB Tag Switcher | ||
|
||
Quickly switch between `<%`, `<%=` & `<%#` with a single shortcut. | ||
|
||
Select a text to wrap it in ERB tags or just use `⌘-shift->` to create a tag and start typing the expression. | ||
|
||
## Features on their way | ||
|
||
- Solargraph support | ||
- Solargrah settings exposed | ||
- Scaffolding Solargraph Files for better Rails Support | ||
|
||
## Contributors | ||
|
||
You are welcome to contribute in any way you can think of! | ||
|
||
Thanks to @devjah, @jonathanpike and @Wylan for their work on different extensions which have been integrated in this suite. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
chars = 'a,b,c' | ||
|
||
chars.split(',').length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
function reload() { | ||
nova.commands.invoke("tommasonegri.rails.commands.reload"); | ||
} | ||
|
||
nova.config.onDidChange( | ||
"tommasonegri.rails.config.general.statusNotifications", | ||
reload | ||
); | ||
nova.workspace.config.onDidChange( | ||
"tommasonegri.rails.config.general.statusNotifications", | ||
reload | ||
); | ||
|
||
function getExtensionSetting() { | ||
return nova.config.get( | ||
"tommasonegri.rails.config.general.statusNotifications", | ||
"boolean" | ||
); | ||
} | ||
|
||
function getWorkspaceSetting() { | ||
const str = nova.workspace.config.get( | ||
"tommasonegri.rails.config.general.statusNotifications", | ||
"string" | ||
); | ||
|
||
switch (str) { | ||
case "Global Default": | ||
return null; | ||
case "Enable": | ||
return true; | ||
case "Disable": | ||
return false; | ||
default: | ||
return null; | ||
} | ||
} | ||
|
||
export default function statusNotificationsSetting() { | ||
const workspaceConfig = getWorkspaceSetting(); | ||
const extensionConfig = getExtensionSetting(); | ||
|
||
return workspaceConfig === null ? extensionConfig : workspaceConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
function reload() { | ||
nova.commands.invoke("tommasonegri.rails.commands.reload"); | ||
} | ||
|
||
nova.config.onDidChange("tommasonegri.rails.config.solargraph.hover", reload); | ||
nova.workspace.config.onDidChange( | ||
"tommasonegri.rails.config.solargraph.hover", | ||
reload | ||
); | ||
|
||
function getExtensionSetting() { | ||
return nova.config.get( | ||
"tommasonegri.rails.config.solargraph.hover", | ||
"boolean" | ||
); | ||
} | ||
|
||
function getWorkspaceSetting() { | ||
const str = nova.workspace.config.get( | ||
"tommasonegri.rails.config.solargraph.hover", | ||
"string" | ||
); | ||
|
||
switch (str) { | ||
case "Global Default": | ||
return null; | ||
case "Enable": | ||
return true; | ||
case "Disable": | ||
return false; | ||
default: | ||
return null; | ||
} | ||
} | ||
|
||
export default function solargraphHoverSetting() { | ||
const workspaceConfig = getWorkspaceSetting(); | ||
const extensionConfig = getExtensionSetting(); | ||
|
||
return workspaceConfig === null ? extensionConfig : workspaceConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.