Skip to content

Commit

Permalink
Recognize .cts and .mts file type as TypeScript (helix-editor#6424)
Browse files Browse the repository at this point in the history
TypeScript can use three type of file extensions:
  - .ts  for regular TypeScript
  - .cts for CommonJS modules
  - .mts for ES modules

Official documentation on supported file extensions:
https://www.typescriptlang.org/docs/handbook/esm-node.html#new-file-extensions
  • Loading branch information
Alexis-Lapierre authored and wes-adams committed Jul 3, 2023
1 parent c1d75cd commit c65104a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ includeInlayVariableTypeHints = true
name = "typescript"
scope = "source.ts"
injection-regex = "(ts|typescript)"
file-types = ["ts"]
file-types = ["ts", "mts", "cts"]
shebangs = []
roots = []
# TODO: highlights-params
Expand Down

0 comments on commit c65104a

Please sign in to comment.