diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..ee08201 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing to Our Open Source Projects + +First, a huge **thank you** for dedicating your time to helping us improve our projects 🧑 + +## Before Opening Issues + +- **Do not report security vulnerabilities publicly** (e.g., in issues or discussions), please refer to our [security policy](https://github.com/web-lsp/weblsp/blob/main/SECURITY.md). +- **Do not create issues for ideas or suggestions.** Instead, share your thoughts in our [GitHub Discussions](https://github.com/web-lsp/weblsp/discussions/categories/ideas). +- **Do not create issues for questions.** Instead, ask your question in our [GitHub Discussions](https://github.com/web-lsp/weblsp/discussions/categories/q-a). +- **Check for duplicates.** Look through existing issues and discussions to see if your topic has already been addressed. +- Provide as much detail as possible. However, don’t worry if it’s incompleteβ€”we will help refine it! + +## Before submitting Pull Requests (PRs) + +- **Open an issue.** Before making significant changes, open an issue to discuss the problem and potential solutions with us. +- **Check for duplicates.** Look through existing PRs to see if your changes have already been submitted. +- **Avoid trivial changes.** Don't submit PRs for typos, grammar, or insignificant changes, as they will be **declined** without review. +- PRs don't need to be perfect. Submit your best effort, and we will gladly assist in polishing the work. + +## Code of Conduct + +We’re committed to fostering a welcoming and respectful community. Any issue, PR, or discussion that violates our [code of conduct](https://github.com/web-lsp/weblsp/blob/main/CODE_OF_CONDUCT.md) will be deleted, and the authors will be **banned**. + +--- + +Thank you once again for contributing, we deeply appreciate all contributions, no matter how small or big. diff --git a/README.md b/README.md index 64442e7..7c68676 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,23 @@ - - WEBlsp logo + + WEBlsp logo A better Language Server for the Web, made with Rust. -(Work In Progress) ~~It provides full-featured language support for HTML and CSS, including syntax highlighting, code completion, error checking, and more.~~ Compliant with the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), WEBlsp is designed to work with any IDE that supports LSP. Build on top of ~~HTMLlsrs~~ and [CSSlsrs](https://github.com/web-lsp/csslsrs), our own modern, fast, and reliable Language Services. +(Work In Progress) ~~It provides full-featured language support for HTML and CSS, including code completion, diagnostics, hover, and more.~~ Compliant with the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), WEBlsp is designed to work with any IDE that supports LSP. Build on top of ~~HTMLlsrs~~ and [CSSlsrs](https://github.com/web-lsp/weblsp/tree/main/crates/csslsrs), our own modern, fast, and reliable Language Services. + +This is the root of WEBlsp monorepository, please refer to the list of crates and packages below for more specific information. + +## Quick Links + +πŸ“– [Main repository](https://github.com/web-lsp/weblsp/), with all related crates and packages. + +πŸ› [Report a bug](https://github.com/web-lsp/weblsp/issues), please read our [contributing guidelines](https://github.com/web-lsp/weblsp/blob/main/CONTRIBUTING.md) and [code of conduct](https://github.com/web-lsp/weblsp/blob/main/CODE_OF_CONDUCT.md) first. + +🚨 [Report a security vulnerability](https://github.com/web-lsp/weblsp/security/advisories/new), and be sure to review our [security policy](https://github.com/web-lsp/weblsp/blob/main/SECURITY.md). + +πŸ’¬ [Join the discussion](https://github.com/web-lsp/weblsp/discussions), if you have any questions, ideas, or suggestions. ## Crates @@ -20,8 +32,10 @@ WEBlsp is a monorepo that contains the following crates (Rust packages): Additionally, WEBlsp contains the following NPM packages (JavaScript packages): -| Name | Description | NPM | README | -| ---------------- | ------------------------- | --- | ------------------------------------------------ | -| `vscode` | WEBlsp VSCode extension | WIP | [README.md](./packages/vscode/README.md) | -| `csslsrs` | WASM CSS Language Service | WIP | [README.md](./packages/csslsrs/README.md) | -| `benchmark-wasm` | Benchmark WASM packages | WIP | [README.md](./packages/benchmark-wasm/README.md) | +| Name | Description | NPM | README | +| --------------------- | ------------------------------------------ | --- | ----------------------------------------------------- | +| `vscode` | WEBlsp VSCode extension | WIP | [README.md](./packages/vscode/README.md) | +| `csslsrs` | WASM CSS Language Service | WIP | [README.md](./packages/csslsrs/README.md) | +| `benchmark-wasm` | Benchmark WASM packages | WIP | [README.md](./packages/benchmark-wasm/README.md) | +| `ls-tests-benchmarks` | End-to-end tests and benchmarks for WEBlsp | WIP | [README.md](./packages/ls-tests-benchmarks/README.md) | + diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..a3dc888 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,28 @@ +# Security Policy + +## Supported Versions + +The following versions of our projects are currently supported with security updates: + +| Package | Version | Supported | +| ------- | ------- | ------------------ | +| WEBlsp | 0.x.x | :white_check_mark: | +| CSSlsrs | 0.x.x | :white_check_mark: | + +## Reporting a Vulnerability + +We take security issues very seriously. If you discover a vulnerability, please report it through our private reporting form: [Report a Security Vulnerability](https://github.com/web-lsp/weblsp/security/advisories/new). + +### Guidelines for Reporting +- Do **not** report vulnerabilities publicly via issues or discussions. +- Please provide as much detail as possible about the vulnerability to help us investigate and resolve it quickly. + +### What to Expect +- You will receive an acknowledgement of your report within **48 hours** (working days). +- We will work to fix the issue as soon as possible. In most cases, a fix will be published within **one week** of confirming the vulnerability. + +### Post-Fix Communication +Once the fix is deployed, a **public security advisory** will be published here: [Security Advisories](https://github.com/web-lsp/weblsp/security/advisories). +If applicable, credit will be given to the reporter for their responsible disclosure. + +We greatly appreciate your efforts to help us maintain the security of our projects. diff --git a/crates/csslsrs/README.md b/crates/csslsrs/README.md index dafaf92..332f1ea 100644 --- a/crates/csslsrs/README.md +++ b/crates/csslsrs/README.md @@ -1,11 +1,21 @@ - - CSSlsrs logo + + WEBlsp logo A CSS Language Service made with Rust. -(Work In Progress) ~~It provides full-featured language support for CSS, including syntax highlighting, code completion, error checking, and more.~~ Compliant with the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), CSSlsrs can be integrated into Language Servers written in Rust or JavaScript (via WebAssembly). Thanks to [Biome](https://biomejs.dev/)'s parser, we deliver a fast and efficient language service, designed to improve your productivity when working with CSS. +(Work In Progress) ~~It provides full-featured language support for HTML and CSS, including code completion, diagnostics, hover, and more.~~ Compliant with the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), CSSlsrs can be integrated into Language Servers written in Rust or JavaScript/TypeScript (via WebAssembly). Thanks to [Biome](https://biomejs.dev/)'s parser, we deliver a fast and efficient language service, designed to improve your productivity when working with CSS. + +## Quick Links + +πŸ“– [Main repository](https://github.com/web-lsp/weblsp/), with all related crates and packages. + +πŸ› [Report a bug](https://github.com/web-lsp/weblsp/issues), please read our [contributing guidelines](https://github.com/web-lsp/weblsp/blob/main/CONTRIBUTING.md) and [code of conduct](https://github.com/web-lsp/weblsp/blob/main/CODE_OF_CONDUCT.md) first. + +🚨 [Report a security vulnerability](https://github.com/web-lsp/weblsp/security/advisories/new), and be sure to review our [security policy](https://github.com/web-lsp/weblsp/blob/main/SECURITY.md). + +πŸ’¬ [Join the discussion](https://github.com/web-lsp/weblsp/discussions), if you have any questions, ideas, or suggestions. ## Features @@ -28,3 +38,11 @@ A CSS Language Service made with Rust. | Validation | ❌ | βœ… | - | | Custom data | ❌ | βœ… | - | | Super-set of CSS | ❌ | βœ… | - | + +## Getting Started + +WIP. + +## Building + +WIP. diff --git a/crates/weblsp/README.md b/crates/weblsp/README.md index 6713242..1850c10 100644 --- a/crates/weblsp/README.md +++ b/crates/weblsp/README.md @@ -1,21 +1,30 @@ - - WEBlsp logo + + WEBlsp logo A better Language Server for the Web, made with Rust. -(Work In Progress) ~~It provides full-featured language support for HTML and CSS, including syntax highlighting, code completion, error checking, and more.~~ Compliant with the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), WEBlsp is designed to work with any IDE that supports LSP. Build on top of ~~HTMLlsrs~~ and [CSSlsrs](https://github.com/web-lsp/csslsrs), our own modern, fast, and reliable Language Services. +(Work In Progress) ~~It provides full-featured language support for HTML and CSS, including code completion, diagnostics, hover, and more.~~ Compliant with the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), WEBlsp is designed to work with any IDE that supports LSP. -## TODO +This crate contains the Language Server implementation in Rust. WEBlsp receives requests from the client, and dispatches them to the appropriate language service (e.g., [CSSlsrs](https://github.com/web-lsp/weblsp/tree/main/crates/csslsrs)), before sending the response back to the client. -- [x] LSP basic server -- [ ] Handle request by language (HTML, CSS) -- [x] CSS Language Service (CSSlsrs) integration -- [ ] HTML Language Service (HTMLlsrs) integration -- [ ] Publish VSCode extension +## Quick Links + +πŸ“– [Main repository](https://github.com/web-lsp/weblsp/), with all related crates and packages. + +πŸ› [Report a bug](https://github.com/web-lsp/weblsp/issues), please read our [contributing guidelines](https://github.com/web-lsp/weblsp/blob/main/CONTRIBUTING.md) and [code of conduct](https://github.com/web-lsp/weblsp/blob/main/CODE_OF_CONDUCT.md) first. + +🚨 [Report a security vulnerability](https://github.com/web-lsp/weblsp/security/advisories/new), and be sure to review our [security policy](https://github.com/web-lsp/weblsp/blob/main/SECURITY.md). + +πŸ’¬ [Join the discussion](https://github.com/web-lsp/weblsp/discussions), if you have any questions, ideas, or suggestions. + +## Getting Started + +WIP. + +## Building + +WIP. -## Useful commands -- `cargo build` - Build the project -- `cd ./packages/vscode && pnpm run compile` - Compile the vscode extension diff --git a/packages/benchmark-wasm/README.md b/packages/benchmark-wasm/README.md index 107a0b6..f8cd049 100644 --- a/packages/benchmark-wasm/README.md +++ b/packages/benchmark-wasm/README.md @@ -1,6 +1,6 @@ -# benchmark-wasm +# @web-lsp/benchmark-wasm -This package contains benchmarks for the WASM output of CSSLSRS, comparing it with other popular language services for CSS in JavaScript. +This private package contains benchmarks for the WASM output of CSSLSRS, comparing it with other popular language services for CSS in JavaScript. ## Adding a new benchmark diff --git a/packages/benchmark-wasm/package.json b/packages/benchmark-wasm/package.json index 9692774..eef003d 100644 --- a/packages/benchmark-wasm/package.json +++ b/packages/benchmark-wasm/package.json @@ -1,5 +1,5 @@ { - "name": "benchmark-wasm", + "name": "@weblsp/benchmark-wasm", "version": "0.0.1", "private": true, "type": "module", diff --git a/packages/csslsrs/README.md b/packages/csslsrs/README.md index 106fc6c..25481a4 100644 --- a/packages/csslsrs/README.md +++ b/packages/csslsrs/README.md @@ -1,3 +1,28 @@ -# CSSlsrs - WASM CSS Language Service + + + WEBlsp logo + -Work in progress. \ No newline at end of file +A CSS Language Service made with Rust, for the JavaScript/TypeScript ecosystem. + +(Work In Progress) ~~It provides full-featured language support for HTML and CSS, including code completion, diagnostics, hover, and more.~~ Compliant with the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), CSSlsrs can be integrated into Language Servers written in Rust or JavaScript/TypeScript (via WebAssembly). Thanks to [Biome](https://biomejs.dev/)'s parser, we deliver a fast and efficient language service, designed to improve your productivity when working with CSS. + +This package contains the WASM implementation of [CSSlsrs](https://github.com/web-lsp/weblsp/tree/main/crates/csslsrs) for JavaScript/TypeScript Language Servers. + +## Quick Links + +πŸ“– [Main repository](https://github.com/web-lsp/weblsp/), with all related crates and packages. + +πŸ› [Report a bug](https://github.com/web-lsp/weblsp/issues), please read our [contributing guidelines](https://github.com/web-lsp/weblsp/blob/main/CONTRIBUTING.md) and [code of conduct](https://github.com/web-lsp/weblsp/blob/main/CODE_OF_CONDUCT.md) first. + +🚨 [Report a security vulnerability](https://github.com/web-lsp/weblsp/security/advisories/new), and be sure to review our [security policy](https://github.com/web-lsp/weblsp/blob/main/SECURITY.md). + +πŸ’¬ [Join the discussion](https://github.com/web-lsp/weblsp/discussions), if you have any questions, ideas, or suggestions. + +## Getting Started + +WIP. + +## Building + +WIP. diff --git a/packages/csslsrs/package.json b/packages/csslsrs/package.json index cdaca32..f944532 100644 --- a/packages/csslsrs/package.json +++ b/packages/csslsrs/package.json @@ -1,5 +1,5 @@ { - "name": "csslsrs", + "name": "@weblsp/csslsrs", "version": "0.1.1", "type": "module", "description": "", diff --git a/packages/language-server-tests-benchmarks/README.md b/packages/ls-tests-benchmarks/README.md similarity index 76% rename from packages/language-server-tests-benchmarks/README.md rename to packages/ls-tests-benchmarks/README.md index b6fb946..b0a9912 100644 --- a/packages/language-server-tests-benchmarks/README.md +++ b/packages/ls-tests-benchmarks/README.md @@ -1,6 +1,10 @@ -# language-server-tests-benchmarks +# @weblsp/ls-tests-benchmarks -The tests and benchmarks in this folder aims to test and benchmark the language server in a close-to-reality scenario, using the same JavaScript client powered by `vscode-jsonrpc` used in VS Code. +This private package aims to test and benchmark the language server in a close-to-reality scenario, using the same JavaScript client powered by `vscode-jsonrpc` used in VS Code. + +## Running the tests + +WIP. ## Why are the benchmarks so slow? diff --git a/packages/language-server-tests-benchmarks/fixture/colors_benchmark.css b/packages/ls-tests-benchmarks/fixture/colors_benchmark.css similarity index 100% rename from packages/language-server-tests-benchmarks/fixture/colors_benchmark.css rename to packages/ls-tests-benchmarks/fixture/colors_benchmark.css diff --git a/packages/language-server-tests-benchmarks/fixture/document_symbols.css b/packages/ls-tests-benchmarks/fixture/document_symbols.css similarity index 100% rename from packages/language-server-tests-benchmarks/fixture/document_symbols.css rename to packages/ls-tests-benchmarks/fixture/document_symbols.css diff --git a/packages/language-server-tests-benchmarks/fixture/folding_benchmark.css b/packages/ls-tests-benchmarks/fixture/folding_benchmark.css similarity index 100% rename from packages/language-server-tests-benchmarks/fixture/folding_benchmark.css rename to packages/ls-tests-benchmarks/fixture/folding_benchmark.css diff --git a/packages/language-server-tests-benchmarks/fixture/hover_benchmark.css b/packages/ls-tests-benchmarks/fixture/hover_benchmark.css similarity index 100% rename from packages/language-server-tests-benchmarks/fixture/hover_benchmark.css rename to packages/ls-tests-benchmarks/fixture/hover_benchmark.css diff --git a/packages/language-server-tests-benchmarks/package.json b/packages/ls-tests-benchmarks/package.json similarity index 91% rename from packages/language-server-tests-benchmarks/package.json rename to packages/ls-tests-benchmarks/package.json index f359356..1a34f93 100644 --- a/packages/language-server-tests-benchmarks/package.json +++ b/packages/ls-tests-benchmarks/package.json @@ -1,5 +1,5 @@ { - "name": "language-server-tests-benchmarks", + "name": "@weblsp/ls-tests-benchmarks", "type": "module", "private": true, "scripts": { diff --git a/packages/language-server-tests-benchmarks/src/benchmarks/css/colors.bench.ts b/packages/ls-tests-benchmarks/src/benchmarks/css/colors.bench.ts similarity index 100% rename from packages/language-server-tests-benchmarks/src/benchmarks/css/colors.bench.ts rename to packages/ls-tests-benchmarks/src/benchmarks/css/colors.bench.ts diff --git a/packages/language-server-tests-benchmarks/src/benchmarks/css/document_symbols.bench.ts b/packages/ls-tests-benchmarks/src/benchmarks/css/document_symbols.bench.ts similarity index 100% rename from packages/language-server-tests-benchmarks/src/benchmarks/css/document_symbols.bench.ts rename to packages/ls-tests-benchmarks/src/benchmarks/css/document_symbols.bench.ts diff --git a/packages/language-server-tests-benchmarks/src/benchmarks/css/folding.bench.ts b/packages/ls-tests-benchmarks/src/benchmarks/css/folding.bench.ts similarity index 100% rename from packages/language-server-tests-benchmarks/src/benchmarks/css/folding.bench.ts rename to packages/ls-tests-benchmarks/src/benchmarks/css/folding.bench.ts diff --git a/packages/language-server-tests-benchmarks/src/benchmarks/css/hover.bench.ts b/packages/ls-tests-benchmarks/src/benchmarks/css/hover.bench.ts similarity index 100% rename from packages/language-server-tests-benchmarks/src/benchmarks/css/hover.bench.ts rename to packages/ls-tests-benchmarks/src/benchmarks/css/hover.bench.ts diff --git a/packages/language-server-tests-benchmarks/src/server.ts b/packages/ls-tests-benchmarks/src/server.ts similarity index 100% rename from packages/language-server-tests-benchmarks/src/server.ts rename to packages/ls-tests-benchmarks/src/server.ts diff --git a/packages/language-server-tests-benchmarks/src/tests/css/colors.test.ts b/packages/ls-tests-benchmarks/src/tests/css/colors.test.ts similarity index 100% rename from packages/language-server-tests-benchmarks/src/tests/css/colors.test.ts rename to packages/ls-tests-benchmarks/src/tests/css/colors.test.ts diff --git a/packages/language-server-tests-benchmarks/src/tests/css/documentSymbols.test.ts b/packages/ls-tests-benchmarks/src/tests/css/documentSymbols.test.ts similarity index 100% rename from packages/language-server-tests-benchmarks/src/tests/css/documentSymbols.test.ts rename to packages/ls-tests-benchmarks/src/tests/css/documentSymbols.test.ts diff --git a/packages/language-server-tests-benchmarks/src/tests/css/folding.test.ts b/packages/ls-tests-benchmarks/src/tests/css/folding.test.ts similarity index 100% rename from packages/language-server-tests-benchmarks/src/tests/css/folding.test.ts rename to packages/ls-tests-benchmarks/src/tests/css/folding.test.ts diff --git a/packages/language-server-tests-benchmarks/src/tests/css/hover.test.ts b/packages/ls-tests-benchmarks/src/tests/css/hover.test.ts similarity index 100% rename from packages/language-server-tests-benchmarks/src/tests/css/hover.test.ts rename to packages/ls-tests-benchmarks/src/tests/css/hover.test.ts diff --git a/packages/language-server-tests-benchmarks/src/tests/init.test.ts b/packages/ls-tests-benchmarks/src/tests/init.test.ts similarity index 100% rename from packages/language-server-tests-benchmarks/src/tests/init.test.ts rename to packages/ls-tests-benchmarks/src/tests/init.test.ts diff --git a/packages/language-server-tests-benchmarks/src/tests/setup.ts b/packages/ls-tests-benchmarks/src/tests/setup.ts similarity index 100% rename from packages/language-server-tests-benchmarks/src/tests/setup.ts rename to packages/ls-tests-benchmarks/src/tests/setup.ts diff --git a/packages/language-server-tests-benchmarks/src/tests/shutdown.test.ts b/packages/ls-tests-benchmarks/src/tests/shutdown.test.ts similarity index 100% rename from packages/language-server-tests-benchmarks/src/tests/shutdown.test.ts rename to packages/ls-tests-benchmarks/src/tests/shutdown.test.ts diff --git a/packages/language-server-tests-benchmarks/tsconfig.json b/packages/ls-tests-benchmarks/tsconfig.json similarity index 100% rename from packages/language-server-tests-benchmarks/tsconfig.json rename to packages/ls-tests-benchmarks/tsconfig.json diff --git a/packages/language-server-tests-benchmarks/vitest.config.bench.ts b/packages/ls-tests-benchmarks/vitest.config.bench.ts similarity index 100% rename from packages/language-server-tests-benchmarks/vitest.config.bench.ts rename to packages/ls-tests-benchmarks/vitest.config.bench.ts diff --git a/packages/language-server-tests-benchmarks/vitest.config.ts b/packages/ls-tests-benchmarks/vitest.config.ts similarity index 100% rename from packages/language-server-tests-benchmarks/vitest.config.ts rename to packages/ls-tests-benchmarks/vitest.config.ts diff --git a/packages/vscode/README.md b/packages/vscode/README.md index 0e21154..60736ee 100644 --- a/packages/vscode/README.md +++ b/packages/vscode/README.md @@ -1,3 +1,26 @@ -# WEBlsp's vscode extension + + + WEBlsp logo + -Work In Progress. \ No newline at end of file +A better Language Server for the Web, made with Rust. + +(Work In Progress) ~~It provides full-featured language support for HTML and CSS, including code completion, diagnostics, hover, and more.~~ + +## Quick Links + +πŸ“– [Main repository](https://github.com/web-lsp/weblsp/), with all related crates and packages. + +πŸ› [Report a bug](https://github.com/web-lsp/weblsp/issues), please read our [contributing guidelines](https://github.com/web-lsp/weblsp/blob/main/CONTRIBUTING.md) and [code of conduct](https://github.com/web-lsp/weblsp/blob/main/CODE_OF_CONDUCT.md) first. + +🚨 [Report a security vulnerability](https://github.com/web-lsp/weblsp/security/advisories/new), and be sure to review our [security policy](https://github.com/web-lsp/weblsp/blob/main/SECURITY.md). + +πŸ’¬ [Join the discussion](https://github.com/web-lsp/weblsp/discussions), if you have any questions, ideas, or suggestions. + +## Installation + +WIP. + +## Configuration + +WIP.