Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #136 from codiga/juli1/support-twig
Browse files Browse the repository at this point in the history
Support Twig
  • Loading branch information
juli1 authored Sep 14, 2022
2 parents 27a8070 + 7633110 commit 8582646
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pluginGroup=codiga.io.plugins
pluginName=codiga-jetbrains-plugin
pluginVersion=1.7.12
pluginVersion=1.7.13
pluginSinceBuild=213
pluginUntilBuild=222.*
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
Expand Down
2 changes: 1 addition & 1 deletion src/main/graphql/io/codiga/api/schema.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public final class LanguageUtils {
.put("java", LanguageEnumeration.JAVA)
.put("kt", LanguageEnumeration.KOTLIN)
.put("m", LanguageEnumeration.OBJECTIVEC)
.put("md", LanguageEnumeration.MARKDOWN)
.put("mm", LanguageEnumeration.OBJECTIVEC)
.put("M", LanguageEnumeration.OBJECTIVEC)
.put("pl", LanguageEnumeration.PERL)
Expand All @@ -41,15 +42,17 @@ public final class LanguageUtils {
.put("php", LanguageEnumeration.PHP)
.put("php4", LanguageEnumeration.PHP)
.put("php5", LanguageEnumeration.PHP)
.put("sass", LanguageEnumeration.SASS)
.put("scala", LanguageEnumeration.SCALA)
.put("scss", LanguageEnumeration.CSS)
.put("scss", LanguageEnumeration.SCSS)
.put("sql", LanguageEnumeration.SQL)
.put("sol", LanguageEnumeration.SOLIDITY)
.put("sh", LanguageEnumeration.SHELL)
.put("swift", LanguageEnumeration.SWIFT)
.put("tf", LanguageEnumeration.TERRAFORM)
.put("ts", LanguageEnumeration.TYPESCRIPT)
.put("tsx", LanguageEnumeration.TYPESCRIPT)
.put("twig", LanguageEnumeration.TWIG)

.put("yml", LanguageEnumeration.YAML)
.put("yaml", LanguageEnumeration.YAML)
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/io/codiga/plugins/jetbrains/utils/LanguageUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ public static String getLanguageName(LanguageEnumeration languageEnumeration) {
return "Go";
case JAVA:
return "Java";
case MARKDOWN:
return "Markdown";
case SCSS:
return "Scss";
case SASS:
return "Sass";
case TWIG:
return "Twig";
default:
return "Unknown";
}
Expand Down Expand Up @@ -90,6 +98,8 @@ public static boolean lineStartsWithComment(@NotNull LanguageEnumeration languag
case SWIFT:
case SOLIDITY:
case RUST:
case SCSS:
case SASS:
return filteredLine.startsWith("//");
case PYTHON:
case SHELL:
Expand All @@ -105,6 +115,8 @@ public static boolean lineStartsWithComment(@NotNull LanguageEnumeration languag
return filteredLine.startsWith("--");
case CSS:
return filteredLine.startsWith("/*");
case TWIG:
return filteredLine.startsWith("{#");
default:
return false;
}
Expand Down

0 comments on commit 8582646

Please sign in to comment.