Skip to content

Commit 565a51e

Browse files
committed
update readme
1 parent 6885a08 commit 565a51e

File tree

1 file changed

+90
-2
lines changed

1 file changed

+90
-2
lines changed

README.md

Lines changed: 90 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,18 @@
1818
- ✅ Rename Symbols
1919
- ✅ Find references
2020

21-
## 🚀 Getting Started
21+
## Table of Contents
22+
23+
- [Installation](#installation)
24+
- [Configuration](#configuration)
25+
- [Basic Configuration](#basic-configuration)
26+
- [Experimental Configuration](#experimental-configuration)
27+
- [Formatter Configuration](#formatter-configuration)
28+
- [Usage](#usage)
29+
- [Contributing](#contributing)
30+
- [License](#license)
31+
32+
---
2233

2334
### Installation
2435

@@ -41,6 +52,57 @@ require'lspconfig'.protols.setup{}
4152
You can use the [Protobuf Language Support](https://marketplace.visualstudio.com/items?itemName=ianandhum.protobuf-support) extension, which leverages this LSP under the hood.
4253

4354
> **Note:** This extension is [open source](https://github.com/ianandhum/vscode-protobuf-support) but is not maintained by us.
55+
You can install **protols** via your preferred method, such as downloading the binary or building from source. Here’s how to get started with the simplest method:
56+
57+
58+
---
59+
60+
## Configuration
61+
62+
Protols is configured using a `protols.toml` file. This configuration file can be placed in any directory, and **protols** will look for the closest file by recursively searching through parent directories.
63+
64+
Here’s a sample configuration:
65+
66+
### Sample `protols.toml`
67+
68+
```toml
69+
[config] # Base configuration; these are considered stable and should not change
70+
include_paths = ["foobar", "bazbaaz"] # Include paths to look for protofiles during parsing
71+
disable_parse_diagnostics = true # Disable diagnostics for parsing
72+
73+
[config.experimental] # Experimental configuration; this should be considered unsafe and not fully tested
74+
use_protoc_diagnostics = true # Use diagnostics from protoc
75+
76+
[formatter] # Formatter specific configuration
77+
clang_format_path = "/usr/bin/clang-format" # clang-format binary to execute in formatting
78+
```
79+
80+
### Configuration Sections
81+
82+
#### Basic Configuration
83+
84+
The `[config]` section contains stable settings that should generally remain unchanged.
85+
86+
- `include_paths`: List the directories where your `.proto` files are located.
87+
- `disable_parse_diagnostics`: Set to `true` to disable parsing diagnostics.
88+
89+
#### Experimental Configuration
90+
91+
The `[config.experimental]` section contains settings that are still under development or are not fully tested.
92+
93+
- `use_protoc_diagnostics`: If set to `true`, this will enable diagnostics from the `protoc` compiler.
94+
95+
#### Formatter Configuration
96+
97+
The `[formatter]` section configures how the formatting is done.
98+
99+
- `clang_format_path`: Path to the `clang-format` binary used for formatting `.proto` files.
100+
101+
### Multiple Configuration Files
102+
103+
You can use multiple `protols.toml` files across different directories, and **protols** will use the closest configuration file found by traversing the parent directories.
104+
105+
---
44106

45107
## 🛠️ Usage
46108

@@ -78,4 +140,30 @@ Allows user defined types like messages and enums can be checked for references.
78140

79141
---
80142

81-
Protols is designed to supercharge your workflow with **proto** files. We welcome contributions and feedback from the community! Feel free to check out the [repository](https://github.com/coder3101/protols) and join in on improving this tool! 🎉
143+
## Contributing
144+
145+
We welcome contributions from the community! If you’d like to help improve **protols**, here’s how you can get started:
146+
147+
1. Fork the repository and clone it to your machine.
148+
2. Make your changes in a new branch.
149+
3. Run the tests to ensure everything works properly.
150+
4. Open a pull request with a description of the changes.
151+
152+
### Setting Up Locally
153+
154+
1. Clone the repository:
155+
```bash
156+
git clone https://github.com/coder3101/protols.git
157+
cd protols
158+
```
159+
160+
2. Build and test your changes:
161+
```bash
162+
cargo build
163+
cargo test
164+
```
165+
---
166+
167+
## License
168+
169+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

0 commit comments

Comments
 (0)