Skip to content

Use firstLine in package.json so syntax hignlights for #!/usr/bin/env python* and similar #3892

Closed

Description

Environment data

  • VS Code version: 1.27.2 (mac)
  • Extension version (available under the Extensions sidebar): 2018.12.1
  • OS and version: MacOS Sierra and Windows 10

Expected behaviour

Syntax highlight for python happens on extensionless files when #! /usr/bin/env python[0-9] or similar is the first line of a file.

Actual behaviour

Files without extensions are not syntax highlighted as python code.

Steps to reproduce:

Create file with '#!/usr/bin/env python' as the first line
run: code filenameWithoutExtension

Observe the lack of syntax highlighting.

Activity

  1. ghost added
    triage-neededNeeds assignment to the proper sub-team
    on Jan 5, 2019
  2. cgahlon commented on Jan 5, 2019

    @cgahlon
    Author
  3. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Jan 7, 2019
  4. removed their assignment
    on Jan 12, 2019
  5. DonJayamanne commented on Jan 18, 2019

    @DonJayamanne

    Christopher Gahlon (@cgahlon)
    What kind of files are you working on that do not have extensions but have python code in them?

  6. cgahlon commented on Jan 18, 2019

    @cgahlon
    Author

    Some annoying things I have inherited and random stuff I've encountered on the internet. I saw the shell plugin had firstLine in it so I copied it from there.

    I see tests for the PR are failing so if this change is going to create a lot of work for someone go ahead and close this issue and cancel the PR. I can manually update my package.json if/when it changes.

  7. DonJayamanne commented on Jan 23, 2019

    @DonJayamanne

    Some annoying things I have inherited and random stuff I've encountered on the internet.

    Sounds more like a need for a one-off project/task.
    Closing as a result of that.
    Thanks for the PR though.

  8. locked as resolved and limited conversation to collaborators on Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions