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",
|
||||
show_scrollbars: bool = true,
|
||||
show_fileicons: bool = true,
|
||||
show_local_diagnostics_in_panel: bool = false,
|
||||
scrollbar_auto_hide: bool = false,
|
||||
|
||||
start_debugger_on_crash: bool = false,
|
||||
|
|
|
|||
|
|
@ -968,9 +968,11 @@ const cmds = struct {
|
|||
tp.extract(&sel.end.col),
|
||||
})) return error.InvalidAddDiagnosticArgument;
|
||||
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 ""))
|
||||
try editor.add_diagnostic(file_path, source, code, message, severity, sel)
|
||||
else
|
||||
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);
|
||||
if (!tui.config().show_local_diagnostics_in_panel)
|
||||
return;
|
||||
};
|
||||
try self.add_find_in_files_result(
|
||||
.diagnostics,
|
||||
file_path,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue