sourcegraph/lib/codeintel
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
..
autoindex/config cleanup: Delete code for index job hints (#55863) 2023-08-16 08:14:32 +08:00
languages client: Obtain languages from server for file tree icons (#59234) 2023-12-29 22:34:40 +05:30
lsif bzl: convert go generate + stringer to bazel (#54619) 2023-07-07 17:31:46 +02:00
pathexistence ci: re-enable race detection (#52776) 2023-06-05 20:41:47 +02:00
precise uploads: Simplify code for streaming indexes (#54567) 2023-07-24 05:51:32 +00:00
tools Cleanup: use new go 1.21 features (#58617) 2023-11-28 13:49:38 -07:00
upload codeintel: allow configuring max concurrency in uploads v2 (#56277) 2023-08-29 15:06:14 -05:00
CODENOTIFY codenotify: dr. fritz is kil (#57313) 2023-10-03 16:19:55 +00:00