aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp/src
diff options
context:
space:
mode:
authorDaniel Sedlak2023-04-07 15:10:38 +0000
committerGitHub2023-04-07 15:10:38 +0000
commite856906f766aa6d58aba6f6bca9e2e1879b1629d (patch)
tree59befeebf031ab8de57df97f836bf08ccb7085f2 /helix-lsp/src
parent1148ce1fd9941e00bd416bce1f06a987d0e7b5f2 (diff)
Fix typos (#6643)
Diffstat (limited to 'helix-lsp/src')
-rw-r--r--helix-lsp/src/client.rs14
-rw-r--r--helix-lsp/src/lib.rs6
-rw-r--r--helix-lsp/src/snippet.rs12
3 files changed, 16 insertions, 16 deletions
diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs
index 29a67988..93e822c4 100644
--- a/helix-lsp/src/client.rs
+++ b/helix-lsp/src/client.rs
@@ -52,8 +52,8 @@ pub struct Client {
root_path: std::path::PathBuf,
root_uri: Option<lsp::Url>,
workspace_folders: Mutex<Vec<lsp::WorkspaceFolder>>,
- initalize_notify: Arc<Notify>,
- /// workspace folders added while the server is still initalizing
+ initialize_notify: Arc<Notify>,
+ /// workspace folders added while the server is still initializing
req_timeout: u64,
}
@@ -92,14 +92,14 @@ impl Client {
return true;
}
- // this server definitly doesn't support multiple workspace, no need to check capabilities
+ // this server definitely doesn't support multiple workspace, no need to check capabilities
if !may_support_workspace {
return false;
}
let Some(capabilities) = self.capabilities.get() else {
let client = Arc::clone(self);
- // initalization hasn't finished yet, deal with this new root later
+ // initialization hasn't finished yet, deal with this new root later
// TODO: In the edgecase that a **new root** is added
// for an LSP that **doesn't support workspace_folders** before initaliation is finished
// the new roots are ignored.
@@ -108,7 +108,7 @@ impl Client {
// documents LSP client handle. It's doable but a pretty weird edgecase so let's
// wait and see if anyone ever runs into it.
tokio::spawn(async move {
- client.initalize_notify.notified().await;
+ client.initialize_notify.notified().await;
if let Some(workspace_folders_caps) = client
.capabilities()
.workspace
@@ -234,7 +234,7 @@ impl Client {
root_path,
root_uri,
workspace_folders: Mutex::new(workspace_folders),
- initalize_notify: initialize_notify.clone(),
+ initialize_notify: initialize_notify.clone(),
};
Ok((client, server_rx, initialize_notify))
@@ -279,7 +279,7 @@ impl Client {
"utf-16" => Some(OffsetEncoding::Utf16),
"utf-32" => Some(OffsetEncoding::Utf32),
encoding => {
- log::error!("Server provided invalid position encording {encoding}, defaulting to utf-16");
+ log::error!("Server provided invalid position encoding {encoding}, defaulting to utf-16");
None
},
})
diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs
index a59fa31e..31ee1d75 100644
--- a/helix-lsp/src/lib.rs
+++ b/helix-lsp/src/lib.rs
@@ -152,10 +152,10 @@ pub mod util {
// > ‘\n’, ‘\r\n’ and ‘\r’. Positions are line end character agnostic.
// > So you can not specify a position that denotes \r|\n or \n| where | represents the character offset.
//
- // This means that while the line must be in bounds the `charater`
+ // This means that while the line must be in bounds the `character`
// must be capped to the end of the line.
// Note that the end of the line here is **before** the line terminator
- // so we must use `line_end_char_index` istead of `doc.line_to_char(pos_line + 1)`
+ // so we must use `line_end_char_index` instead of `doc.line_to_char(pos_line + 1)`
//
// FIXME: Helix does not fully comply with the LSP spec for line terminators.
// The LSP standard requires that line terminators are ['\n', '\r\n', '\r'].
@@ -893,7 +893,7 @@ fn start_client(
/// * if the file is outside `workspace` return `None`
/// * start at `file` and search the file tree upward
/// * stop the search at the first `root_dirs` entry that contains `file`
-/// * if no `root_dirs` matchs `file` stop at workspace
+/// * if no `root_dirs` matches `file` stop at workspace
/// * Returns the top most directory that contains a `root_marker`
/// * If no root marker and we stopped at a `root_dirs` entry, return the directory we stopped at
/// * If we stopped at `workspace` instead and `workspace_is_cwd == false` return `None`
diff --git a/helix-lsp/src/snippet.rs b/helix-lsp/src/snippet.rs
index a4f049e8..ebf3da24 100644
--- a/helix-lsp/src/snippet.rs
+++ b/helix-lsp/src/snippet.rs
@@ -61,7 +61,7 @@ fn render_elements(
offset: &mut usize,
tabstops: &mut Vec<(usize, (usize, usize))>,
newline_with_offset: &str,
- include_placeholer: bool,
+ include_placeholder: bool,
) {
use SnippetElement::*;
@@ -89,7 +89,7 @@ fn render_elements(
offset,
tabstops,
newline_with_offset,
- include_placeholer,
+ include_placeholder,
);
}
&Tabstop { tabstop } => {
@@ -100,14 +100,14 @@ fn render_elements(
value: inner_snippet_elements,
} => {
let start_offset = *offset;
- if include_placeholer {
+ if include_placeholder {
render_elements(
inner_snippet_elements,
insert,
offset,
tabstops,
newline_with_offset,
- include_placeholer,
+ include_placeholder,
);
}
tabstops.push((*tabstop, (start_offset, *offset)));
@@ -127,7 +127,7 @@ fn render_elements(
pub fn render(
snippet: &Snippet<'_>,
newline_with_offset: &str,
- include_placeholer: bool,
+ include_placeholder: bool,
) -> (Tendril, Vec<SmallVec<[(usize, usize); 1]>>) {
let mut insert = Tendril::new();
let mut tabstops = Vec::new();
@@ -139,7 +139,7 @@ pub fn render(
&mut offset,
&mut tabstops,
newline_with_offset,
- include_placeholer,
+ include_placeholder,
);
// sort in ascending order (except for 0, which should always be the last one (per lsp doc))