10 releases (6 breaking)

0.7.0 Oct 24, 2024
0.6.2 Oct 5, 2024
0.6.0 Sep 1, 2024
0.5.0 Aug 24, 2024
0.1.1 Jun 22, 2024

#43 in Text editors

Download history 153/week @ 2024-07-29 13/week @ 2024-08-05 77/week @ 2024-08-12 221/week @ 2024-08-19 142/week @ 2024-08-26 65/week @ 2024-09-02 14/week @ 2024-09-09 39/week @ 2024-09-16 20/week @ 2024-09-23 176/week @ 2024-09-30 70/week @ 2024-10-07 33/week @ 2024-10-14 141/week @ 2024-10-21 30/week @ 2024-10-28 28/week @ 2024-11-04 15/week @ 2024-11-11

215 downloads per month

MIT license

72KB
1.5K SLoC

Protols - Protobuf Language Server

Crates.io Build and Test

Protols is an open-source Language Server Protocol (LSP) for proto files, powered by the robust and efficient tree-sitter parser. With Protols, you get powerful code assistance for protobuf files, including auto-completion, syntax diagnostics, and more.

✨ Features

  • ✅ Code Completion
  • ✅ Diagnostics
  • ✅ Document Symbols
  • ✅ Code Formatting
  • ✅ Go to Definition
  • ✅ Hover Information
  • ✅ Rename Symbols

🚀 Getting Started

Installation

For Neovim

To install Protols, run:

cargo install protols

Then, configure it with nvim-lspconfig:

require'lspconfig'.protols.setup{}

For Visual Studio Code

You can use the Protobuf Language Support extension, which leverages this LSP under the hood.

Note: This extension is open source but is not maintained by us.

🛠️ Usage

Code Completion

Protols provides intelligent autocompletion for messages, enums, and proto3 keywords within the current package.

Diagnostics

Diagnostics are powered by the tree-sitter parser, which catches syntax errors but does not utilize protoc for more advanced error reporting.

Code Formatting

Formatting is enabled if clang-format is available. You can control the formatting style by placing a .clang-format file in the root of your workspace. Both document and range formatting are supported.

Document Symbols

Provides symbols for the entire document, including nested symbols, messages, and enums.

Go to Definition

Jump to the definition of any custom symbol, even across package boundaries.

Hover Information

Displays comments and documentation for protobuf symbols on hover. Works seamlessly across package boundaries.

Rename Symbols

Allows renaming of symbols like messages and enums, along with all their usages across packages. Currently, renaming fields within symbols is not supported directly.


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 and join in on improving this tool! 🎉

Dependencies

~14–27MB
~409K SLoC