Skip to content

Commit 6b9e7cb

Browse files
committed
Create lsp server
1 parent 572eb9d commit 6b9e7cb

File tree

373 files changed

+136033
-27
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

373 files changed

+136033
-27
lines changed

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Changelog
2+
3+
All notable changes to the AWS CloudFormation Language Server will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.0.1]
9+
10+
### Added
11+
- **Language Server Protocol**: Full LSP implementation for CloudFormation templates with comprehensive language features
12+
- **Intelligent Completion System**:
13+
- Advanced completion engine with fuzzy matching using Fuse.js
14+
- Resource type and property completion
15+
- Intrinsic function completion with parameter suggestions
16+
- Parameter type and value completion
17+
- Condition and mapping completion
18+
- Top-level section completion
19+
- **Hover Documentation**:
20+
- Contextual help for CloudFormation resources, properties, and intrinsic functions
21+
- Parameter documentation with type information
22+
- Condition and mapping hover support
23+
- Template section documentation
24+
- Pseudo-parameter reference information
25+
- **Document Processing**:
26+
- Tree-sitter parsing for YAML and JSON CloudFormation templates
27+
- Partial JSON parsing for incomplete documents
28+
- CloudFormation template detection and validation
29+
- Document symbol extraction and indexing
30+
- Multi-format support (JSON/YAML)
31+
- **Schema Validation**:
32+
- CloudFormation resource schema validation and enforcement
33+
- Regional schema support with automatic retrieval
34+
- Private and combined schema handling
35+
- Remote schema caching and management
36+
- **AWS Service Integration**:
37+
- CloudFormation API integration for stack operations
38+
- IAM service integration for permission validation
39+
- **Diagnostics and Validation**:
40+
- Real-time syntax and semantic validation
41+
- cfn-lint integration with Pyodide worker for Python-based linting
42+
- Comprehensive error detection and reporting
43+
- Code action suggestions for common issues
44+
- **Navigation Features**:
45+
- Go-to-definition functionality for CloudFormation references
46+
- Document symbol support for template navigation
47+
- Context-aware entity resolution

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
## Code of Conduct
22
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
33
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
4-
opensource-codeofconduct@amazon.com with any additional questions or comments.
4+
opensource-codeofconduct@amazon.com with any additional questions or comments.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ If you discover a potential security issue in this project we ask that you notif
5656

5757
## Licensing
5858

59-
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
59+
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ A LSP server implementation that provides intelligent editing support for CloudF
4242

4343
## License
4444

45-
Licensed under the Apache License, Version 2.0. See [LICENSE.txt](LICENSE.txt) for details.
45+
Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.

cfn-init/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Go build artifacts
2+
*.out
3+
*.test
4+
5+
# IDE files
6+
.vscode/
7+
.idea/
8+
9+
# OS files
10+
.DS_Store

cfn-init/ATTRIBUTION_README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Go Attribution Guide
2+
3+
### 0. Install license tools (Only required once)
4+
5+
```bash
6+
go install github.com/google/go-licenses/v2@latest
7+
```
8+
9+
**Note**: Ensure `$GOPATH/bin` is in your PATH:
10+
```bash
11+
export PATH=$PATH:$(go env GOPATH)/bin
12+
```
13+
14+
### 1. Regenerate dependencies first
15+
16+
```bash
17+
go mod tidy
18+
go mod download
19+
```
20+
21+
### 2. Generate Cross-Platform Attribution (Automated)
22+
23+
Use the automated script to generate both files for all Go-supported platforms (go-licenses needs to be ran for each platform because sometimes indirect dependencies change per platform):
24+
25+
```bash
26+
go run generate-attribution.go
27+
```
28+
29+
This script will:
30+
- **Generate `licenses.csv`**: Scans all Go-supported platforms and creates a CSV
31+
- **Generate `THIRD-PARTY-LICENSES.txt`**: Creates attribution document from all platforms
32+
33+
### Template File
34+
35+
The `attribution.tmpl` file contains:
36+
37+
```go
38+
{{range .}}{{.Name}}
39+
{{.Version}} <{{.LicenseURL}}>
40+
41+
{{.LicenseText}}
42+
43+
44+
******************************
45+
46+
{{end}}
47+
```
48+
49+
### Misc
50+
51+
#### Check licenses (Optional - for validation and compliance)
52+
53+
These commands help validate license compliance and prevent prohibited licenses:
54+
55+
```bash
56+
go-licenses check ./... --ignore cfn-init
57+
58+
# Check for forbidden licenses
59+
go-licenses check ./... --ignore cfn-init --disallowed_types=<LICENSE1>,<LICENSE2>
60+
61+
# Allow only specific licenses
62+
go-licenses check ./... --ignore cfn-init --allowed_licenses=<LICENSE1>,<LICENSE2>,<LICENSE3>
63+
```

0 commit comments

Comments
 (0)