Skip to content

feat: Add a --version cli parameter to check for version #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "protols"
description = "Language server for proto3 files"
version = "0.8.0"
version = "0.8.5"
edition = "2021"
license = "MIT"
homepage = "https://github.com/coder3101/protols"
Expand Down
7 changes: 3 additions & 4 deletions src/lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ use async_lsp::lsp_types::{
GotoDefinitionResponse, Hover, HoverContents, HoverParams, HoverProviderCapability,
InitializeParams, InitializeResult, Location, OneOf, PrepareRenameResponse, ProgressParams,
ReferenceParams, RenameFilesParams, RenameOptions, RenameParams, ServerCapabilities,
ServerInfo, TextDocumentPositionParams, TextDocumentSyncCapability,
TextDocumentSyncKind, TextEdit, Url, WorkspaceEdit,
WorkspaceFileOperationsServerCapabilities, WorkspaceFoldersServerCapabilities,
WorkspaceServerCapabilities,
ServerInfo, TextDocumentPositionParams, TextDocumentSyncCapability, TextDocumentSyncKind,
TextEdit, Url, WorkspaceEdit, WorkspaceFileOperationsServerCapabilities,
WorkspaceFoldersServerCapabilities, WorkspaceServerCapabilities,
};
use async_lsp::{LanguageClient, LanguageServer, ResponseError};
use futures::future::BoxFuture;
Expand Down
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,23 @@ use server::{ProtoLanguageServer, TickEvent};
use tower::ServiceBuilder;
use tracing::Level;

mod formatter;
mod lsp;
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" {
println!("{} {}", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION"));
return;
}

let (server, _) = async_lsp::MainLoop::new_server(|client| {
tokio::spawn({
let client = client.clone();
Expand Down
1 change: 0 additions & 1 deletion src/workspace/hover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use crate::{
formatter::ProtoFormatter, state::ProtoLanguageState, utils::split_identifier_package,
};


static BUITIN_DOCS: LazyLock<HashMap<&'static str, &'static str>> = LazyLock::new(|| {
HashMap::from([
(
Expand Down
Loading