feat: add show_local_diagnostics_in_panel config option
This commit is contained in:
parent
d16e64963e
commit
60ba0e6544
2 changed files with 16 additions and 13 deletions
|
|
@ -40,6 +40,7 @@ top_bar: []const u8 = "tabs",
|
||||||
bottom_bar: []const u8 = "mode file log selection diagnostics keybind branch linenumber clock spacer",
|
bottom_bar: []const u8 = "mode file log selection diagnostics keybind branch linenumber clock spacer",
|
||||||
show_scrollbars: bool = true,
|
show_scrollbars: bool = true,
|
||||||
show_fileicons: bool = true,
|
show_fileicons: bool = true,
|
||||||
|
show_local_diagnostics_in_panel: bool = false,
|
||||||
scrollbar_auto_hide: bool = false,
|
scrollbar_auto_hide: bool = false,
|
||||||
|
|
||||||
start_debugger_on_crash: bool = false,
|
start_debugger_on_crash: bool = false,
|
||||||
|
|
|
||||||
|
|
@ -968,9 +968,11 @@ const cmds = struct {
|
||||||
tp.extract(&sel.end.col),
|
tp.extract(&sel.end.col),
|
||||||
})) return error.InvalidAddDiagnosticArgument;
|
})) return error.InvalidAddDiagnosticArgument;
|
||||||
file_path = project_manager.normalize_file_path(file_path);
|
file_path = project_manager.normalize_file_path(file_path);
|
||||||
if (self.get_active_editor()) |editor| if (std.mem.eql(u8, file_path, editor.file_path orelse ""))
|
if (self.get_active_editor()) |editor| if (std.mem.eql(u8, file_path, editor.file_path orelse "")) {
|
||||||
try editor.add_diagnostic(file_path, source, code, message, severity, sel)
|
try editor.add_diagnostic(file_path, source, code, message, severity, sel);
|
||||||
else
|
if (!tui.config().show_local_diagnostics_in_panel)
|
||||||
|
return;
|
||||||
|
};
|
||||||
try self.add_find_in_files_result(
|
try self.add_find_in_files_result(
|
||||||
.diagnostics,
|
.diagnostics,
|
||||||
file_path,
|
file_path,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue