mirror of
https://github.com/nushell/nushell.git
synced 2025-08-15 23:28:19 +02:00
fix(completion): edge cases of operator completions (#15169)
# Description Improves the completeness of operator completions. Check the new test cases for details. # User-Facing Changes # Tests + Formatting +4 # After Submitting
This commit is contained in:
@ -705,7 +705,8 @@ impl LanguageServer {
|
||||
.map(|kind| match kind {
|
||||
SuggestionKind::Type(t) => t.to_string(),
|
||||
SuggestionKind::Command(cmd) => cmd.to_string(),
|
||||
SuggestionKind::Module => "".to_string(),
|
||||
SuggestionKind::Module => "module".to_string(),
|
||||
SuggestionKind::Operator => "operator".to_string(),
|
||||
})
|
||||
.map(|s| CompletionItemLabelDetails {
|
||||
detail: None,
|
||||
@ -754,6 +755,7 @@ impl LanguageServer {
|
||||
nu_protocol::engine::CommandType::External => Some(CompletionItemKind::INTERFACE),
|
||||
_ => None,
|
||||
},
|
||||
SuggestionKind::Operator => Some(CompletionItemKind::OPERATOR),
|
||||
SuggestionKind::Module => Some(CompletionItemKind::MODULE),
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user