diff --git a/Cargo.toml b/Cargo.toml index 12d0962..e5a599a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "llm-ls" -version = "0.1.0" +version = "0.1.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/main.rs b/src/main.rs index f56ea8f..ae1c3af 100644 --- a/src/main.rs +++ b/src/main.rs @@ -241,7 +241,7 @@ fn build_prompt( let mut token_count = context_window; let mut before = vec![]; let mut first = true; - for mut line in text.lines_at(pos.line as usize).reversed() { + for mut line in text.lines_at(pos.line as usize + 1).reversed() { if first { line = line.slice(0..pos.character as usize); first = false; @@ -426,7 +426,7 @@ impl LanguageServer for Backend { Ok(InitializeResult { server_info: Some(ServerInfo { name: "llm-ls".to_owned(), - version: Some("0.1.0".to_owned()), + version: Some("0.1.1".to_owned()), }), capabilities: ServerCapabilities { text_document_sync: Some(TextDocumentSyncCapability::Kind(