Skip to content

Commit cbd2c77

Browse files
add documentation for VS Code extension (#327)
1 parent f656729 commit cbd2c77

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/
2121
### Added
2222

2323
- Added `pythonpath` configuration option for specifying additional Python import paths
24+
- Added documentation for VS Code extension
2425
- Added documentation for Zed extension
2526
- Added documentation for setting up Sublime Text
2627

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ The Django Language Server works with any editor that supports the Language Serv
107107

108108
- [Neovim](clients/nvim/README.md)
109109
- [Sublime Text](docs/clients/sublime-text.md)
110+
- [VS Code](docs/clients/vscode.md)
110111
- [Zed](docs/clients/zed.md)
111112

112113
Got it working in your editor? [Help us add setup instructions!](#testing-and-documenting-editor-setup)

docs/clients/vscode.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: VS Code
3+
---
4+
5+
# VS Code
6+
7+
Django Language Server can be used with [VS Code](https://code.visualstudio.com) via the [djls-vscode](https://github.com/joshuadavidthomas/djls-vscode) extension.
8+
9+
## Installation
10+
11+
Install the extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=djls.django-language-server):
12+
13+
1. Open the Extensions panel (`Ctrl+Shift+X` / `Cmd+Shift+X`)
14+
2. Search for "Django Language Server"
15+
3. Click "Install"
16+
17+
The extension requires Django Language Server (`djls`) to be installed on your system. See [Installation](../index.md#installation) for setup instructions.
18+
19+
## Documentation
20+
21+
For configuration, file associations, troubleshooting, and advanced usage, see the [djls-vscode repository](https://github.com/joshuadavidthomas/djls-vscode).

docs/hooks.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ def replace_link(match):
5151
if "clients/nvim/README.md" in path:
5252
return f"[{text}](clients/neovim.md)"
5353

54+
if path.startswith(("../", "./")) and (path.endswith(".md") or ".md#" in path):
55+
return match.group(0)
56+
5457
clean_path = path.replace("../", "").replace("./", "").lstrip("/")
5558
return f"[{text}]({repo_url.rstrip('/')}/blob/main/{clean_path})"
5659

0 commit comments

Comments
 (0)