Skip to content

Commit 17dfcf5

Browse files
idanaryeautozimu
authored andcommitted
Add DiagnosticsList::Disabled option
When picked, neither the quickfix list nor the loclist will be modified by LanguageClient-neovim.
1 parent 690c1d4 commit 17dfcf5

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

doc/LanguageClient.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Valid options: "off" | "messages" | "verbose"
142142
List used to fill diagnostic messages.
143143

144144
Default: "Quickfix"
145-
Valid options: "Quickfix" | "Location" | |v:null|
145+
Valid options: "Quickfix" | "Location" | "Disabled"
146146

147147
2.9 g:LanguageClient_diagnosticsEnable *g:LanguageClient_diagnosticsEnable*
148148

src/languageclient.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,6 +1676,7 @@ pub trait ILanguageClient: IVim {
16761676
bail!("Failed to set location list!");
16771677
}
16781678
}
1679+
DiagnosticsList::Disabled => {}
16791680
}
16801681

16811682
let current_filename: String = self.eval(VimVar::Filename)?;

src/types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ impl FromStr for SelectionUI {
173173
pub enum DiagnosticsList {
174174
Quickfix,
175175
Location,
176+
Disabled,
176177
}
177178

178179
impl Default for DiagnosticsList {
@@ -188,6 +189,7 @@ impl FromStr for DiagnosticsList {
188189
match s.to_ascii_uppercase().as_str() {
189190
"QUICKFIX" => Ok(DiagnosticsList::Quickfix),
190191
"LOCATION" => Ok(DiagnosticsList::Location),
192+
"DISABLED" => Ok(DiagnosticsList::Disabled),
191193
_ => bail!("Invalid option for LanguageClient_diagnosticsList: {}", s),
192194
}
193195
}

0 commit comments

Comments
 (0)