sourcegraph/lib/codeintel/languages
Varun Gandhi b1f7ee0547
client: Obtain languages from server for file tree icons (#59234)
To determine the icon to show for a file, we need to know
the language. The code previously relied on the getFileInfo
API which did this using file extensions, leading to
incorrect results for header files with the '.h' extension,
which could have either C, C++ or Objective-C code.

Instead, we now get the language from the server,
where the go-enry library can optionally use the file
contents to return a more appropriate result.

Consequently, we can remove the getFileInfo API altogether.

Updates both the React and Svelte versions of the code.

Other changes in this patch:

- I've added icons for a bunch of languages which were missing.
- I've centralized the icon lists (and the bulk of the related logic) for
   both React and Svelte in one place.
2023-12-29 22:34:40 +05:30
..
BUILD.bazel client: Obtain languages from server for file tree icons (#59234) 2023-12-29 22:34:40 +05:30
languages_test.go client: Obtain languages from server for file tree icons (#59234) 2023-12-29 22:34:40 +05:30
languages.go client: Obtain languages from server for file tree icons (#59234) 2023-12-29 22:34:40 +05:30