Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"codeQL.githubDatabase.download": "never",
"sarif-viewer.connectToGithubCodeScanning": "off",
"files.readonlyInclude": {
"{**/.c4z/.extsrcs/*.PROTSYM.cbl,**/.c4z/.extsrcs/*.PROTSYM.listing}": true
}
}
5 changes: 4 additions & 1 deletion cddl-lsp/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"typescript.tsc.autoDetect": "off",
"typescript.preferences.quoteStyle": "single",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"files.readonlyInclude": {
"{**/.c4z/.extsrcs/*.PROTSYM.cbl,**/.c4z/.extsrcs/*.PROTSYM.listing}": true
}
}
68 changes: 60 additions & 8 deletions cddl-lsp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,63 @@

Language server implementation and Visual Studio Code Extension for the Concise Data Definition Language (CDDL). This extension supports the following features:

- Syntax highlighting
- Intellisense
- Standard prelude
- Control operators
- Group and type rule identifiers
- Go-to definition
- Basic diagnostics
- Formatting
* **Syntax highlighting**
* **Intellisense**
+ Standard prelude
+ Control operators
+ Group and type rule identifiers
+ Socket/plug completions with deduplication
* **Go-to definition**
* **Find references**
* **Document symbols** (outline view)
* **Workspace symbol search** (search across all CDDL files)
* **Signature help** for generics and control operators
* **Enhanced diagnostics** (configurable)
+ Syntax validation
+ Unused rule detection (with CDDL-aware reference tracking)
+ Style warnings (spacing, trailing commas)
+ Circular dependency detection
* **Code actions & quick fixes**
+ Fix spacing around operators
+ Remove trailing commas
+ Remove unused rules
+ Organize CDDL rules
+ Format document
* **Advanced formatting** (configurable)
+ Multi-line map formatting
+ Proper indentation
+ Range formatting support
+ Can be disabled via settings

## Configuration

This extension contributes the following settings:

* `cddl.maxNumberOfProblems`: Controls the maximum number of problems produced by the server (default: 100)
* `cddl.trace.server`: Traces the communication between VS Code and the language server (default: "off")
* `cddl.formatting.enabled`: Enable/disable CDDL document formatting (default: true)
* `cddl.diagnostics.trailingCommas`: Enable/disable trailing comma warnings (default: true)

### Disabling Formatting

To disable CDDL formatting, add this to your VS Code settings:

```json
{
"cddl.formatting.enabled": false
}
```

When disabled, the "Format Document" command and automatic formatting will not modify CDDL content.

### Disabling Trailing Comma Warnings

To disable trailing comma warnings, add this to your VS Code settings:

```json
{
"cddl.diagnostics.trailingCommas": false
}
```

When disabled, the language server will not show warnings about potentially unnecessary trailing commas.
Loading
Loading