Skip to content

Diagnostics

Diagnostics come from the language servers for your files. Tyrn works with servers that push diagnostics and with servers that are asked for them, so it works with essentially any server.

In the editor

Problems are underlined in the editor and marked in the scrollbar. Hover an underline to read the full message.

  • f8 goes to the next diagnostic and shift-f8 to the previous one. A popover shows the message.
  • cmd-. opens code actions, which often include quick fixes.
  • diagnostics_max_severity limits what the editor shows. Values are "off", "error", "warning", "info", "hint" and "all" (default).
  • scrollbar.diagnostics controls the scrollbar marks. Values are "none", "error", "warning", "information" and "all".

Project diagnostics

Open the project-wide list with cmd-shift-m, or click the diagnostics button in the status bar. It is a multibuffer, so you can fix problems in place. Inside the view, ctrl-r toggles automatic refresh.

settings.json
{
"diagnostics": {
"button": true,
"include_warnings": true
}
}

Inline diagnostics

Show messages at the end of the line, like an error lens. They are off by default. Turn them on in settings:

settings.json
{
"diagnostics": {
"inline": {
"enabled": true,
// null inherits diagnostics_max_severity
"max_severity": null,
"update_debounce_ms": 150,
"padding": 4,
"min_column": 0
}
}
}

Project panel and tabs

Color file names by severity in the project panel with project_panel.show_diagnostics ("off", "errors", "all", default "all"). Add error and warning counts with project_panel.diagnostic_badges (default false).

Tabs can be colored too with tabs.show_diagnostics ("off" default, "errors", "all"). Tab diagnostics show only when tabs.file_icons is on.