Fix some typos in flyimport docs

This commit is contained in:
Kirill Bulatov 2021-06-12 21:51:09 +03:00
parent 85d2cd331f
commit 9c0b141dc9

View File

@ -1,10 +1,10 @@
//! Feature: completion with imports-on-the-fly //! Feature: completion with imports-on-the-fly
//! //!
//! When completing names in the current scope, proposes additional imports from other modules or crates, //! When completing names in the current scope, proposes additional imports from other modules or crates,
//! if they can be qualified in the scope and their name contains all symbols from the completion input. //! if they can be qualified in the scope, and their name contains all symbols from the completion input.
//! //!
//! To be considered applicable, the name must contain all input symbols in the given order, not necessarily adjacent. //! To be considered applicable, the name must contain all input symbols in the given order, not necessarily adjacent.
//! If any input symbol is not lowercased, the name must contain all symbols in exact case; otherwise the contaning is checked case-insensitively. //! If any input symbol is not lowercased, the name must contain all symbols in exact case; otherwise the containing is checked case-insensitively.
//! //!
//! ``` //! ```
//! fn main() { //! fn main() {
@ -23,8 +23,8 @@
//! ``` //! ```
//! //!
//! Also completes associated items, that require trait imports. //! Also completes associated items, that require trait imports.
//! If any unresolved and/or partially-qualified path predeces the input, it will be taken into account. //! If any unresolved and/or partially-qualified path precedes the input, it will be taken into account.
//! Currently, only the imports with their import path ending with the whole qialifier will be proposed //! Currently, only the imports with their import path ending with the whole qualifier will be proposed
//! (no fuzzy matching for qualifier). //! (no fuzzy matching for qualifier).
//! //!
//! ``` //! ```
@ -61,14 +61,14 @@
//! } //! }
//! ``` //! ```
//! //!
//! NOTE: currently, if an assoc item comes from a trait that's not currently imported and it also has an unresolved and/or partially-qualified path, //! NOTE: currently, if an assoc item comes from a trait that's not currently imported, and it also has an unresolved and/or partially-qualified path,
//! no imports will be proposed. //! no imports will be proposed.
//! //!
//! .Fuzzy search details //! .Fuzzy search details
//! //!
//! To avoid an excessive amount of the results returned, completion input is checked for inclusion in the names only //! To avoid an excessive amount of the results returned, completion input is checked for inclusion in the names only
//! (i.e. in `HashMap` in the `std::collections::HashMap` path). //! (i.e. in `HashMap` in the `std::collections::HashMap` path).
//! For the same reasons, avoids searching for any path imports for inputs with their length less that 2 symbols //! For the same reasons, avoids searching for any path imports for inputs with their length less than 2 symbols
//! (but shows all associated items for any input length). //! (but shows all associated items for any input length).
//! //!
//! .Import configuration //! .Import configuration
@ -79,15 +79,15 @@
//! .LSP and performance implications //! .LSP and performance implications
//! //!
//! The feature is enabled only if the LSP client supports LSP protocol version 3.16+ and reports the `additionalTextEdits` //! The feature is enabled only if the LSP client supports LSP protocol version 3.16+ and reports the `additionalTextEdits`
//! (case sensitive) resolve client capability in its client capabilities. //! (case-sensitive) resolve client capability in its client capabilities.
//! This way the server is able to defer the costly computations, doing them for a selected completion item only. //! This way the server is able to defer the costly computations, doing them for a selected completion item only.
//! For clients with no such support, all edits have to be calculated on the completion request, including the fuzzy search completion ones, //! For clients with no such support, all edits have to be calculated on the completion request, including the fuzzy search completion ones,
//! which might be slow ergo the feature is automatically disabled. //! which might be slow ergo the feature is automatically disabled.
//! //!
//! .Feature toggle //! .Feature toggle
//! //!
//! The feature can be forcefully turned off in the settings with the `rust-analyzer.completion.enableAutoimportCompletions` flag. //! The feature can be forcefully turned off in the settings with the `rust-analyzer.completion.autoimport.enable` flag.
//! Note that having this flag set to `true` does not guarantee that the feature is enabled: your client needs to have the corredponding //! Note that having this flag set to `true` does not guarantee that the feature is enabled: your client needs to have the corresponding
//! capability enabled. //! capability enabled.
use ide_db::helpers::{ use ide_db::helpers::{