mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-18 16:08:55 +00:00
Code shown outside an editor tab (diffs, merge editor, revision browser, previews of closed files) picked its language on the frontend from the file extension, while the editor uses the backend's detection, which also checks overrides, File Types patterns and the first line. A single resolver, languageDescriptionFor, now uses the open editor's mode when the file is open and otherwise asks the backend (doc_language, replacing doc_ui_mode) to detect it from the shown text's first line, or the open buffer / file on disk, falling back to the extension only when that fails. Closes #3799 Co-authored-by: bertyhell <1710840+bertyhell@users.noreply.github.com>