File tree 4 files changed +36
-3
lines changed
4 files changed +36
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Static project files
2
2
/env /
3
+ /tests /django_test /env /
4
+
5
+ # Test files
6
+ /tests /django_test /django_app /templates /test.html
3
7
4
8
# Python files
5
9
.Python
@@ -15,6 +19,7 @@ pip-selfcheck.json
15
19
16
20
# OS and project files
17
21
* sqlite3
22
+ * djlsp.log
18
23
.DS_Store
19
24
.mypy_cache
20
25
.template-version
@@ -23,7 +28,7 @@ pip-selfcheck.json
23
28
.env
24
29
* .swp
25
30
.idea /
26
- .helix /
31
+ / .helix /
27
32
28
33
# Coverage
29
34
.coverage
Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ clean:
13
13
14
14
$(ENV ) :
15
15
python3 -m venv $(ENV )
16
-
17
- develop : $(ENV )
18
16
$(PYTHON ) -m pip install --upgrade pip setuptools wheel twine
19
17
$(PYTHON ) -m pip install -e .[dev]
20
18
19
+ develop : $(ENV )
20
+
21
21
fix-codestyle :
22
22
$(BIN ) /black $(CODE_LOCATIONS )
23
23
$(BIN ) /isort $(CODE_LOCATIONS )
30
30
test : lint
31
31
$(BIN ) /tox run
32
32
33
+ django-env :
34
+ python3 -m venv tests/django_test/env
35
+ tests/django_test/env/bin/python -m pip install django~=4.2.0
36
+
37
+ helix : $(ENV ) django-env
38
+ touch tests/django_test/django_app/templates/test.html
39
+ . $(ENV ) /bin/activate; hx --working-dir tests/django_test tests/django_test/django_app/templates/test.html
40
+
33
41
install-ci : $(ENV )
34
42
$(PYTHON ) -m pip install --upgrade pip setuptools wheel twine build .
35
43
Original file line number Diff line number Diff line change @@ -119,3 +119,13 @@ require'lspconfig'.djlsp.setup{
119
119
120
120
To use the Django template LSP with VSCode read the following [ readme] ( vscode/README.md )
121
121
122
+ ## Development
123
+
124
+ For local development, using [ Helix] ( https://helix-editor.com ) is the easiest approach.
125
+ The configuration for using the source Django template language server, with logging enabled, is already set up.
126
+
127
+ To start the Helix editor with the environment activated and the correct workspace loaded, run:
128
+
129
+ ``` bash
130
+ make helix
131
+ ```
Original file line number Diff line number Diff line change
1
+ [language-server .djlsp ]
2
+ command = " djlsp"
3
+ args = [" --enable-log" ]
4
+
5
+ [language-server .djlsp .config ]
6
+ django_settings_modules =" django_test.settings"
7
+
8
+ [[language ]]
9
+ name = " html"
10
+ language-servers = [ " djlsp" ]
You can’t perform that action at this time.
0 commit comments