# requirements-language-server
[](https://requirements-language-server.readthedocs.io)
[](https://results.pre-commit.ci/latest/github/Freed-Wu/requirements-language-server/main)
[](https://github.com/Freed-Wu/requirements-language-server/actions)
[](https://codecov.io/gh/Freed-Wu/requirements-language-server)
[](https://deepsource.io/gh/Freed-Wu/requirements-language-server)
[](https://github.com/Freed-Wu/requirements-language-server/releases)
[](https://github.com/Freed-Wu/requirements-language-server/releases/latest)
[](https://github.com/Freed-Wu/requirements-language-server/issues)
[](https://github.com/Freed-Wu/requirements-language-server/issues?q=is%3Aissue+is%3Aclosed)
[](https://github.com/Freed-Wu/requirements-language-server/pulls)
[](https://github.com/Freed-Wu/requirements-language-server/pulls?q=is%3Apr+is%3Aclosed)
[](https://github.com/Freed-Wu/requirements-language-server/discussions)
[](https://github.com/Freed-Wu/requirements-language-server/milestones)
[](https://github.com/Freed-Wu/requirements-language-server/network/members)
[](https://github.com/Freed-Wu/requirements-language-server/stargazers)
[](https://github.com/Freed-Wu/requirements-language-server/watchers)
[](https://github.com/Freed-Wu/requirements-language-server/graphs/contributors)
[](https://github.com/Freed-Wu/requirements-language-server/graphs/commit-activity)
[](https://github.com/Freed-Wu/requirements-language-server/commits)
[](https://github.com/Freed-Wu/requirements-language-server/releases/latest)
[](https://github.com/Freed-Wu/requirements-language-server/blob/main/LICENSE)
[](https://github.com/Freed-Wu/requirements-language-server)
[](https://github.com/Freed-Wu/requirements-language-server)
[](https://github.com/Freed-Wu/requirements-language-server)
[](https://github.com/Freed-Wu/requirements-language-server)
[](https://github.com/Freed-Wu/requirements-language-server)
[](https://github.com/Freed-Wu/requirements-language-server)
[](https://pypi.org/project/requirements-language-server/#description)
[](https://pypi.org/project/requirements-language-server/#history)
[](https://pypi.org/project/requirements-language-server/#files)
[](https://pypi.org/project/requirements-language-server/#files)
[](https://pypi.org/project/requirements-language-server/#files)
[](https://pypi.org/project/requirements-language-server/#files)
Language server for
[requirements.txt](https://pip.pypa.io/en/stable/reference/requirements-file-format).
Currently python's `requirement.txt` has 2 types:
- [PEP508](https://peps.python.org/pep-0508): supported by:
- [setuptools](https://setuptools.pypa.io)
- [pip](https://pip.pypa.io/en/stable/reference/requirements-file-format/#requirements-file-format):
supported by:
- [pip](https://pip.pypa.io)
- [pip-compile](https://github.com/jazzband/pip-tools)
The difference is that
[PEP508 doesn't support pip's options](https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#dynamic-metadata).
For `pyproject.toml`:
```toml
[tool.setuptools.dynamic.dependencies]
file = "requirements.txt"
[tool.setuptools.dynamic.optional-dependencies.dev]
file = "requirements/dev.txt"
```
We recognize `requirements.txt` and `requirements/dev.txt` as PEP508's
`requirements.txt`s and display errors for all pip's options. For other
`requirements.txt`s, we recognize them as pip's `requirements.txt`s.
Features:
- [x] [Goto Definition](https://microsoft.github.io/language-server-protocol/specifications/specification-current#textDocument_definition):
jump to first repeated package
- [x] [Find References](https://microsoft.github.io/language-server-protocol/specifications/specification-current#textDocument_references):
jump to all other repeated packages
- [x] [Diagnostic](https://microsoft.github.io/language-server-protocol/specifications/specification-current#diagnostic):
- [x] repeated packages
- [x] unsorted packages
- [x] invalid path
- [x] pip's option when PEP508 is enabled
- [x] [Document Formatting](https://microsoft.github.io/language-server-protocol/specifications/specification-current#textDocument_formatting):
sort packages
- [x] [Document Link](https://microsoft.github.io/language-server-protocol/specifications/specification-current#textDocument_documentLink):
open package's pypi homepage
- [x] [Hover](https://microsoft.github.io/language-server-protocol/specifications/specification-current#textDocument_hover)
- [x] pip's options
- [x] package
- [x] [Completion](https://microsoft.github.io/language-server-protocol/specifications/specification-current#textDocument_completion):
- [x] pip's options
- [x] package
Other features:
- [x] [pre-commit-hooks](https://pre-commit.com/)
- [x] linter
- [x] formatter
## Screenshots
### Diagnostic

### Hover


### Completion



## How Does It Work
See [here](https://github.com/neomutt/lsp-tree-sitter#usage).
Read
[](https://requirements-language-server.readthedocs.io)
to know more.
## Related Projects
- [requirements.txt.vim](https://github.com/raimon49/requirements.txt.vim):
syntax highlight for vim
- [vim-polyglot](https://github.com/sheerun/vim-polyglot): contains above
- [bat](https://github.com/sharkdp/bat): syntax highlight for less
- [requirements-txt-fixer](https://github.com/pre-commit/pre-commit-hooks#requirements-txt-fixer):
sort package names
- [pip-tools](https://github.com/jazzband/pip-tools): check `requirements.txt`
Raw data
{
"_id": null,
"home_page": "",
"name": "requirements-language-server",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "requirements,language server",
"author": "",
"author_email": "\"Wu, Zhenyu\" <wuzhenyu@ustc.edu>",
"download_url": "https://files.pythonhosted.org/packages/ec/bb/d32792227005c4ec79649cf86db78127d3f06b6be857c8c7b1ce78f0f56a/requirements-language-server-0.0.20.tar.gz",
"platform": null,
"description": "# requirements-language-server\n\n[](https://requirements-language-server.readthedocs.io)\n[](https://results.pre-commit.ci/latest/github/Freed-Wu/requirements-language-server/main)\n[](https://github.com/Freed-Wu/requirements-language-server/actions)\n[](https://codecov.io/gh/Freed-Wu/requirements-language-server)\n[](https://deepsource.io/gh/Freed-Wu/requirements-language-server)\n\n[](https://github.com/Freed-Wu/requirements-language-server/releases)\n[](https://github.com/Freed-Wu/requirements-language-server/releases/latest)\n[](https://github.com/Freed-Wu/requirements-language-server/issues)\n[](https://github.com/Freed-Wu/requirements-language-server/issues?q=is%3Aissue+is%3Aclosed)\n[](https://github.com/Freed-Wu/requirements-language-server/pulls)\n[](https://github.com/Freed-Wu/requirements-language-server/pulls?q=is%3Apr+is%3Aclosed)\n[](https://github.com/Freed-Wu/requirements-language-server/discussions)\n[](https://github.com/Freed-Wu/requirements-language-server/milestones)\n[](https://github.com/Freed-Wu/requirements-language-server/network/members)\n[](https://github.com/Freed-Wu/requirements-language-server/stargazers)\n[](https://github.com/Freed-Wu/requirements-language-server/watchers)\n[](https://github.com/Freed-Wu/requirements-language-server/graphs/contributors)\n[](https://github.com/Freed-Wu/requirements-language-server/graphs/commit-activity)\n[](https://github.com/Freed-Wu/requirements-language-server/commits)\n[](https://github.com/Freed-Wu/requirements-language-server/releases/latest)\n\n[](https://github.com/Freed-Wu/requirements-language-server/blob/main/LICENSE)\n[](https://github.com/Freed-Wu/requirements-language-server)\n[](https://github.com/Freed-Wu/requirements-language-server)\n[](https://github.com/Freed-Wu/requirements-language-server)\n[](https://github.com/Freed-Wu/requirements-language-server)\n[](https://github.com/Freed-Wu/requirements-language-server)\n[](https://github.com/Freed-Wu/requirements-language-server)\n\n[](https://pypi.org/project/requirements-language-server/#description)\n[](https://pypi.org/project/requirements-language-server/#history)\n[](https://pypi.org/project/requirements-language-server/#files)\n[](https://pypi.org/project/requirements-language-server/#files)\n[](https://pypi.org/project/requirements-language-server/#files)\n[](https://pypi.org/project/requirements-language-server/#files)\n\nLanguage server for\n[requirements.txt](https://pip.pypa.io/en/stable/reference/requirements-file-format).\n\nCurrently python's `requirement.txt` has 2 types:\n\n- [PEP508](https://peps.python.org/pep-0508): supported by:\n - [setuptools](https://setuptools.pypa.io)\n- [pip](https://pip.pypa.io/en/stable/reference/requirements-file-format/#requirements-file-format):\n supported by:\n - [pip](https://pip.pypa.io)\n - [pip-compile](https://github.com/jazzband/pip-tools)\n\nThe difference is that\n[PEP508 doesn't support pip's options](https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#dynamic-metadata).\n\nFor `pyproject.toml`:\n\n```toml\n[tool.setuptools.dynamic.dependencies]\nfile = \"requirements.txt\"\n\n[tool.setuptools.dynamic.optional-dependencies.dev]\nfile = \"requirements/dev.txt\"\n```\n\nWe recognize `requirements.txt` and `requirements/dev.txt` as PEP508's\n`requirements.txt`s and display errors for all pip's options. For other\n`requirements.txt`s, we recognize them as pip's `requirements.txt`s.\n\nFeatures:\n\n- [x] [Goto Definition](https://microsoft.github.io/language-server-protocol/specifications/specification-current#textDocument_definition):\n jump to first repeated package\n- [x] [Find References](https://microsoft.github.io/language-server-protocol/specifications/specification-current#textDocument_references):\n jump to all other repeated packages\n- [x] [Diagnostic](https://microsoft.github.io/language-server-protocol/specifications/specification-current#diagnostic):\n - [x] repeated packages\n - [x] unsorted packages\n - [x] invalid path\n - [x] pip's option when PEP508 is enabled\n- [x] [Document Formatting](https://microsoft.github.io/language-server-protocol/specifications/specification-current#textDocument_formatting):\n sort packages\n- [x] [Document Link](https://microsoft.github.io/language-server-protocol/specifications/specification-current#textDocument_documentLink):\n open package's pypi homepage\n- [x] [Hover](https://microsoft.github.io/language-server-protocol/specifications/specification-current#textDocument_hover)\n - [x] pip's options\n - [x] package\n- [x] [Completion](https://microsoft.github.io/language-server-protocol/specifications/specification-current#textDocument_completion):\n - [x] pip's options\n - [x] package\n\nOther features:\n\n- [x] [pre-commit-hooks](https://pre-commit.com/)\n - [x] linter\n - [x] formatter\n\n## Screenshots\n\n### Diagnostic\n\n\n\n### Hover\n\n\n\n\n\n### Completion\n\n\n\n\n\n\n\n## How Does It Work\n\nSee [here](https://github.com/neomutt/lsp-tree-sitter#usage).\n\nRead\n[](https://requirements-language-server.readthedocs.io)\nto know more.\n\n## Related Projects\n\n- [requirements.txt.vim](https://github.com/raimon49/requirements.txt.vim):\n syntax highlight for vim\n- [vim-polyglot](https://github.com/sheerun/vim-polyglot): contains above\n- [bat](https://github.com/sharkdp/bat): syntax highlight for less\n- [requirements-txt-fixer](https://github.com/pre-commit/pre-commit-hooks#requirements-txt-fixer):\n sort package names\n- [pip-tools](https://github.com/jazzband/pip-tools): check `requirements.txt`\n",
"bugtrack_url": null,
"license": "GPL v3",
"summary": "requirements.txt language server",
"version": "0.0.20",
"project_urls": {
"Bug Report": "https://github.com/Freed-Wu/requirements-language-server/issues",
"Download": "https://github.com/Freed-Wu/requirements-language-server/releases",
"Homepage": "https://requirements-language-server.readthedocs.io",
"Source": "https://github.com/Freed-Wu/requirements-language-server"
},
"split_keywords": [
"requirements",
"language server"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "67cf695323125fd1269ac31881a6172b008b542532ac258fe27ab23f68fd9993",
"md5": "98f08eba5b2e653867f1974cbaffbea6",
"sha256": "01f1d36b2cf722215b04c66172d2a32e243a8f1374ce4003781fbe502bf39ada"
},
"downloads": -1,
"filename": "requirements_language_server-0.0.20-py3-none-any.whl",
"has_sig": false,
"md5_digest": "98f08eba5b2e653867f1974cbaffbea6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 31260,
"upload_time": "2024-03-14T08:53:00",
"upload_time_iso_8601": "2024-03-14T08:53:00.987542Z",
"url": "https://files.pythonhosted.org/packages/67/cf/695323125fd1269ac31881a6172b008b542532ac258fe27ab23f68fd9993/requirements_language_server-0.0.20-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ecbbd32792227005c4ec79649cf86db78127d3f06b6be857c8c7b1ce78f0f56a",
"md5": "8d8b22911927fe35a105b448f727da7f",
"sha256": "536283cfe4bec905b95c19552bdca6ddb644d76df0ecdff597159e423f2844fc"
},
"downloads": -1,
"filename": "requirements-language-server-0.0.20.tar.gz",
"has_sig": false,
"md5_digest": "8d8b22911927fe35a105b448f727da7f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 36441,
"upload_time": "2024-03-14T08:53:03",
"upload_time_iso_8601": "2024-03-14T08:53:03.944116Z",
"url": "https://files.pythonhosted.org/packages/ec/bb/d32792227005c4ec79649cf86db78127d3f06b6be857c8c7b1ce78f0f56a/requirements-language-server-0.0.20.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-14 08:53:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Freed-Wu",
"github_project": "requirements-language-server",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "requirements-language-server"
}