Skip to content

Python requirements and constraints syntax highlighting for Zed

License

Notifications You must be signed in to change notification settings

dargor/zed-python-requirements

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python Requirements and Constraints Syntax Highlighting for Zed

Overview

This extension provides syntax highlighting for requirements.txt and constraints.txt files in the Zed code editor.

It leverages the tree-sitter-requirements grammar to ensure accurate and visually appealing syntax highlighting.

Configuration

Zed does not (yet ?) support registering globs from extensions, so you will need to put these lines in your settings.json :

{
  "file_types": {
    "Python constraints": [
      "constraints.txt",
      "constraints-*.txt",
      "constraints_*.txt",
      "*-constraints.txt",
      "*_constraints.txt"
    ],
    "Python requirements": [
      "**/requirements/*.txt",
      "requirements.txt",
      "requirements-*.txt",
      "requirements_*.txt",
      "*-requirements.txt",
      "*_requirements.txt"
    ]
  }
}

This should cover the most common cases.

Contributing

If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.

License

This extension is licensed under the MIT License.

About

Python requirements and constraints syntax highlighting for Zed

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages