Skip to content

Commit

Permalink
Merge pull request #1632 from ortex/improve-defm-live-template
Browse files Browse the repository at this point in the history
Improve defm live template
  • Loading branch information
KronicDeth committed Mar 13, 2020
2 parents bcee5f8 + a24b676 commit 8124fc1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@
### Bug Fixes
* [#1646](https://github.com/KronicDeth/intellij-elixir/pull/1646) - [@seanwash](https://github.com/seanwash)
* Swap improperly sized `General.QuestionDialog` icon for `RunConfigurations.TestUnknown` icon for Unknown icon in Structure View.
* [#1632](https://github.com/KronicDeth/intellij-elixir/pull/1632) - [@ortex](https://github.com/ortex)
* Fix `MODULENAME` variable in `defm` live template, so that the file name is camel-cased before being capitalized.

## v11.5.0
### Enhancements
Expand Down
4 changes: 4 additions & 0 deletions resources/META-INF/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ <h1>v11.5.1</h1>
Swap improperly sized <code>General.QuestionDialog</code> icon for <code>RunConfigurations.TestUnknown</code>
icon for Unknown icon in Structure View.
</li>
<li>
Fix <code>MODULNAME</code> variable in <code>defm</code> live template, so that the file name is camel-cased
before being capitalized.
</li>
</ul>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion resources/liveTemplates/Elixir.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</context>
</template>
<template name="defm" value="defmodule $MODULNAME$ do&#10; $END$&#10;end" description="def module" toReformat="true" toShortenFQNames="true" >
<variable name="MODULNAME" expression="capitalize(fileNameWithoutExtension())" defaultValue="" alwaysStopAt="true" />
<variable name="MODULNAME" expression="capitalize(camelCase(fileNameWithoutExtension()))" defaultValue="" alwaysStopAt="true" />
<context>
<option name="ELIXIR_CODE" value="true" />
</context>
Expand Down

0 comments on commit 8124fc1

Please sign in to comment.