Skip to content

Commit

Permalink
Treat .mts and .cts files like typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
massivemadness committed Jun 5, 2022
1 parent f1bcb68 commit 0775c84
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ data class FileModel(
".xaml", ".xdf", ".xmpp", ".xml", ".sh", ".ksh", ".bsh", ".csh",
".tcsh", ".zsh", ".bash", ".groovy", ".gvy", ".gy", ".gsh", ".php",
".php3", ".php4", ".php5", ".phps", ".phtml", ".ts", ".ino", ".log",
".mjs", ".cjs", ".jl", ".yaml", ".yml", ".toml", ".gradle"
".mjs", ".cjs", ".jl", ".yaml", ".yml", ".toml", ".gradle", ".mts",
".cts"
)
val ARCHIVE = arrayOf(
".zip", ".jar", ".rar", ".7z", ".tar", ".gz", ".tgz",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import com.blacksquircle.ui.language.base.Language
import com.blacksquircle.ui.language.base.parser.LanguageParser
import com.blacksquircle.ui.language.base.provider.SuggestionProvider
import com.blacksquircle.ui.language.base.styler.LanguageStyler
import com.blacksquircle.ui.language.base.utils.endsWith
import com.blacksquircle.ui.language.typescript.parser.TypeScriptParser
import com.blacksquircle.ui.language.typescript.provider.TypeScriptProvider
import com.blacksquircle.ui.language.typescript.styler.TypeScriptStyler
Expand All @@ -28,10 +29,10 @@ class TypeScriptLanguage : Language {

companion object {

private const val FILE_EXTENSION = ".ts"
private val FILE_EXTENSIONS = arrayOf(".ts", ".mts", ".cts")

fun supportFormat(fileName: String): Boolean {
return fileName.endsWith(FILE_EXTENSION)
return fileName.endsWith(FILE_EXTENSIONS)
}
}

Expand Down

0 comments on commit 0775c84

Please sign in to comment.