We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb41aab commit 3cec835Copy full SHA for 3cec835
Cargo.lock
Cargo.toml
@@ -1,7 +1,7 @@
1
[package]
2
name = "protols"
3
description = "Language server for proto3 files"
4
-version = "0.8.0"
+version = "0.8.5"
5
edition = "2021"
6
license = "MIT"
7
homepage = "https://github.com/coder3101/protols"
src/lsp.rs
@@ -15,10 +15,9 @@ use async_lsp::lsp_types::{
15
GotoDefinitionResponse, Hover, HoverContents, HoverParams, HoverProviderCapability,
16
InitializeParams, InitializeResult, Location, OneOf, PrepareRenameResponse, ProgressParams,
17
ReferenceParams, RenameFilesParams, RenameOptions, RenameParams, ServerCapabilities,
18
- ServerInfo, TextDocumentPositionParams, TextDocumentSyncCapability,
19
- TextDocumentSyncKind, TextEdit, Url, WorkspaceEdit,
20
- WorkspaceFileOperationsServerCapabilities, WorkspaceFoldersServerCapabilities,
21
- WorkspaceServerCapabilities,
+ ServerInfo, TextDocumentPositionParams, TextDocumentSyncCapability, TextDocumentSyncKind,
+ TextEdit, Url, WorkspaceEdit, WorkspaceFileOperationsServerCapabilities,
+ WorkspaceFoldersServerCapabilities, WorkspaceServerCapabilities,
22
};
23
use async_lsp::{LanguageClient, LanguageServer, ResponseError};
24
use futures::future::BoxFuture;
src/main.rs
@@ -9,17 +9,23 @@ use server::{ProtoLanguageServer, TickEvent};
9
use tower::ServiceBuilder;
10
use tracing::Level;
11
12
+mod formatter;
13
mod lsp;
14
mod nodekind;
mod parser;
mod server;
mod state;
mod utils;
mod workspace;
-mod formatter;
#[tokio::main(flavor = "current_thread")]
async fn main() {
+ let args: Vec<String> = std::env::args().collect();
+ if args.len() == 2 && args[1] == "--version" {
25
+ println!("{} {}", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION"));
26
+ return;
27
+ }
28
+
29
let (server, _) = async_lsp::MainLoop::new_server(|client| {
30
tokio::spawn({
31
let client = client.clone();
src/workspace/hover.rs
@@ -6,7 +6,6 @@ use crate::{
formatter::ProtoFormatter, state::ProtoLanguageState, utils::split_identifier_package,
8
-
static BUITIN_DOCS: LazyLock<HashMap<&'static str, &'static str>> = LazyLock::new(|| {
HashMap::from([
(
0 commit comments