Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Import/Export Keywords #245

Closed
wants to merge 1 commit into from
Closed

Conversation

audinue
Copy link

@audinue audinue commented Apr 26, 2017

This pull request adds import, as, from and export to keyword.other.coffee in CoffeeScript.tmLanguage.

This commit adds `import`, `as`, `from` and `export` to `keyword.other.coffee`.
@GeoffreyBooth
Copy link

This feels like the wrong place for this. I would think these keywords should be defined near where we define things like for and throw.

@nwbauer
Copy link

nwbauer commented Feb 5, 2018

FWIW, I also wanted this feature. Since this seems like the PR will no go forward, so I thought I would post my workaround here:

  1. With a coffeescript edited document open, go to Tools > Developer > New Syntax from Coffeescript.tmLanguage...

screen shot 2018-02-04 at 4 56 10 pm

  1. When the document opens, change the name: to something different, e.g. name: CoffeeScript Custom

  2. In contexts: main: add the lines

contexts:
  main:
   ...
    - match: '\b(import|as|from|export)\b'
      scope: keyword.operator.coffee
  1. Save the file in the default directory, and now you can use your new Coffeescript Custom syntax!

@auvipy
Copy link

auvipy commented Jan 4, 2020

#243 ?

@GeoffreyBooth
Copy link

I would be happy to merge in a PR that adds support for the missing keywords, but they should be defined in the proper place in the file. They shouldn’t be overloading debugger.

@deathaxe deathaxe closed this in cd108d4 Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants