Skip to content

Commit

Permalink
Add vscode extension for Django Template LSP python package.
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenhesselink committed Jun 6, 2024
1 parent af31735 commit 1af4d5b
Show file tree
Hide file tree
Showing 13 changed files with 4,986 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vscode/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/**
client/node_modules/**
client/out/**
server/node_modules/**
server/out/**
20 changes: 20 additions & 0 deletions vscode/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**@type {import('eslint').Linter.Config} */
// eslint-disable-next-line no-undef
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'semi': [2, "always"],
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-non-null-assertion': 0,
}
};
5 changes: 5 additions & 0 deletions vscode/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
out
node_modules
client/server
.vscode-test
djlsp.vsix
15 changes: 15 additions & 0 deletions vscode/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.vscode/**
**/*.ts
**/*.map
.gitignore
**/tsconfig.json
**/tsconfig.base.json
contributing.md
.travis.yml
client/node_modules/**
!client/node_modules/vscode-jsonrpc/**
!client/node_modules/vscode-languageclient/**
!client/node_modules/vscode-languageserver-protocol/**
!client/node_modules/vscode-languageserver-types/**
!client/node_modules/{minimatch,brace-expansion,concat-map,balanced-match}/**
!client/node_modules/{semver,lru-cache,yallist}/**
21 changes: 21 additions & 0 deletions vscode/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024-present

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 23 additions & 0 deletions vscode/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Django Template LSP vscode extension

This extension provides Django Template Language completions for Visual Studio Code.

## Usage

Make sure you have installed the python `django-template-lsp` package on your system. You can install it using pipx:

```bash
pipx install django-template-lsp
```

Then, install this extension from the Visual Studio Code marketplace.


## Settings

Within the `settings.json` file, you can configure the following settings:
- `djangoTemplateLsp.dockerComposeFile`: Docker Compose file name. Default: `docker-compose.yml`
- `djangoTemplateLsp.dockerServiceName`: Docker service name. Default: `django`
- `djangoTemplateLsp.djangoSettingsModule`: Django settings module. Default: ``
- `djangoTemplateLsp.enableLogging`: Enable logging. Default: `false`

Loading

0 comments on commit 1af4d5b

Please sign in to comment.