Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cbush/spigot
Sphinx ref support extension for VS Code
https://github.com/cbush/spigot
Last synced: 8 days ago
JSON representation
Sphinx ref support extension for VS Code
- Host: GitHub
- URL: https://github.com/cbush/spigot
- Owner: cbush
- License: mit
- Created: 2020-09-09T01:40:34.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-15T18:29:23.000Z (almost 4 years ago)
- Last Synced: 2024-10-02T12:41:16.397Z (4 months ago)
- Language: TypeScript
- Size: 288 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spigot
This VSCode extension adds support for Sphinx :ref: roles:
- autocomplete refs
- error reporting: duplicate targets and unknown targets
- find references
- go to declarationThis extension is based on https://code.visualstudio.com/api/language-extensions/language-server-extension-guide
## Structure
```
.
├── client // Language Client
│ ├── src
│ │ └── extension.ts // Language Client entry point
├── package.json // The extension manifest.
└── server // Language Server
└── src
└── server.ts // Language Server entry point
└── .... // additional implementation files
└── test // Test directory
```## Implementation
- As we only care about refs, syntax is parsed using regex... for now. Performance is a secondary goal to getting this working.
- A Project represents the open workspace and its entities.
- An Entity is a target declaration (`.. _some-ref:`) or a reference to a target (:ref:`some-ref`)
- The Entities class manages entities in a workspace.## Running the Server
- `npm install`
- Open VSCode on this folder (`code .`)
- Press F5 to compile and debug.
- If you want to debug the server as well use the launch configuration `Client + Server`
- In the [Extension Development Host] instance of VSCode, open a Sphinx project.## Running tests
- `npm run test`
## Running test coverage
- `npm run coverage`