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 Schuyler Mortimer committed Jul 10, 2024
1 parent 7979685 commit eb1bcec
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 eb1bcec

Please sign in to comment.