List of all supported languages and their file extensions for .gitignore and gist - gitignore

Is it possible to get list of all github supported languages for gist files and projects (.gitignore)? List of .gitignore supported languages displayed on the image below on the left side. And list of all gist languages is on the right side.
Also it would be greatfull to get list of appropriate extensions to these languages.

Related

How to search by two keywords in IDE (WebStorm and/or VSCode)

I work on a project with a huge codebase. I need to find files where both "token" and "subscription" are mentioned. If I search separately (token or subscription) I get hundreds of files with mentions of these words.
Is there any way to search for files where both keywords are mentioned?
I work with WebStorm and Visual Studio Code.

How to localise VSCode extension

I wrote a VS Code extension to support printing. Since all the recent issues have been concerned with issues relating to foreign character sets, it seems like I should support languages other than English.
But I can't find anything in on localisation in the VS Code API documentation. There's a section on languages but that's about parsing and syntax colouring etc for computer languages.
Is there any support or at least convention regarding localisation of VS Code extensions?
Thanks to Gama11 for pointing me at good resources.
Yes, this is possible, and there is actually a I18n sample extension for this:
https://github.com/microsoft/vscode-extension-samples/tree/master/i18n-sample
It's best if you read the readme, but the basic idea is the following:
use the vscode-nls-dev NPM package
use NLS identifiers such as "%extension.sayHello.title%" as placeholders for command titles and such in package.json
similarly, in JS code NLS identifiers can be translated with a localize() method imported from vscode-nls
have a toplevel i8n directory that contains the translations for those identifiers for the languages that are supported in <file-name>.i18n.json files
Alternatively, you could also take a look at how the C++ extension does it:
https://github.com/microsoft/vscode-cpptools/tree/master/Extension
They seem to take a slightly different approach: no i8n directory, but instead have the translations directly next to the file (package.nls.it.json, package.nls.zh-cn.json and package.nls.json with the default / English). I'm not sure if it translates anything outside of package.json / in JS code though.
The official l10n (localization) sample extension should help a lot, as the old i18n (internationalization) sample has been deprecated.
Clone it here: https://github.com/microsoft/vscode-extension-samples/tree/main/l10n-sample

Finding popular open source projects on Github using a specific library

I looked through Github search docs for repos and code and I am not sure if it is possible.
I want to find popular open source projects that use a specific library to see how they handle particular design patterns. In my case, I am looking for popular Android projects that use Dagger 2.
I tried using a code search for com.google.dagger:dagger-android-processor: in .gradle which gives me 14k+ results for mostly unpopular projects. I would basically just want to sort by forks/stars, which is not an option as far as I can see.
If this is not possible with Github's search I am happy with any alternative.
For projects that use one of the package managers ​​which is supported by GitHub (RubyGemsm, NPM, PyPI, Maven, Nuget), you can use ghtopdep
Related issue
A Code search would not allow sorting through repository stars (as stated here)
Maybe:
using a BigQuery would allow using that criteria (like this one)
or using GraphQL

Goto definition like feature in custom (user-defined) language in notepad++

Is there any way (by means of plugins or settings) to create (by that I mean modifying, adding & deleting) custom tags in notepad++?
By tags I mean, to jump to the definition of an instance used anywhere in project (some kind of like 'goto definition' function like we have in other popular languages like C, C++, C#).
I searched for this topic but could not find satisfactory result.
My requirement:
I have created a custom language in Notepad++ (by adding keywords, coloring patterns and other rules). Now I need the way to add custom tags for this language. How can I achieve this?
With the help of tags I should be able to navigate to definition (just like goto definition in other popular languages) in the particular project (all files in project or at least opened files).
Now I need the way to add custom tags for this language. How can I achieve this?
If you're using Exuberant Ctags you can configure a new language definition using just a handful of regular expressions.
For example this link shows how to configure ctags for the Clipper language using this regexp approach:
I have just had to deal with essentially the same issue. I am using Notepad++ with a legacy codebase written in a custom markup language. Each file can contain cross references to definitions in other files, so a way of jumping to the definition would be very useful.
It has not been easy to find a solution that meets all four requirements: a goto definiton feature that works across multiple files and for a custom language in Notepad++. I found this question while searching for a solution; the answer jussij provided is good but it does not really provide a complete solution.
I ended up using the SourceCookifier plugin with a custom language definition. There is not a huge amount of guidance online about how to use it, but once installed you can use it to manually create a language definition using regex rules.
SourceCookifier will work for your language if you can configure the following:
A set of file extensions used by the language
A set of tag types (i.e. a function, class, variable)
A set of POSIX Basic Regular Expressions for locating each tag type, see this post
Once a language has been defined, you can highlight any instance of a found tag and use the shortcut Ctrl+Shift+Enter to jump to the definition of that tag. This can work across a whole codebase of files if you provide it with a list of files to inspect, it calls this a 'session'. All you need to do is drag and drop your codebase folder into the SourceCookifier sidebar window. The codebase I was working with is very large, so I am only using basic functionality, see this post for a good explination of that. The goto definition shortcut can also be added to a right-click context menu, see this post.

Github language tag for Repository

On Github, some projects are tagged as being of one language or another. How do I add one of these tags. (Objective C, PHP etc.)
As far as I know, they aren't really tagged - the languages attached to them are the languages which you use in your project. Github looks through the source and figures out to the best of its ability what languages are in use.
If you go to your respository, then to the Graphs tab, you can see the language breakdown.
A repository can only be "tagged" with a single language in the search results. That language is the first from language statistics. Language statistics are computed by the open source project Linguist according to the total size of files for each language detected.
You can override language statistics using Linguist overrides. In particular, you can choose to ignore some files from statistics:
directory/to/ignore/* linguist-vendored
*.somextensiontoignore linguist-vendored
or override the detected language:
*.js linguist-language=Java
You should be able to Publish or Initial Commit with a sample file specific to the language you want it tagged as (such as an empty .cs file or .js file), then add your whole project; however, it seems like a pain.
I did find if you go to 'Add topics' on the far left under the 'Code' section, you can add all the languages you used for anyone that might be looking close enough at your project.
Make .gitattributes file in the root.Then depending on the language type make the below command true.So if your project is Javascript make it true, if your project is java make it true and so on.Push the code and refresh the page.
So now the desired language should get displayed in your git repo.
*.js linguist-detectable=true
*.java linguist-detectable=false
*.html linguist-detectable=false
*.xml linguist-detectable=false