Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/collective/collective.recipe.vscode
Buildout Recipe for Visual Studio Code
https://github.com/collective/collective.recipe.vscode
buildout buildout-recipe plone python vscode vscode-settings zope
Last synced: about 2 months ago
JSON representation
Buildout Recipe for Visual Studio Code
- Host: GitHub
- URL: https://github.com/collective/collective.recipe.vscode
- Owner: collective
- Created: 2019-02-04T19:09:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-30T20:45:21.000Z (over 1 year ago)
- Last Synced: 2024-09-14T09:58:02.281Z (4 months ago)
- Topics: buildout, buildout-recipe, plone, python, vscode, vscode-settings, zope
- Language: Python
- Size: 104 KB
- Stars: 8
- Watchers: 3
- Forks: 7
- Open Issues: 9
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
Awesome Lists containing this project
README
.. image:: https://img.shields.io/pypi/status/collective.recipe.vscode.svg
:target: https://pypi.org/project/collective.recipe.vscode/
:alt: Package Status.. image:: https://app.travis-ci.com/nazrulworld/collective.recipe.vscode.svg?branch=master
:target: https://app.travis-ci.com/nazrulworld/collective.recipe.vscode
:alt: Travis Build Status.. image:: https://coveralls.io/repos/github/nazrulworld/collective.recipe.vscode/badge.svg?branch=master
:target: https://coveralls.io/github/nazrulworld/collective.recipe.vscode?branch=master
:alt: Test Coverage
.. image:: https://img.shields.io/pypi/pyversions/collective.recipe.vscode.svg
:target: https://pypi.org/project/collective.recipe.vscode/
:alt: Python Versions.. image:: https://img.shields.io/pypi/v/collective.recipe.vscode.svg
:target: https://pypi.org/project/collective.recipe.vscode/
:alt: Latest Version.. image:: https://img.shields.io/pypi/l/collective.recipe.vscode.svg
:target: https://pypi.org/project/collective.recipe.vscode/
:alt: License.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/ambv/black.. contents::
Introduction
============``collective.recipe.vscode`` is the buildout recipe for `Visual Studio Code`_ lover who wants python `autocomplete and intelliSense`_ features while developing python `Buildout`_ based project,
normally buildout eggs are not available in python path even if you provide virtualenv python path.
This tool will help not only adding eggs path as ``python extraPath`` but also you can manage per project basis vscode settings
for linter, autoformatting.A general question may arise that why we will use this tool, whether we can create `Visual Studio Code`_ project settings easily (we have better knowledge over `Visual Studio Code`_ configuration)?
Well i completely agree with you, but if you want to get benefited from `Visual Studio Code`_ autocompletion feature (basically I am lover of autocompletion), you have to add all eggs links and it is hard to manage eggs links manually
if the size of project is big (think about any `Plone`_ powered project),
beside it is good practice allways use project specific linter path. For example my global ``flake8`` linter doesn't work
for my python3 project!Installation
============Install ``collective.recipe.vscode`` is simple enough, just need to create a section for ``vscode`` to your buildout.
Before using ``collective.recipe.vscode``, if you are going to use linter feature, make those are added in eggs section or globally installed.Example Buildout::
[buildout]
parts += vscode[vscode]
recipe = collective.recipe.vscode
flake8-enabled = True
flake8-path = ${buildout:directory}/bin/flake8
black-enabled = True
black-args = ----line-length 88You can also use the following to include the vscode recipe in all your buildouts automatically
Modify/Add ``~/.buildout/default.cfg``::
[buildout]
_to_always_include_vscode = ${vscode:recipe}[vscode]
recipe = collective.recipe.vscode
_to_remove_buildout_warning = ${buildout:_to_always_include_vscode}Available Options
-----------------eggs
Required: NoDefault: Will find all recipes with eggs specified and include them.
Your project's list of eggs, those are going to be added as extra path for `autocomplete and intelliSense`_.
python-path
Required: NoDefault: ``collective.recipe.vscode`` will find current python executable path.
The python executable path for current project, if you are using virtual environment then should be that python path. FYI: ${home} and ${project} variable should work.
flake8-enabled
Required: No
Default: False
Flag that indicates flake8 based linting.
flake8-path
Required: NoDefault: try to find flake8 executable path automatically.
flake8-args
Required: NoDefault: ""
pylint-enabled
Required: No
Default: Falsepylint-path
Required: NoDefault: try to find pylint executable path automatically.
pylint-args
Required: NoDefault:
pep8-enabled
Required: NoDefault: False
pep8-path
Required: NoDefault: try to find pep8 executable path automatically.
pep8-args
Required: NoDefault: ""
jedi-enabled
Required: NoDefault: False
If False then ``python.languageServer`` will be ``Pylance``. Ensure you have installed the Pylance vscode extension.
omelette-location
Required: NoDefault: ${buildout:directory}/parts/omelette - the default omelette location.
autocomplete-use-omelette
Required: NoDefault: False
black-enabled
Required: NoDefault: False
black-path
Required: NoDefault: try to find black executable path automatically.
You could provide buildout specific black executable. It is very flexible way to avoid using global pylint.
Example of relative path usecase:
i.) `${buildout:directory}/bin/black`
ii.) `$project_path/bin/black`
iii.) `./bin/black`
iv.) `~/path/bin/black`black-args
Required: NoDefault: ''
isort-enabled
Required: NoDefault: False
Flag that indicates isort is enabled.
isort-path
Required: NoDefault: try to find isort executable path automatically.
isort-args
Required: NoDefault: ''
ignore-develop
Required: NoDefault: False
If you don't want development eggs, should go for autocompletion.
ignores
Required: NoDefault: ""
If you want specific eggs should not go for autocompletion.
packages
Required: NoDefault: ""
Location of some python scripts or non standard modules (don't have setup file), you want to be in system path.
generate-envfile
Required: NoDefault: True
Generate .env file to add eggs to PYTHONPATH
robot-enabled
Required: NoDefault: False
Generate setting `robot.python.env` with buildout eggs for Robot Framework Language Server.
Generate task **Start Plone Test Server** into `tasks.json`.
Generate task **Robot Framework: Launch Template** into `launch.json` for Robot Framework Language Server.Links
=====Code repository:
https://github.com/nazrulworld/collective.recipe.vscode
Continuous Integration:
https://travis-ci.org/nazrulworld/collective.recipe.vscode
Issue Tracker:
https://github.com/nazrulworld/collective.recipe.vscode/issues
.. _`Visual Studio Code`: https://code.visualstudio.com/
.. _`Buildout`: http://www.buildout.org/en/latest/
.. _`Plone`: https://plone.org/
.. _`Flake8`: https://pypi.python.org/pypi/flake8
.. _`Python`: https://www.python.org/
.. _`autocomplete and intelliSense`: https://code.visualstudio.com/docs/languages/python#_autocomplete-and-intellisense