Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Release #774

Merged
merged 89 commits into from
Apr 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
d2fe60c
build(deps): bump actions/cache from 3 to 4
dependabot[bot] Jan 22, 2024
fb04c47
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jan 29, 2024
916f6ed
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 29, 2024
fe3de40
build(deps): bump pygls from 1.2.1 to 1.3.0 in /code
dependabot[bot] Jan 29, 2024
17ae9ee
build(deps-dev): bump @vscode/vsce from 2.22.0 to 2.23.0 in /code
dependabot[bot] Jan 29, 2024
6f36fe1
build(deps-dev): bump esbuild from 0.19.11 to 0.20.0 in /code
dependabot[bot] Feb 2, 2024
e7ac185
build(deps): bump platformdirs from 4.1.0 to 4.2.0 in /code
dependabot[bot] Feb 5, 2024
fa5bc15
esbonio: Move pyright config into `pyproject.toml`
alcarney Feb 10, 2024
46a91bc
lsp: Allow features to register shutdown handlers
alcarney Feb 10, 2024
5244a59
lsp: Implement shutdown for `SphinxManager` and `PreviewManager`
alcarney Feb 10, 2024
57f3078
build(deps): bump semver from 7.5.4 to 7.6.0 in /code
dependabot[bot] Feb 12, 2024
d84eb8f
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Feb 19, 2024
10a80f7
build(deps-dev): bump esbuild from 0.20.0 to 0.20.1 in /code
dependabot[bot] Feb 19, 2024
25af8d7
lsp: Introduce `ConfigChangeEvent`
alcarney Feb 22, 2024
dfb58ca
lsp: Use a more accurate type annotation
alcarney Feb 22, 2024
4410a83
Ignore new errors introduced by black's formatting changes
alcarney Feb 22, 2024
1538963
lsp: Extract event handling to a dedicated component
alcarney Feb 22, 2024
c39902e
build(deps-dev): bump @vscode/vsce from 2.23.0 to 2.24.0 in /code
dependabot[bot] Feb 26, 2024
9ac68b6
build(deps): bump aiosqlite from 0.19.0 to 0.20.0 in /code
dependabot[bot] Feb 26, 2024
d95eccb
lsp: Add `scope_for` method
alcarney Feb 25, 2024
45aff93
lsp: Make `Configuration.subscribe` syncronous
alcarney Feb 25, 2024
96d1b51
lsp: Refactor `SubprocessSphinxClient`
alcarney Feb 25, 2024
fa976be
lsp: Refactor `SphinxManager`
alcarney Feb 25, 2024
f4e0d28
lsp: Delete `MockSphinxClient`
alcarney Feb 25, 2024
6badf21
lsp: Realign test suite
alcarney Feb 26, 2024
d64fc90
lsp: Update changelog
alcarney Feb 27, 2024
ce1690c
lsp: Introduce the `ProjectManager`
alcarney Feb 27, 2024
982326f
lsp: Register projects on client creation
alcarney Feb 27, 2024
1b4d289
lsp: Realign features to use projects
alcarney Feb 27, 2024
9127334
lsp: Remove diagnostic code
alcarney Feb 27, 2024
ce8eab3
lsp: Send sphinx messages through the logging system
alcarney Mar 3, 2024
da0113f
lsp: Overhaul logging configuration
alcarney Mar 3, 2024
eb4586e
code: Align to changes in the server's logging configuration options
alcarney Mar 3, 2024
ce94079
code: Expose `esbonio.trace.server` option
alcarney Mar 3, 2024
16176ad
code: Update changelog
alcarney Mar 3, 2024
ebef91e
lsp: Log python version and platform information
alcarney Mar 3, 2024
031b2d4
lsp: Reimplement initial caching of log messages
alcarney Mar 4, 2024
5626186
docs(lsp): Fix wrong link in README
goyalyashpal Mar 5, 2024
2a9c619
docs(README): Add line breaks before headings
goyalyashpal Mar 5, 2024
bdd8e7c
docs(README): Use reference-style links
goyalyashpal Mar 5, 2024
55c86ea
lsp: Restart Sphinx when the configuration changes
alcarney Mar 5, 2024
82143d0
lsp: Only replay logs applicable to the logger's level
alcarney Mar 5, 2024
6c6871f
code: Notify the server when the Python environment changes
alcarney Mar 5, 2024
b458428
lsp: Stop the previous client in a background task
alcarney Mar 6, 2024
6da6fdc
lsp: Only attempt to parse the `rootUri` when it is set
alcarney Mar 7, 2024
9a127aa
Added issue templates (#737)
lextm Mar 7, 2024
3a8f179
Remove VSCode specific fields
alcarney Mar 7, 2024
b3d8996
Simplify template
alcarney Mar 7, 2024
a839e00
Update bug_report.yml
alcarney Mar 7, 2024
76d755a
build(deps-dev): bump typescript from 5.3.3 to 5.4.2 in /code
dependabot[bot] Mar 11, 2024
180c140
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 11, 2024
c64788c
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Mar 12, 2024
9b83e68
docs: Remove old advanced usage section
alcarney Dec 27, 2023
58b938d
docs: Remove old extending section
alcarney Dec 27, 2023
8583fd8
Add unstable banner (#758)
alcarney Mar 14, 2024
cd9e650
Fix path
alcarney Mar 14, 2024
7e4fbfe
code: Add `esbonio.server.documentSelector` option
alcarney Mar 7, 2024
97ca3fc
lsp: Fix traceback formatting
alcarney Mar 14, 2024
6e8d8f8
lsp: Have the sphinx client, rather than the agent pick the id
alcarney Mar 14, 2024
c885cf6
lsp: Send additional sphinx lifecycle notifications
alcarney Mar 14, 2024
dc53cac
code: Reimplement language status items
alcarney Mar 14, 2024
cb26ed9
docs: Update main page
alcarney Mar 14, 2024
ebafe5b
docs: Placeholder documentation for custom sphinx notifications
alcarney Mar 14, 2024
96fa4ed
lsp: Limit importlib-resources version
alcarney Mar 14, 2024
560f64d
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Mar 18, 2024
469991d
build(deps-dev): bump esbuild from 0.20.1 to 0.20.2 in /code
dependabot[bot] Mar 18, 2024
f289041
build(deps-dev): bump typescript from 5.4.2 to 5.4.3 in /code
dependabot[bot] Mar 25, 2024
4e392c6
build(deps): bump pygls from 1.3.0 to 1.3.1 in /code
dependabot[bot] Apr 1, 2024
0bb6a6a
build(deps-dev): bump typescript from 5.4.3 to 5.4.4 in /code
dependabot[bot] Apr 8, 2024
6604092
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Apr 8, 2024
94a70ca
sphinx-agent: Redirect all output to stderr
alcarney Apr 12, 2024
cb9de07
lsp: Forward stderr from underlying Sphinx processes.
alcarney Apr 12, 2024
318ab35
sphinx-agent: Reset warning count after each build
alcarney Apr 12, 2024
ef31370
sphinx-agent: Ensure test exits cleanly
alcarney Apr 14, 2024
b51e78c
build(deps-dev): bump @vscode/vsce from 2.24.0 to 2.25.0 in /code
dependabot[bot] Apr 15, 2024
6d55768
build(deps-dev): bump typescript from 5.4.4 to 5.4.5 in /code
dependabot[bot] Apr 15, 2024
4fbac72
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Apr 15, 2024
5e22721
vscode: Cleanup obselete settings
alcarney Apr 16, 2024
776cc89
docs: Update sample neovim config
alcarney Apr 16, 2024
bf1a3eb
nix: Bump flake.lock
alcarney Apr 16, 2024
19d4cc1
Update scripts/sphinx-app.py
alcarney Apr 16, 2024
d74a12c
lsp: Have the client show an error if the sphinx process fails
alcarney Apr 16, 2024
8db4fd4
sphinx-agent: Override Sphinx's logging setup... again!
alcarney Apr 16, 2024
377ff8d
lsp: Re-enable and fix diagnostic tests
alcarney Apr 16, 2024
04346e0
lsp: Push sphinx output through the logging system
alcarney Apr 16, 2024
7d77c23
lsp: Manually implement `___hash__` and `__eq__` for Uris
alcarney Apr 17, 2024
65d6b71
sphinx-agent: Use uris internally
alcarney Apr 18, 2024
011073b
lsp: Remove 0.x code
alcarney Apr 18, 2024
3dd9711
workflow: Prep for publishing to Open VSX
alcarney Apr 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Bug Report
description: Report broken or unexpected behavior
labels: [bug, triage]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to report this!
- type: textarea
id: expected
attributes:
label: Expected behavior
description: Tell us what you expected to happen.
placeholder: Tell us what you expected to happen.
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual behavior
description: Tell us what happened instead
placeholder: Tell us what happened instead
validations:
required: true
- type: textarea
id: logs
attributes:
label: Log output
description: |
Copy and paste any relevant log output here (most issues will be difficult to diagnose without this!).
For best results please make sure that debug logging is enabled (`esbonio.logging.level = debug`)
This will be automatically formatted as code, so no need for backticks.
render: shell
- type: textarea
id: conf
attributes:
label: (Optional) Settings from conf.py
description: |
If you think any settings from your project's `conf.py` are applicable, feel free to include them here
This will be automatically formatted as code, so no need for backticks.
render: python
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Feature Request
description: Suggest an idea for this project
labels: [enhancement, triage]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill this out!
- type: textarea
id: solution
attributes:
label: What would you like to see
description: A clear and concise description of what you want to happen.
placeholder: A clear and concise description of what you want to happen.
validations:
required: true
4 changes: 2 additions & 2 deletions .github/workflows/lsp-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
python-version: "3.11"

- name: pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-lsp-pr-pip-deps-3.11
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-lsp-pr-pip-deps-${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sphinx-ext-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
python-version: "3.11"

- name: pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-ext-pr-pip-deps-3.11
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-ext-pr-pip-deps-${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vscode-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
python-version: "3.8"

- name: Pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-vscode-pip-deps-${{ hashFiles('code/requirements.txt') }}
Expand Down
72 changes: 60 additions & 12 deletions .github/workflows/vscode-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ on:
- 'code/**'

jobs:
release:
name: vscode release
build:
runs-on: ubuntu-latest
environment:
name: vscode-marketplace
steps:
- uses: 'actions/checkout@v4'

Expand All @@ -27,7 +24,7 @@ jobs:
python-version: "3.8"

- name: pip cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-vscode-pip-deps-${{ hashFiles('code/requirements.txt') }}
Expand Down Expand Up @@ -63,13 +60,6 @@ jobs:
path: code/*.vsix
if-no-files-found: error

- name: 'Publish Extension'
run: |
cd code
npm run deploy
env:
VSCE_PAT: ${{ secrets.VSCODE_PAT }}

- name: Create Release
run: |
gh release create "${RELEASE_TAG}" \
Expand All @@ -78,3 +68,61 @@ jobs:
./code/*.vsix
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

marketplace-release:
name: vscode release
needs: build
runs-on: ubuntu-latest
environment:
name: vscode-marketplace
steps:
- uses: 'actions/checkout@v4'

- uses: 'actions/setup-node@v4'
with:
node-version: 18.x
cache: 'npm'
cache-dependency-path: 'code/package-lock.json'

- uses: actions/download-artifact@v4
name: 'Download Extension'
with:
name: 'vsix'
path: code

- name: 'Publish Extension'
run: |
cd code
npm ci --prefer-offline
npm run deploy-vsce
env:
VSCE_PAT: ${{ secrets.VSCODE_PAT }}

open-vsx-release:
name: open vsx release
needs: build
runs-on: ubuntu-latest
environment:
name: open-vsx
steps:
- uses: 'actions/checkout@v4'

- uses: 'actions/setup-node@v4'
with:
node-version: 18.x
cache: 'npm'
cache-dependency-path: 'code/package-lock.json'

- uses: actions/download-artifact@v4
name: 'Download Extension'
with:
name: 'vsix'
path: code

- name: 'Publish Extension'
run: |
cd code
npm ci --prefer-offline
npm run deploy-ovsx
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ exclude: '.bumpversion.cfg$'
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.4.0
hooks:
- id: black

Expand All @@ -28,7 +28,7 @@ repos:
args: [--settings-file=lib/esbonio/pyproject.toml]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.8.0'
rev: 'v1.9.0'
hooks:
- id: mypy
name: mypy (scripts)
Expand Down
2 changes: 0 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@
"**/.vscode-test": true,
"**/.mypy_cache": true
},
"esbonio.sphinx.buildDir": "${confDir}/_build",
"esbonio.server.showDeprecationWarnings": true,
"isort.args": [
"--settings-file",
"./lib/esbonio/pyproject.toml"
],
"python.defaultInterpreterPath": "${workspaceRoot}/.env/bin/python",
"python.testing.pytestArgs": [
"lib/esbonio/tests"
],
Expand Down
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@

**esbonio - (v.) to explain**

Esbonio aims to make it easier to work with [reStructuredText](https://docutils.sourceforge.io/rst.html) tools such as [Sphinx](https://www.sphinx-doc.org/en/master/) by providing a [Language Server](https://langserver.org/) to enhance your editing experience.
[reStructuredText]: https://docutils.sourceforge.io/rst.html
[Sphinx]: https://www.sphinx-doc.org/en/master/
[Language Server]: https://langserver.org/

Esbonio aims to make it easier to work with [reStructuredText] tools such as [Sphinx] by providing a [Language Server] to enhance your editing experience.
The Esbonio project is made up from a number of sub-projects


## `lib/esbonio/` - A Language Server for Sphinx projects.

[![PyPI](https://img.shields.io/pypi/v/esbonio?style=flat-square)![PyPI - Downloads](https://img.shields.io/pypi/dm/esbonio?style=flat-square)](https://pypistats.org/packages/esbonio)[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/swyddfa/esbonio/blob/develop/lib/esbonio/LICENSE)

The language server provides the following features.
Expand Down Expand Up @@ -59,6 +66,7 @@ The language server provides the following features.


## `code/` - A VSCode extension for editing Sphinx projects

[![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/swyddfa.esbonio?style=flat-square)![Visual Studio Marketplace Installs](https://img.shields.io/visual-studio-marketplace/i/swyddfa.esbonio?style=flat-square)![Visual Studio Marketplace Downloads](https://img.shields.io/visual-studio-marketplace/d/swyddfa.esbonio?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=swyddfa.esbonio)[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/swyddfa/esbonio/blob/develop/code/LICENSE)

<p align="center">
Expand All @@ -69,8 +77,13 @@ This extension is purely focused on bringing the `esbonio` language server into

### You're probably looking for the reStructuredText Extension

You may already be familiar with the [reStructuredText](https://marketplace.visualstudio.com/items?itemName=lextudio.restructuredtext) extension which, as of [v171.0.0](https://github.com/vscode-restructuredtext/vscode-restructuredtext/releases/tag/171.0.0) now also integrates the `esbonio` language server into VSCode.
It also integrates other tools such as the linters [`doc8`](https://pypi.org/project/doc8/) and [`rstcheck`](https://pypi.org/project/rstcheck/) and provides additional editor functionality making it easier to work with reStructuredText in general.
[reStructuredText extension]: https://marketplace.visualstudio.com/items?itemName=lextudio.restructuredtext
[v171.0.0]: https://github.com/vscode-restructuredtext/vscode-restructuredtext/releases/tag/171.0.0
[`doc8`]: https://pypi.org/project/doc8/
[`rstcheck`]: https://pypi.org/project/rstcheck/

You may already be familiar with the [reStructuredText extension] which, as of [v171.0.0] now also integrates the `esbonio` language server into VSCode.
It also integrates other tools such as the linters [`doc8`] and [`rstcheck`] and provides additional editor functionality making it easier to work with reStructuredText in general.

**Wait.. so why does the Esbonio VSCode extension still exist?**

Expand All @@ -90,5 +103,7 @@ Try the Esbonio extension if
- You want to make use of the newer features available in recent VSCode versions
- You are only interested in the features provided by the language server


## `lib/esbonio-extensions/` - A collection of Sphinx extensions

[![PyPI](https://img.shields.io/pypi/v/esbonio-extensions?style=flat-square)![PyPI - Downloads](https://img.shields.io/pypi/dm/esbonio-extensions?style=flat-square)](https://pypistats.org/packages/esbonio-extensions)[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/swyddfa/esbonio/blob/develop/lib/esbonio-extensions/LICENSE)
1 change: 1 addition & 0 deletions code/changes/703.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The extension will now notify the server when the user changes Python environment via the Python extension
2 changes: 2 additions & 0 deletions code/changes/748.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Removed the `esbonio.server.logLevel` option, use `esbonio.logging.level` instead.
- Removed the `esbonio.server.logFilter` option, it has been made obselete by the other `esbonio.logging.*` options
9 changes: 9 additions & 0 deletions code/changes/748.enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Added the following configuration options

- `esbonio:config:: esbonio.logging.level`, set the default logging level of the server
- `esbonio:config:: esbonio.logging.format`, set the default format of server log messages
- `esbonio:config:: esbonio.logging.filepath`, enable logging to a file
- `esbonio:config:: esbonio.logging.stderr`, print log messages to stderr
- `esbonio:config:: esbonio.logging.window`, send log messages as `window/logMessage` notifications
- `esbonio:config:: esbonio.logging.config`, override logging configuration for individual loggers, see the [documentation](https://docs.esbon.io/en/latest/lsp/reference/configuration.html#lsp-configuration-logging) for details
- `esbonio.trace.server` enables the logging of LSP messages sent to/from the server
1 change: 1 addition & 0 deletions code/changes/756.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The `esbonio.server.enabledInPyFiles` configuration option has been removed, use `esbonio.server.documentSelector` instead
1 change: 1 addition & 0 deletions code/changes/756.enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added the `esbonio.server.documentSelector` option, granting the user fine grained control over which files the server is enabled in.
Loading
Loading