Skip to content

Commit 907fb90

Browse files
authored
feat: Add docs about include_path and format code. (#57)
feat: Add docs about include_path and format code.
1 parent adda8ae commit 907fb90

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ clang_format_path = "/usr/bin/clang-format" # clang-format binary to execute in
9595

9696
The `[config]` section contains stable settings that should generally remain unchanged.
9797

98-
- `include_paths`: Directories to search for `.proto` files.
98+
- `include_paths`: Directories to search for `.proto` files. Absolute or relative to LSP workspace root.
9999
- `disable_parse_diagnostics`: Set to `true` to disable diagnostics during parsing.
100100

101101
#### Experimental Configuration

src/config/workspace.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@ impl WorkspaceProtoConfigs {
8181
}
8282

8383
pub fn get_include_paths(&self, uri: &Url) -> Option<Vec<PathBuf>> {
84-
let c = self.get_config_for_uri(uri)?;
84+
let cfg = self.get_config_for_uri(uri)?;
8585
let w = self.get_workspace_for_uri(uri)?.to_file_path().ok()?;
86-
let mut ipath: Vec<PathBuf> = c
86+
87+
let mut ipath: Vec<PathBuf> = cfg
8788
.config
8889
.include_paths
8990
.iter()

src/context/jumpable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
pub enum Jumpable {
22
Import(String),
3-
Identifier(String)
3+
Identifier(String),
44
}

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use tower::ServiceBuilder;
1010
use tracing::Level;
1111

1212
mod config;
13+
mod context;
1314
mod formatter;
1415
mod lsp;
1516
mod nodekind;
@@ -18,7 +19,6 @@ mod server;
1819
mod state;
1920
mod utils;
2021
mod workspace;
21-
mod context;
2222

2323
#[tokio::main(flavor = "current_thread")]
2424
async fn main() {

src/workspace/hover.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,8 +663,6 @@ Included from {}"#,
663663

664664
#[cfg(test)]
665665
mod test {
666-
use std::path::PathBuf;
667-
668666
use insta::assert_yaml_snapshot;
669667

670668
use crate::context::hoverable::Hoverables;

0 commit comments

Comments
 (0)