4 ms·
I'm Colin from GitHub's code search team, happy to answer any questions. For more info on how we built this, you can check out our technical blog post from a f
by colin353 3y ago
I'm Colin from GitHub's code search team, happy to answer any questions.
For more info on how we built this, you can check out our technical blog post from a few months ago https://github.blog/2023-02-06-the-technology-behind-githubs-new-code-search/ https://github.blog/2023-02-06-the-technology-behind-githubs...
- davidrjenni 3y agoHow does it compare to Sourcegraph? What is the main differentiator?
- panic 3y agoAre you planning to release code search as open source? I can’t find a link to the source code anywhere.
- jhgg 3y agoIt would be really awesome if code search could one day consume LSIF for precise results in its index similar to source graph. The symbol search is good now, but approximate. Having more precise code search by allowing devs to upload LSIF data in their CI pipelines would allow for precise symbol search (go to definition / find usages actually being accurate) and remove irrelevant result.
- colin353 3y agoGreat point. Yes, we initially focused on zero-config approximate code navigation. But we do intend to support build-based code navigation in the future, since the approximate code navigation experience can be pretty poor for some languages (e.g. C/C++).
- lexh 3y agoWill this make it to GH enterprise eventually?
- dmix 3y agoAny plans to add support for Vue SFC syntax highlighting? Edit: correction it looks like that's been fixed since last week, nm
- catchmeifyoucan 3y agoLoving the new Code Search! Might be super specific, but is there any syntax for searching attributes in HTML elements. For example if a React Component called <Button ...some-props color="red" /> what's the best way to find all the buttons that are red?
- colin353 3y agoHmm, you can construct a regular expression, something like: lang:tsx /<Button[^\\].\* color="red"/ Example: https://github.com/search?q=lang%3Atsx+%2F%3CButton%5B%5E%5C%5C%5D.*+color%3D%22red%22%2F&type=code https://github.com/search?q=lang%3Atsx+%2F%3CButton%5B%5E%5C...
- arthurcolle 3y agoYou can do code blocks with 4 consecutive spaces. Backticks are not supported unfortunately
- catchmeifyoucan 3y agoOoh nice, this looks great! Thanks!!
- airstrike 3y agoI imagine a future in which this is integrated into vscode so I can go from an error message in the terminal to a search through my code + third-party modules that my code is importing
- r9295 3y agoYou can already do that by including your module folder (eg. node_modules, site-packages etc) in your project tree
- thinkingemote 3y agoGreat stuff, is there any update on searches which include code in branches? I often manually find interesting work done in development branches of cloned repos of the one I'm focused on but which never sees the light of day and not found in search. I imagine having the network also part of the search would be a good facet.
- thisoneworks 3y agoI don't see anything in https://docs.github.com/en/search-github/github-code-search/understanding-github-code-search-syntax https://docs.github.com/en/search-github/github-code-search/... :/
- s3graham 3y agoI've been using it for a few weeks, and it's a great improvement, congrats on the launch. (Pleeeease make the right click context menu just be the normal default menu though, I (apparently) "Right-click > Back" a lot when using a mouse rather than a trackpad and I keep getting that goofy Emoji dialog.)