Skip to content

Commit

Permalink
Merge pull request #67 from CodinGame/feat-add-django-extension
Browse files Browse the repository at this point in the history
[FEAT] Add Django extension
  • Loading branch information
samuel-olivier authored Oct 20, 2022
2 parents b2a83c0 + 05f6ee9 commit 451b1bb
Show file tree
Hide file tree
Showing 43 changed files with 2,673 additions and 233 deletions.
173 changes: 133 additions & 40 deletions src/languages/extensions/configurations/cpptools.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/languages/extensions/configurations/d.json
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,14 @@
"enum": [
"allman",
"otbs",
"stroustrup"
"stroustrup",
"knr"
],
"enumDescriptions": [
"Curly braces always on separate lines",
"Curly braces on the same line as for example if or while statements. Else on same line as closing curly brace.",
"Curly braces on the same line as for example if or while statements, but a new line after the closing curly brace, even if there is an else"
"Curly braces on the same line as for example if or while statements, but a new line after the closing curly brace, even if there is an else",
"Curly braces on the same line for everything except functions"
],
"default": "allman",
"description": "See Wikipedia https://en.wikipedia.org/wiki/Brace_style"
Expand Down
6 changes: 0 additions & 6 deletions src/languages/extensions/configurations/dart.json
Original file line number Diff line number Diff line change
Expand Up @@ -487,12 +487,6 @@
"markdownDescription": "Whether to automatically send a Hot Reload request to Dart apps during a debug session when saving files. Flutter apps are controlled by the flutterHotReloadOnSave setting.",
"scope": 3
},
"dart.flutterHotRestartOnSave": {
"type": "boolean",
"default": true,
"description": "Whether to automatically send a Hot Restart request during a debug session when saving files if Hot Reload is not available but Hot Restart is.",
"scope": 3
},
"dart.flutterGenerateLocalizationsOnSave": {
"enum": [
"never",
Expand Down
41 changes: 32 additions & 9 deletions src/languages/extensions/configurations/java.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"string",
"null"
],
"default": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -Xlog:jni+resolve=off",
"description": "Specifies extra VM arguments used to launch the Java Language Server. Eg. use `-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -Xlog:jni+resolve=off` to optimize memory usage with the parallel garbage collector",
"default": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -Xlog:disable",
"description": "Specifies extra VM arguments used to launch the Java Language Server. Eg. use `-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -Xlog:disable` to optimize memory usage with the parallel garbage collector",
"scope": 6
},
"java.errors.incompleteClasspath.severity": {
Expand Down Expand Up @@ -168,7 +168,7 @@
},
"java.signatureHelp.enabled": {
"type": "boolean",
"default": false,
"default": true,
"description": "Enable/disable the signature help.",
"scope": 3
},
Expand Down Expand Up @@ -329,7 +329,7 @@
},
"java.completion.guessMethodArguments": {
"type": "boolean",
"default": false,
"default": true,
"description": "When set to true, method arguments are guessed when a method is selected from as list of code assist proposals.",
"scope": 3
},
Expand Down Expand Up @@ -364,12 +364,14 @@
},
"java.completion.importOrder": {
"type": "array",
"description": "Defines the sorting order of import statements. A package or type name prefix (e.g. 'org.eclipse') is a valid entry. An import is always added to the most specific group.",
"description": "Defines the sorting order of import statements. A package or type name prefix (e.g. 'org.eclipse') is a valid entry. An import is always added to the most specific group. As a result, the empty string (e.g. '') can be used to group all other imports. Static imports are prefixed with a '#'",
"default": [
"#",
"java",
"javax",
"org",
"com"
"com",
""
],
"scope": 3
},
Expand Down Expand Up @@ -544,7 +546,8 @@
"JavaSE-15",
"JavaSE-16",
"JavaSE-17",
"JavaSE-18"
"JavaSE-18",
"JavaSE-19"
],
"description": "Java Execution Environment name. Must be unique."
},
Expand Down Expand Up @@ -648,9 +651,9 @@
"type": "array",
"default": [
"node_modules",
".git"
"\\.git"
],
"description": "Excludes files and folders from being refreshed by the Java Language Server, which can improve the overall performance. For example, [\"node_modules\",\".git\"] will exclude all files and folders named 'node_modules' or '.git'. Defaults to [\"node_modules\",\".git\"].",
"description": "Excludes files and folders from being refreshed by the Java Language Server, which can improve the overall performance. For example, [\"node_modules\",\"\\.git\"] will exclude all files and folders named 'node_modules' or '.git'. Pattern expressions must be compatible with `java.util.regex.Pattern`. Defaults to [\"node_modules\",\"\\.git\"].",
"scope": 3
},
"java.templates.fileHeader": {
Expand Down Expand Up @@ -773,6 +776,26 @@
"default": true,
"description": "Reordering of fields, enum constants, and initializers can result in semantic and runtime changes due to different initialization and persistence order. This setting prevents this from occurring.",
"scope": 3
},
"java.compile.nullAnalysis.nonnull": {
"type": "array",
"default": [
"javax.annotation.Nonnull",
"org.eclipse.jdt.annotation.NonNull",
"org.springframework.lang.NonNull"
],
"markdownDescription": "Specify the Nonnull annotation types to be used for null analysis. If more than one annotation is specified, then the topmost annotation will be used first if it exists in your project dependencies.",
"scope": 3
},
"java.compile.nullAnalysis.nullable": {
"type": "array",
"default": [
"javax.annotation.Nullable",
"org.eclipse.jdt.annotation.Nullable",
"org.springframework.lang.Nullable"
],
"markdownDescription": "Specify the Nullable annotation types to be used for null analysis. If more than one annotation is specified, then the topmost annotation will be used first if it exists in your project dependencies.",
"scope": 3
}
}
}
Expand Down
35 changes: 35 additions & 0 deletions src/languages/extensions/configurations/lua.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"missing-return",
"missing-return-value",
"need-check-nil",
"need-paren",
"newfield-call",
"newline-call",
"no-unknown",
Expand Down Expand Up @@ -2404,6 +2405,16 @@
],
"type": "string"
},
"string.buffer": {
"default": "default",
"description": "%config.runtime.builtin.string.buffer%",
"enum": [
"default",
"enable",
"disable"
],
"type": "string"
},
"table": {
"default": "default",
"description": "%config.runtime.builtin.table%",
Expand Down Expand Up @@ -2659,6 +2670,30 @@
"scope": 4,
"type": "boolean"
},
"Lua.typeFormat.config": {
"additionalProperties": false,
"markdownDescription": "%config.typeFormat.config%",
"properties": {
"auto_complete_end": {
"default": "true",
"description": "%config.typeFormat.config.auto_complete_end%",
"type": "string"
},
"auto_complete_table_sep": {
"default": "true",
"description": "%config.typeFormat.config.auto_complete_table_sep%",
"type": "string"
},
"format_line": {
"default": "true",
"description": "%config.typeFormat.config.format_line%",
"type": "string"
}
},
"scope": 4,
"title": "config",
"type": "object"
},
"Lua.window.progressBar": {
"default": true,
"markdownDescription": "Show progress bar in status bar.",
Expand Down
6 changes: 6 additions & 0 deletions src/languages/extensions/configurations/omnisharp.json
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,12 @@
"description": "Specifies whether the OmniSharp server will be automatically started or not. If false, OmniSharp can be started with the 'Restart OmniSharp' command",
"scope": 3
},
"omnisharp.projectFilesExcludePattern": {
"type": "string",
"default": "**/node_modules/**,**/.git/**,**/bower_components/**",
"description": "The exclude pattern used by OmniSharp to find all project files.",
"scope": 3
},
"omnisharp.projectLoadTimeout": {
"type": "number",
"default": 60,
Expand Down
9 changes: 5 additions & 4 deletions src/languages/extensions/configurations/scalameta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"properties": {
"metals.serverVersion": {
"type": "string",
"default": "0.11.8+38-1832a3cf-SNAPSHOT",
"default": "0.11.9",
"markdownDescription": "The version of the Metals server artifact. Requires reloading the window. \n\n**VS Code extension version is guaranteed to work only with the default version, change if you know what you're doing**",
"scope": 3
},
Expand Down Expand Up @@ -155,6 +155,7 @@
"default": "automatic",
"enum": [
"automatic",
"2.13.9",
"2.13.8",
"2.13.7",
"2.13.6",
Expand All @@ -163,6 +164,7 @@
"2.13.3",
"2.13.2",
"2.13.1",
"2.12.17",
"2.12.16",
"2.12.15",
"2.12.14",
Expand All @@ -173,9 +175,8 @@
"2.12.9",
"2.12.8",
"2.11.12",
"3.2.0-RC3",
"3.2.0-RC2",
"3.2.0-RC1",
"3.2.1-RC2",
"3.2.0",
"3.1.3",
"3.1.2",
"3.1.1",
Expand Down
11 changes: 6 additions & 5 deletions src/languages/extensions/configurations/solidity.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"solidity.compileUsingRemoteVersion": {
"type": "string",
"default": "latest",
"description": "Compile downloading a remote solc binary file, for example: 'latest' or 'v0.4.3+commit.2353da71', use the command 'Solidity: Get solidity releases' to list all versions, or just right click in a solidity file to simply select the version",
"description": "Configuration to download a 'remote' solc (js) version binary file from 'https://binaries.soliditylang.org/', for example: 'latest' will always use the latest version, or a specific version like: 'v0.4.3+commit.2353da71', use the command 'Solidity: Get solidity releases' to list all versions available, or just right click in a solidity file and select either `Solidity: Change global compiler version (Remote)` or `Solidity: Change workspace compiler version (Remote)` to use the wizard to set the correct version or setting for either the current workspace or globally",
"scope": 3
},
"solidity.compilerOptimization": {
Expand All @@ -24,19 +24,19 @@
"solidity.compileUsingLocalVersion": {
"type": "string",
"default": "",
"description": "Compile using a local solc binary file, please include the path of the file if wanted: 'C://v0.4.3+commit.2353da71.js'",
"description": "Compile using a local solc (js) binary file, please include the path of the file if wanted: 'C://v0.4.3+commit.2353da71.js'",
"scope": 3
},
"solidity.defaultCompiler": {
"type": "string",
"description": "Sets the default compiler and compiler configuration to use. Remote will use the configured compiler using the setting 'compileUsingRemoteVersion' downloaded from https://binaries.soliditylang.org/', `localFile` will use the solc file in the location configured in the setting: `compileUsingLocalVersion`, `localNodeModule` will attempt to find the solc file in the node_modules folder / package configured on 'nodemodulespackage' and 'embedded' which will use the solc version packaged with the extension. The default is 'remote' which is configured as 'latest'",
"enum": [
"remote",
"localFile",
"localNodeModule",
"embedded"
],
"default": "remote",
"description": "Sets the default compiler to use",
"scope": 3
},
"solidity.linter": {
Expand All @@ -63,9 +63,10 @@
"default": "prettier",
"enum": [
"none",
"prettier"
"prettier",
"forge"
],
"description": "Enables / disables the solidity formatter (prettier solidity default)",
"description": "Enables / disables the solidity formatter prettier (default) or forge (note it needs to be installed)",
"scope": 3
},
"solidity.soliumRules": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,18 @@
},
"svelte.plugin.svelte.useNewTransformation": {
"type": "boolean",
"default": false,
"default": true,
"title": "Use a new transformation for intellisense",
"description": "Svelte files need to be transformed to something that TypeScript understands for intellisense. Version 2.0 of this transformation can be enabled with this setting. It will be the default, soon.",
"scope": 3
},
"svelte.plugin.svelte.note-new-transformation": {
"type": "boolean",
"default": true,
"title": "Show a note about the new transformation",
"description": "There's a new transformation for improved intellisense which is now turned on by default. This note notifies you about it.",
"scope": 3
},
"svelte.plugin.svelte.diagnostics.enable": {
"type": "boolean",
"default": true,
Expand Down
35 changes: 35 additions & 0 deletions src/languages/extensions/configurations/vscode-django.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[
{
"type": "object",
"title": "Django configuration",
"properties": {
"django.snippets.use": {
"type": "boolean",
"default": true,
"description": "Activates the Python snippets",
"scope": 3
},
"django.snippets.exclude": {
"type": "array",
"default": [
"cms",
"wagtail"
],
"description": "Exclude Python snippets by their file name. Can be 'import', 'postgres'...",
"scope": 3
},
"django.i18n": {
"type": "boolean",
"default": true,
"description": "Activates the i18n features for snippets (eg.: _(\"\"))",
"scope": 3
},
"django.showContributeNotification": {
"type": "boolean",
"default": true,
"description": "Seldom show notifications about this extension",
"scope": 3
}
}
}
]
12 changes: 4 additions & 8 deletions src/languages/extensions/configurations/vscode-python.json
Original file line number Diff line number Diff line change
Expand Up @@ -536,26 +536,22 @@
"scope": 6,
"type": "string"
},
"python.pylanceLspNotebooksEnabled": {
"type": "boolean",
"default": true,
"description": "Determines if Pylance's experimental LSP notebooks support is used or not.",
"scope": 2
},
"python.sortImports.args": {
"default": [],
"description": "Arguments passed in. Each argument is a separate item in the array.",
"items": {
"type": "string"
},
"scope": 4,
"type": "array"
"type": "array",
"deprecationMessage": "This setting will be removed soon. Use `isort.args` instead."
},
"python.sortImports.path": {
"default": "",
"description": "Path to isort script, default using inner version",
"scope": 6,
"type": "string"
"type": "string",
"deprecationMessage": "This setting will be removed soon. Use `isort.path` instead."
},
"python.tensorBoard.logDirectory": {
"default": "",
Expand Down
3 changes: 2 additions & 1 deletion src/languages/extensions/extensionConfigurationLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const loader = {
'solargraph': async () => (await import(/* webpackChunkName: "configuration-registration-solargraph" */ /* webpackMode: "lazy" */ './configurations/solargraph.json')).default,
'solidity': async () => (await import(/* webpackChunkName: "configuration-registration-solidity" */ /* webpackMode: "lazy" */ './configurations/solidity.json')).default,
'vetur': async () => (await import(/* webpackChunkName: "configuration-registration-vetur" */ /* webpackMode: "lazy" */ './configurations/vetur.json')).default,
'svelte.svelte-vscode': async () => (await import(/* webpackChunkName: "configuration-registration-svelte.svelte-vscode" */ /* webpackMode: "lazy" */ './configurations/svelte.svelte-vscode.json')).default
'svelte.svelte-vscode': async () => (await import(/* webpackChunkName: "configuration-registration-svelte.svelte-vscode" */ /* webpackMode: "lazy" */ './configurations/svelte.svelte-vscode.json')).default,
'vscode-django': async () => (await import(/* webpackChunkName: "configuration-registration-vscode-django" */ /* webpackMode: "lazy" */ './configurations/vscode-django.json')).default
} as unknown as Partial<Record<string, () => Promise<IConfigurationNode[]>>>

export default loader
Expand Down
10 changes: 9 additions & 1 deletion src/languages/extensions/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"editor.suggest.insertMode": "replace",
"editor.defaultFormatter": "Dart-Code.dart-code"
"editor.defaultFormatter": "Dart-Code.dart-code",
"editor.inlayHints.enabled": "offUnlessPressed"
},
"files.watcherExclude": {
"**/.dart_tool": true
Expand Down Expand Up @@ -104,6 +105,13 @@
"editor.wordBasedSuggestions": false,
"editor.suggest.insertMode": "replace",
"editor.semanticHighlighting.enabled": true
},
"[django-html]": {
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
}
}
},
"semanticTokenTypes": [
Expand Down
Loading

0 comments on commit 451b1bb

Please sign in to comment.