A language server for zc.buildout
Project description
A Language Server for zc.buildout.
This language server is implemented using pygls.
Installation
Standalone
Needs a python >= 3.7.
python -m pip install zc.buildout.languageserver
Then configure your editor to run buildoutls
( or python3 -m buildoutls
).
From vscode extension
On activation, the extension automatically installs the extension on the python configured in the extension preferences.
The automatic installation does not seem to work with theia and the python egg has to be installed beforehand.
Features
Completions
${
complete sections.${section:
completesection
's options. Ifsection
uses a known recipe, dynamic options from the recipe are also completed.${buildout:extends}
completes filenames.${buildout:parts}
and<=
option completes parts.
Diagnostics
- non existant section and options in
${section:option}
references. - required options not defined for a a few "known recipes".
- python package listed in
[versions]
with known vulnerabilities
Symbols
- Sections and options are shown are displayed in outline as symbols.
Links
${buildout:extends}
are links.
Go to definitions
- from
${section:options}
we can go to the location whereoption
is defined insection
, or tosection
header if it's not defined. - from
<= section
we can go tosection
. - from
${buildout:extends}
we can go to the extended profile.
Hover
- Hover on an option show the option value.
Find references
- Find references of the current symbol. A bit simple, it only look for references and does not check if profiles really
extends
each other. It does not look in templates either.
Code actions
- update a python package from
[versions]
to its latest version on pypi - compute the
md5sum
of an url
Template support
- "current" buildout profile is guessed, then completions and diagnostics should work on any files.
Jinja2 support
- Jinja syntax is syntax highlighted and jinja syntax markers are ignored when parsing buildout.
SlapOS support
- SlapOS instance buildout (ie. buildout generated by buildout) is understood,
${
and$${
are treated separatly for completions and diagnostics.
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
0.7.1 - 2022-05-08
Added:
- recipe: support defining deprecated options
- recipe: support
slapos.recipe.template
version 0.5
Fixed:
- recipe: fix some markdown syntax in recipe docs
0.7.0 - 2022-04-03
Added:
- code actions: report progress when updating md5sum
- expose commands to start & stop profiling.
Fixed:
- significantly improve performance by implementing .copy() method and using an intermediate cache.
- fix crash when completing option made only of space
- fix crash when completing after ${}
0.6.2 - 2022-01-06
Fixed:
- fix a packaging mistake with the vscode extension
0.6.1 - 2022-01-04
Fixed:
- fix problems with automatic publishing of packages
0.6.0 - 2022-01-04
Added:
- diagnostic: report versions with known vulnerabilities
- code action: update a python package listed in
versions
to latest version - code action: view a python package page on pypi
- code action: compute md5sum of an url
Removed
- support for python 3.6, minimal supported version is now 3.7
Fixed:
- completions: don't offer completions in comments
fix performance issues by cancelling pending tasksactually the fix was wrong
0.5.0 - 2021-03-28
Added:
- diagnostic: warn when options are redefining the current value
- completions: complete existing options of current sections
- diagnostic: support recipes with arbitrary options (like slapos.recipe.build)
- diagnostic: report error when existing non existant profiles
Fixed:
- stop emitting false positives diagnostics with multi line jinja
- stop emitting false positives diagnostics for missing sections/options when extending dynamic profile
- fixed "add line comment" action
0.4.0 - 2020-10-08
Fixed:
- don't skip lines containing jinja expressions. This was causing some missing options when jinja was used in option
- diagnostic: tolerate unknown part when extends jinja
0.3.0 - 2020-02-23
Added:
- support http URLs in
${buildout:extends}
0.2.1 - 2020-04-25
Fixed
- references: consider listing a section in
${buildout:parts}
as a reference. - completions: use
textEdit
to properly overwrite exiting text. - all: debounce protocol functions to accept cancellations.
- all: fix errors when opening profiles outside of workspace.
0.2.0 - 2020-02-12
Added:
- support running with buildout < 2.9.3
- initial support of
instance.cfg
defined usingslapos.recipe.template:jinja2
Fixed
- fixed broken v0.1.1 release, it could not be installed from pypi.
- diagnostics: prevent "missing required options" false positive on sections used only as macros.
- diagnostic: Correctly analyze sections with
.
or-
in their names - diagnostic: Fix false positives on
${buildout:parts}
with extended sections - diagnostic: Fix false positives on
${buildout:parts}
when dynamically adding parts with jinja.
0.1.1 - 2020-01-30
Added
- definitions: paths from
${buildout:extends}
can also be opened with jump to definition. - completions: fix insertText with
-
. - diagnostics: detect missing non existant sections listed in
${buildout:parts}
. - diagnostics: detect sections without recipe listed in
${buildout:parts}
.
0.1.0 - 2020-01-04
- Initial Version
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file zc.buildout.languageserver-0.7.1.tar.gz
.
File metadata
- Download URL: zc.buildout.languageserver-0.7.1.tar.gz
- Upload date:
- Size: 40.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95d96f2fb86755c088ddf437553fb7792e324c811651760b01a95cd0e545097a |
|
MD5 | 62b4d2571e4a62563dd074eba6cc4263 |
|
BLAKE2b-256 | 19e8f2df5e4431b55a2812f80c3104d0bbec6a0ab2c7a333b8fff62095e213a6 |
File details
Details for the file zc.buildout.languageserver-0.7.1-py3-none-any.whl
.
File metadata
- Download URL: zc.buildout.languageserver-0.7.1-py3-none-any.whl
- Upload date:
- Size: 41.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 144bbc82d128297e6264882ee230201544ad697b3f4d9e0b184b895a02f7c3ad |
|
MD5 | ee141f062f6177d109b37be8644008e6 |
|
BLAKE2b-256 | dda05d9cbb5105c847c2493d6940f78536efd3f02987b6e874e3a9b4f01aa86b |