sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: Snippets: Scope by specific file or pattern
Labels: help wanted,feature-request,snippets

Global snippets already support being scoped by language and language file snippets are naturally scoped.  I would like to expand that "scoping" logic to specific files by matching the filename, for example.

A good use case for this, let's say I want to create snippets for travis.yml file. Right now what I do is to create the snippet scoped to YAML language. 

The problem is that it will appear for every YAML file which will pollute the autocomplete with not very useful results if you have snippets for multiple kinds of files that have the same extension. (I don't want to see "travis"  related snippets in a "gitlab-ci.yml" file for example) as they are not applicable.

I think this is most critical for configuration files where they have a very specific scope and that you can easily restrict by looking at the filename.

Going further, we could even expand this concept for other kinds of snippets. For example, I can have some project level snippets for building queries and I only want to enable them, in Repository classes and not in Controller classes. You could scope the files it applies using a regex pattern, for example.

I guess this shouldn't be very hard to do and it would vastly improve the suggestions quality of the snippets.

I see adding a new field similar to "scope" called "context" or something where you can specify a regex that will match to the filename.
Repository: rust
Issue: Use getrandom crate for retrieving system entropy?
Labels: C-enhancement,T-libs-api

Right now `std` and [`getrandom`](https://github.com/rust-random/getrandom) essentially duplicate each other. And Rust already depends on `rand` (via `tempfile`) which in v0.7 will use `getrandom`. So I think it makes sense to use a single implementation, to keep work on correctly retrieving system entropy focused in one place.

Note that right now I do not propose to expose `getrandom` API as part of `std` or introduce a lang item, it's a separate discussion, see rust-random/getrandom#21. Also it's probably will be better to wait until rust-random/getrandom#13 will be closed, which should happen relatively soon.

cc @dhardy @tarcieri
Repository: terminal
Issue: Feature Request - Extend Scheme Features
Labels: Issue-Feature,Area-Settings,Product-Terminal

# Summary of the new feature/enhancement

<!-- 
A clear and concise description of what the problem is that the new feature would solve.
Describe why and how a user would use this new functionality (if applicable).
-->

Allow stylistic properties of a profile to be set by a scheme so these properties do not need to be duplicated among profiles. These properties should also have global default values.

# Proposed technical implementation details (optional)

<!-- 
A clear and concise description of what you want to happen.
-->

Suggested properties:

* `acrylicOpacity`
* `useAcrylic`
* `fontFace`
* `fontSize`
* `cursorShape`
* `padding`

Additionally, any of the properties set by a scheme should be able to be overridden by the profile, as is the case for `background`.

The style of the UI would be determined in this way:
1. Check for properties in the profile
2. Check for any missing properties in the scheme
3. Set any remaining properties using their global defaults
Repository: neovim
Issue: digraph insertion replaces next character temporarily
Labels: enhancement,display,core

<!-- Before reporting: search existing issues and check the FAQ. -->

- `nvim --version`: v0.4.0-474-gdfb7f6b34
- Vim (version: 8.1) behaves differently? no
- Operating system/version: Ubuntu
- Terminal name/version: conhost 18362
- `$TERM`: xterm-256color

### Steps to reproduce using `nvim -u NORC`

```
nvim -u NORC
ix←^k
```

### Actual behaviour
The previously entered `x` is overwritten with the digraph-in-progress `?` 

### Expected behaviour
The `?` should be inserted where the new digraph is expected to be inserted, rather than overwriting the next character.  In my case, the digraph I was inserting was based off of the next character, which I could no longer see.
Repository: flutter
Issue: Improve rendering of rectangular icons
Labels: framework,f: material design,a: quality,customer: crowd,P2,team-design,triaged-design

## The problem
Any non trivial app is likely to use external icon packages, like FontAwesome, which not always have perfectly squared icons. Unfortunately, rectangular icons are not guaranteed to be rendered correctly and in fact they're not. For example, they are not properly centered: https://github.com/flutter/flutter/issues/24054.

Another thing you may consider a "problem" is that different fonts may have uneven sizes (e.g. FontAwesome). In fact, the above issue with centering is related to the fact that some FontAwesome rectangular icons are wider than `size` pixel at `fontSize=size`.

## Proposal
Solving the centering problem is trivial just by passing `textAling: TextAlignment.center` to the `RichText` in `Icon.build`. I have a ready PR for that but I wanted to discuss an alternative solution before submitting it. 

If you consider the uneven size between fonts a problem, or you simply want to avoid overflowing the `SizedBox`, then one could think to wrap the `RichText` with a `FittedBox` widget. The problem of uneven font sizes is not completely solved but is alleviated for sure.

Is there any particular reason for not using a `FittedBox`? Does it affect performances in a significant way?

Let me know which solution you prefer (if any) and I'll submit a PR.
Repository: godot
Issue: Better node boundary box identification
Labels: enhancement,topic:editor,usability,topic:2d

There might be some confusion when working with certain nodes that involve placing control points (such as Path2D) and the node's boundary box:

![image](https://user-images.githubusercontent.com/11788042/59980655-94f92380-9601-11e9-9a8d-e5907f496618.png)

This is what a newly created Path2D node looks like - is the red dot a curve control point? Not knowing beforehand, I'd say yes, but creating a new Point makes the original one disappear. Or, if grid snap is enabled, a new one appears alongside the old one (which isn't even a control point)

![image](https://user-images.githubusercontent.com/11788042/59980700-29638600-9602-11e9-8172-097a9d51d24a.png)

Continuing to add more points leads to even more of them showing up, often overlapping and are quite confusing.

![image](https://user-images.githubusercontent.com/11788042/59980707-4435fa80-9602-11e9-8cbe-1223fdba5bc6.png)

![image](https://user-images.githubusercontent.com/11788042/59980709-4ac47200-9602-11e9-9445-8b2ed4c4eec3.png)
![image](https://user-images.githubusercontent.com/11788042/59980714-557f0700-9602-11e9-9aa5-6577e92cba67.png)

I think a better way of handling this would be differently colored / shaped boundary rectangle points or the option of disabling it.
Repository: create-react-app
Issue: Allow recovery from invalid ~/.yarn/bin/create-react-app
Labels: issue: proposal

### Is this a bug report?
Is an enhancement request (your template doesn't cover this as enhancement requests are neither bugs, nor questions or discussion).

### Did you try recovering your dependencies?
Doesn't apply afaik (see steps to reproduce)

### Which terms did you search for in User Guide?
None, I'm suggesting an enhancement from the "Don't make me think" perspective of design. Any search result would be irrelevant afaik.

### Environment
```
> npx create-react-app --info
npx: Installierte 91 in 10.266s

Environment Info:

  System:
    OS: Linux 5.0 Ubuntu 19.04 (Disco Dingo)
    CPU: (8) x64 Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz
  Binaries:
    Node: 10.15.2 - /usr/bin/node
    Yarn: 1.16.0 - /usr/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: 67.0.3
  npmPackages:
    react: Not Found
    react-dom: Not Found
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found
```

### Steps to Reproduce

1. change into `/tmp`
2. run `yarn create react-app my-app` following the `README` or this project


### Expected Behavior
The tool should create the react app and handle all recoverable error gracefully or present choosable actions to the user to handle errors.

### Actual Behavior
```
> yarn create react-app my-app
yarn create v1.16.0
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "create-react-app@3.0.1" with binaries:
      - create-react-app
error An unexpected error occurred: "ENOENT: no such file or directory, chmod '/home/richter/.yarn/bin/create-react-app'".
info If you think this is a bug, please open a bug report with the information provided in "/home/richter/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
```

`/home/richter` is my `HOME` directory

This is causes by `/home/richter/.yarn/bin/create-react-app` being a symlink pointing to an inexisting file:

```
> stat ~/.yarn/bin/create-react-app 
  File: /home/richter/.yarn/bin/create-react-app -> ../../.config/yarn/global/node_modules/.bin/create-react-app
  Size: 60        	Blocks: 0          IO Block: 4096   symbolic link
Device: fd03h/64771d	Inode: 3289638326  Links: 1
Access: (0777/lrwxrwxrwx)  Uid: ( 1000/ richter)   Gid: ( 1000/ richter)
Access: 2019-06-23 21:27:31.034193522 +0200
Modify: 2019-06-23 21:23:15.094737846 +0200
Change: 2019-06-23 21:23:15.094737846 +0200
 Birth: -
```

Since removal of `~/.yarn/bin/create-react-app` doesn't fix the issue there seems to be a tool or dependency misbehaving. This might be a user error, but as I pointed out, my interest is to make users in the same situation to "not think".

`npx create-react-app my-app` successfully creates a react app.

### Reproducible Demo
Trivial based on steps to reproduce.
Repository: terminal
Issue: Feature Request: Option for ColorTool to read color theme from registry like conhost
Labels: Issue-Feature,Product-Colortool,Help Wanted,Area-Settings

# Summary of the new feature/enhancement

The new Windows Terminal should have an option to set "HKCU\Console" as the source of its color theme instead of specifying the colors in the JSON.

If this were to be the default setting it would make transitioning easier as a users previously customized theme just carries over to WT. Even if it were not the default though, the option to do this would be nice to enable the user to easily theme both conhost and wt consistently from one place instead of having to maintain two configurations (registry for conhost, json for wt)

# Proposed technical implementation details (optional)

"Source Registry settings" (or similar name) should be added as an option for the theme, if a settings GUI is planned then it would be sitting right along the other color schemes inside the theme-selection combobox. Alternatively, it could be a checkbox sitting above the Theme-selection combobox that disables the combobox when checked. Either way, choosing this option, wt would source its color configuration from the ColorTableXX and CursorColor keys in HKCU\Console
Repository: TypeScript
Issue: parseInt: use more concrete type for `radix` argument
Labels: Suggestion,Awaiting More Feedback

## Search Terms

parseInt, radix

## Suggestion

From MDN docs:
`radix: An integer between 2 and 36 that represents the radix`
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt#Parameters

TS definition (lib.es5.d.ts):
```ts
declare function parseInt(s: string, radix?: number): number;
```
It will be safer to use more concrete type for radix:
```ts
type TRadix =
2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32|33|34|35|36

function safeParseInt(s: string, radix?: TRadix) {
  return parseInt(s, radix)
}
```

## Use Cases

```ts
['1', '7', '11'].map(safeParseInt) // error -> Type 'number' is not assignable to type 'TRadix' ("strictFunctionTypes": true)
```

## Examples

```ts
['1', '7', '11'].map(item) => safeParseInt(item, 10)) // OK

const config = {
  nested: {
    number: '42',
    radix: 10,
  },
} as const;
safeParseInt(config.nested.number, config.nested.radix)) // OK
```

## Checklist

My suggestion meets these guidelines:

* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: ant-design
Issue: [Message] - Option 'closableOnHover' to prevent closing of message affected by mouse
Labels: help wanted,Inactive

- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### What problem does this feature solve?
Current version of message will not close according to the 'duration' set when I mouse over on it. Having an option to enable/disable this would be great.

### What does the proposed API look like?
Add an option to the current message, such as 'closableOnHover'.


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: go
Issue: x/crypto/acme: Bad error description if website reject authorization query
Labels: NeedsInvestigation

1. Website reject authorization from Lets encrypt with 403 error.
2. Lets encrypt can't authorize domain and return error.
3. Library error return description ""acme: authorization error for : " in err.Error() after WaitAuthorization <-- PROBLEM

Ideal description in error I see as:
"acme: authorization error for 'domain': website reject authorization error with 403 status"

```golang
fmt.Printf("%#v", err)
```

```
&acme.AuthorizationError{URI:"https://acme-staging.api.letsencrypt.org/acme/challenge/XXX/YYY", Identifier:"", Errors:[]error(nil)}
```


curl https://acme-staging.api.letsencrypt.org/acme/challenge/XXX/YYY
```
{
  "type": "http-01",
  "status": "invalid",
  "error": {
    "type": "urn:acme:error:unauthorized",
    "detail": "Invalid response from http://ZZZ/.well-known/acme-challenge/HfS3oxj9D7WXST1VKtnDMxeLxTvgn62oLWwYWw-SplQ [XXX]: \"\u003c!DOCTYPE HTML PUBLIC \\\"-//IETF//DTD HTML 2.0//EN\\\"\u003e\\n\u003chtml\u003e\u003chead\u003e\\n\u003ctitle\u003e403 Forbidden\u003c/title\u003e\\n\u003c/head\u003e\u003cbody\u003e\\n\u003ch1\u003eForbidden\u003c/h1\u003e\\n\u003cp\"",
    "status": 403
  },
  "uri": "https://acme-staging.api.letsencrypt.org/acme/challenge/XXX/YYY",
  "token": "ASD-ASD",
  "validationRecord": [
    {
      "url": "http://XXX/.well-known/acme-challenge/AAA",
      "hostname": "XXX",
      "port": "80",
      "addressesResolved": [
        "YYY"
      ],
      "addressUsed": "ZZZ"
    }
  ]
}
```
Repository: pytorch
Issue: Automatic rank selection when using file:// initialization method
Labels: oncall: distributed,triaged,enhancement

## 🚀 Feature

Process rank can be automatically determined when using the `file://` initialization method.

## Motivation

This used to be possible prior to version 1.0. There is no specific reason NOT to support this and makes for easier usage when running multiple processes on the same machine.

## Pitch

In `torch/distributed/rendezvous.py` we can remove the check for the `rank` argument. If it is not specified, we can determine rank by doing an atomic add on the key `rank` (for example). The first process to get there will be rank 0. The key will increment up to `world_size - 1`.

Beware to also update the docs at `docs/source/distributed.rst` and the changelog.

Motivated by https://discuss.pytorch.org/t/automatic-rank-assignment-in-init-process-group/44554
Repository: terminal
Issue: Feature Request - MP4 backgrounds
Labels: Issue-Feature,Help Wanted,Area-Settings,Product-Terminal

# Summary of the new feature/enhancement

Currently, GIF animated backgrounds are supported. I'm not sure what other formats are - but mp4 would be great. I'm using a ~110MB gif and it uses ~10% CPU - the mp4 would be much smaller.
Repository: go
Issue: x/tools/gopls: provide function that gives list of candidate imports matching pattern
Labels: NeedsInvestigation,FeatureRequest,gopls,Tools

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version devel +44c9354c5a Fri Jun 21 05:21:30 2019 +0000 linux/amd64
$ go list -m golang.org/x/tools
golang.org/x/tools v0.0.0-20190620191750-1fa568393b23
$ go list -m golang.org/x/tools/gopls
golang.org/x/tools/gopls v0.0.0-20190620191750-1fa568393b23
</pre>

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/home/myitcv/gostuff/src/github.com/myitcv/govim/cmd/govim/.bin"
GOCACHE="/home/myitcv/.cache/go-build"
GOENV="/home/myitcv/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/myitcv/gostuff"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/myitcv/gos"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/myitcv/gos/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/myitcv/gostuff/src/github.com/myitcv/govim/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build670036660=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

Much like `gopls` offers completion candidates, it should provide a function that allows editors to tab-complete/fuzzy match/whatever packages to import. 

For example, in `govim` we want to provide the command `GOVIMAddImport` such that when we type:

```
:GOVIMAddImport en<Tab>
```

(where `<Tab>` is us looking to complete the import), we should be able to call `gopls` and get a list of import candidates matching `en` (according to some algorithm)

Reference: https://github.com/myitcv/govim/issues/317

---

cc @stamblerre @ianthehat
Repository: godot
Issue: [Bullet] Adding a high amount of physics bodies is significantly slower with Bullet compared to GodotPhysics
Labels: bug,topic:physics,topic:3d,performance

Godot version: Godot 3.1.1
OS/device including version: Windows 10 

Issue description:
When I'm adding 100,000 StaticBodies to the scene, each with CollisionShape, and set on each CollisionShape.disable to true, I have 1 FPS. But when I change to GodotPhysics, I have stable 60 FPS.
Event better, if I use GodotPhysics and set on each CollisionShape.disable to false, I still have 60 FPS (and when using Bullet - 1 FPS).

Steps to reproduce:
Do what I have wrote in Issue description

Here is a little sample project. Camera is not needed
[Link](http://www.lathuys.cba.pl/QuickSample.zip)
Repository: vue
Issue: Can't use the new v-slot syntax inside a template tag that is there only for conditional purposes
Labels: improvement

### Version
2.6.10

### Reproduction link
[https://codesandbox.io/s/vue-template-9r28t](https://codesandbox.io/s/vue-template-9r28t)

### Steps to reproduce
Visit the repo and check out the template compilation error for `App.vue`. Remove the `<template v-else>` to get rid of the error.

### What is expected?
The template compiles properly

### What is actually happening?
The template doesn't comiple

---
Vue should allow to use slots inside a template tag that is inside component. Without this, the new slot syntax severely limits how one can put content into slots in more complex scenarios and forces repeating yourself on multiple template tags.

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: flutter
Issue: Separate callbacks for TextEditingController's text and selection
Labels: a: text input,c: new feature,framework,P3,team-framework,triaged-framework

## Use case

I need to re-populate a list with results of search based on user typing
When the edit gets (de-)focused the TextEditingController's event is triggered as if the actual content changed.

## Proposal

Change TextEditingController so that it has two callbacks instead of one.
Assume it should also fix https://github.com/flutter/flutter/issues/34847
Repository: TypeScript
Issue: import ConstJson from './config.json' as const;
Labels: Suggestion,Awaiting More Feedback



## Suggestion

The ability to get const types from a JSON configuration file.

If the json is:

```json
{
  "appLocales": ["FR","BE"]
}
```

I want to import the JSON and get a `{appLocales: "FR" | "BE"}` type instead of `string`

As [suggested here](https://github.com/microsoft/TypeScript/issues/32063#issuecomment-1708847986), this could rely on ES import attributes (stage 4, ES2025, [TypeScript 5.3](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-3.html)):

```ts
import data from "./data.json" with { type: "json", const: true };
```

## Use Cases

The current approach gives a too broad type `string`. I understand it makes by default, but having the possibility to import a narrower type would be helpful: it would permit me to avoid maintaining both a runtime locale list + a union type that contains the values that are already in the list, ensuring my type and my runtime values are in sync.

It is possible to [type a JSON file](https://www.totaltypescript.com/override-the-type-of-a-json-file) explicitly using [`allowArbitraryExtensions: true`](https://www.typescriptlang.org/tsconfig/#allowArbitraryExtensions) and a `.d.json.ts` file, but this doesn't permit to infer the type from the JSON directly, requires explicit typing and maintenance.

## Checklist

My suggestion meets these guidelines:

* [X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [X] This wouldn't change the runtime behavior of existing JavaScript code
* [X] This could be implemented without emitting different JS based on the types of the expressions
* [X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [X] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).

## Links:

This feature has been mentioned:
- by @qm3ster and @maartenth https://github.com/microsoft/TypeScript/pull/29510#issuecomment-456833107
- by @m-b-davis https://github.com/Microsoft/TypeScript/issues/26552#issuecomment-496925984

## Search Terms

json const assertion import attributes with allowArbitraryExtensions