{"query_id": "q-en-vscode-9d44a6a46c7e70592c3cbbe4edc499fd1aacb4d06549a94f11919cc1b0aeaee9", "query": "If this key is set, all telemetry information generated in a debug session of the corresponding debug type will be tagged with that key (so that the data is routed to the correct bucket). what would be a good name for that key? (it should match the name used in other places where this key is used).\nthis is probably something you want to use...\nThe functionality for reporting telemetry only supports application insights pipeline, so I suggest calling it something explicit as .\nwe are not using acronyms in our protocol at all, so not a big fan of , I would rather go with . I would put it as a top level attribute under in the . If this is not provided I would ignore the telemetry event so we never mix the adapter telemtery with our vscode telemetry. What do you think?\nyes, put aiKey at the top of . What's about our own debug adapters? Do we get our own keys for them so that their telemetry events go to vscode telemetry?\nWhat we do we with the current adapters telemetry? do we depend on any of them in our current active reporting? If not, let's put them in the standard first party extensions pipeline. Otherwise, we can use the same vscode key, if so I would want make sure that adds standard properties such as machineId and sessionId so the processing scripts can function normally.\nFor Microsoft owned debug adapters, wouldn't we want their telemetry in the same stream as VS Code so that one could look at all activity for the same session? Or are there other good ways to tie that together?\npreviously we were reporting telemetry events of all debug adapters to vscode. With the new mechanism we don't do this any more, so we have to make sure that the node-debug adapter (which is shipping with vscode) still gets reported in the same way as before. So I will set the aiKey.", "positive_passages": [{"docid": "doc-en-vscode-50f7c8ea31b468e72b8b792f523e21b94c2ae35191afcb84c9afe7b2dde9e46d", "text": "enableBreakpointsFor?: { languageIds: string[] }; configurationAttributes?: any; initialConfigurations?: any[]; aiKey?: string; win?: IRawEnvAdapter; winx86?: IRawEnvAdapter; windows?: IRawEnvAdapter;", "commid": "vscode_pr_3054"}], "negative_passages": []} {"query_id": "q-en-vscode-9d44a6a46c7e70592c3cbbe4edc499fd1aacb4d06549a94f11919cc1b0aeaee9", "query": "If this key is set, all telemetry information generated in a debug session of the corresponding debug type will be tagged with that key (so that the data is routed to the correct bucket). what would be a good name for that key? (it should match the name used in other places where this key is used).\nthis is probably something you want to use...\nThe functionality for reporting telemetry only supports application insights pipeline, so I suggest calling it something explicit as .\nwe are not using acronyms in our protocol at all, so not a big fan of , I would rather go with . I would put it as a top level attribute under in the . If this is not provided I would ignore the telemetry event so we never mix the adapter telemtery with our vscode telemetry. What do you think?\nyes, put aiKey at the top of . What's about our own debug adapters? Do we get our own keys for them so that their telemetry events go to vscode telemetry?\nWhat we do we with the current adapters telemetry? do we depend on any of them in our current active reporting? If not, let's put them in the standard first party extensions pipeline. Otherwise, we can use the same vscode key, if so I would want make sure that adds standard properties such as machineId and sessionId so the processing scripts can function normally.\nFor Microsoft owned debug adapters, wouldn't we want their telemetry in the same stream as VS Code so that one could look at all activity for the same session? Or are there other good ways to tie that together?\npreviously we were reporting telemetry events of all debug adapters to vscode. With the new mechanism we don't do this any more, so we have to make sure that the node-debug adapter (which is shipping with vscode) still gets reported in the same way as before. So I will set the aiKey.", "positive_passages": [{"docid": "doc-en-vscode-c409c3170095f67df060bc037a12f96595441d27b19082bb932bcd8b9b10be12", "text": "import { TPromise } from 'vs/base/common/winjs.base'; import editor = require('vs/editor/common/editorCommon'); import aria = require('vs/base/browser/ui/aria/aria'); import { AIAdapter } from 'vs/base/node/aiAdapter'; import editorbrowser = require('vs/editor/browser/editorBrowser'); import { IKeybindingService, IKeybindingContextKey } from 'vs/platform/keybinding/common/keybindingService'; import {IMarkerService} from 'vs/platform/markers/common/markers';", "commid": "vscode_pr_3054"}], "negative_passages": []} {"query_id": "q-en-vscode-9d44a6a46c7e70592c3cbbe4edc499fd1aacb4d06549a94f11919cc1b0aeaee9", "query": "If this key is set, all telemetry information generated in a debug session of the corresponding debug type will be tagged with that key (so that the data is routed to the correct bucket). what would be a good name for that key? (it should match the name used in other places where this key is used).\nthis is probably something you want to use...\nThe functionality for reporting telemetry only supports application insights pipeline, so I suggest calling it something explicit as .\nwe are not using acronyms in our protocol at all, so not a big fan of , I would rather go with . I would put it as a top level attribute under in the . If this is not provided I would ignore the telemetry event so we never mix the adapter telemtery with our vscode telemetry. What do you think?\nyes, put aiKey at the top of . What's about our own debug adapters? Do we get our own keys for them so that their telemetry events go to vscode telemetry?\nWhat we do we with the current adapters telemetry? do we depend on any of them in our current active reporting? If not, let's put them in the standard first party extensions pipeline. Otherwise, we can use the same vscode key, if so I would want make sure that adds standard properties such as machineId and sessionId so the processing scripts can function normally.\nFor Microsoft owned debug adapters, wouldn't we want their telemetry in the same stream as VS Code so that one could look at all activity for the same session? Or are there other good ways to tie that together?\npreviously we were reporting telemetry events of all debug adapters to vscode. With the new mechanism we don't do this any more, so we have to make sure that the node-debug adapter (which is shipping with vscode) still gets reported in the same way as before. So I will set the aiKey.", "positive_passages": [{"docid": "doc-en-vscode-34166a986d76ea1b0d1e65ab5e8d0f10cb0cc5ae283371d2b67cde892d781e38", "text": "private viewModel: viewmodel.ViewModel; private configurationManager: ConfigurationManager; private debugStringEditorInputs: DebugStringEditorInput[]; private telemetryAdapter: AIAdapter; private lastTaskEvent: TaskEvent; private toDispose: lifecycle.IDisposable[]; private inDebugMode: IKeybindingContextKey;", "commid": "vscode_pr_3054"}], "negative_passages": []} {"query_id": "q-en-vscode-9d44a6a46c7e70592c3cbbe4edc499fd1aacb4d06549a94f11919cc1b0aeaee9", "query": "If this key is set, all telemetry information generated in a debug session of the corresponding debug type will be tagged with that key (so that the data is routed to the correct bucket). what would be a good name for that key? (it should match the name used in other places where this key is used).\nthis is probably something you want to use...\nThe functionality for reporting telemetry only supports application insights pipeline, so I suggest calling it something explicit as .\nwe are not using acronyms in our protocol at all, so not a big fan of , I would rather go with . I would put it as a top level attribute under in the . If this is not provided I would ignore the telemetry event so we never mix the adapter telemtery with our vscode telemetry. What do you think?\nyes, put aiKey at the top of . What's about our own debug adapters? Do we get our own keys for them so that their telemetry events go to vscode telemetry?\nWhat we do we with the current adapters telemetry? do we depend on any of them in our current active reporting? If not, let's put them in the standard first party extensions pipeline. Otherwise, we can use the same vscode key, if so I would want make sure that adds standard properties such as machineId and sessionId so the processing scripts can function normally.\nFor Microsoft owned debug adapters, wouldn't we want their telemetry in the same stream as VS Code so that one could look at all activity for the same session? Or are there other good ways to tie that together?\npreviously we were reporting telemetry events of all debug adapters to vscode. With the new mechanism we don't do this any more, so we have to make sure that the node-debug adapter (which is shipping with vscode) still gets reported in the same way as before. So I will set the aiKey.", "positive_passages": [{"docid": "doc-en-vscode-4c685dc3fe9aa74d3589f73d1f6ba803c907770fd6be58998b9725907b2a31ae", "text": "this.toDispose.push(this.session.addListener2(debug.SessionEvents.OUTPUT, (event: DebugProtocol.OutputEvent) => { if (event.body && event.body.category === 'telemetry') { this.telemetryService.publicLog(event.body.output, event.body.data); const key = this.configurationManager.getAdapter().aiKey; // only log telemetry events from debug adapter if the adapter provided the telemetry key if (key) { if (!this.telemetryAdapter) { this.telemetryAdapter = new AIAdapter(key, this.session.getType()); } this.telemetryAdapter.log(event.body.output, event.body.data); } } else if (event.body && typeof event.body.output === 'string' && event.body.output.length > 0) { this.onOutput(event); }", "commid": "vscode_pr_3054"}], "negative_passages": []} {"query_id": "q-en-vscode-9d44a6a46c7e70592c3cbbe4edc499fd1aacb4d06549a94f11919cc1b0aeaee9", "query": "If this key is set, all telemetry information generated in a debug session of the corresponding debug type will be tagged with that key (so that the data is routed to the correct bucket). what would be a good name for that key? (it should match the name used in other places where this key is used).\nthis is probably something you want to use...\nThe functionality for reporting telemetry only supports application insights pipeline, so I suggest calling it something explicit as .\nwe are not using acronyms in our protocol at all, so not a big fan of , I would rather go with . I would put it as a top level attribute under in the . If this is not provided I would ignore the telemetry event so we never mix the adapter telemtery with our vscode telemetry. What do you think?\nyes, put aiKey at the top of . What's about our own debug adapters? Do we get our own keys for them so that their telemetry events go to vscode telemetry?\nWhat we do we with the current adapters telemetry? do we depend on any of them in our current active reporting? If not, let's put them in the standard first party extensions pipeline. Otherwise, we can use the same vscode key, if so I would want make sure that adds standard properties such as machineId and sessionId so the processing scripts can function normally.\nFor Microsoft owned debug adapters, wouldn't we want their telemetry in the same stream as VS Code so that one could look at all activity for the same session? Or are there other good ways to tie that together?\npreviously we were reporting telemetry events of all debug adapters to vscode. With the new mechanism we don't do this any more, so we have to make sure that the node-debug adapter (which is shipping with vscode) still gets reported in the same way as before. So I will set the aiKey.", "positive_passages": [{"docid": "doc-en-vscode-0f687f89139185cb13b5786c135121baca7c9c8bdc29c6f388efaf9ea1876883", "text": "}); this.model.updateBreakpoints(data); if (this.telemetryAdapter) { this.telemetryAdapter.dispose(); this.telemetryAdapter = null; } this.inDebugMode.reset(); }", "commid": "vscode_pr_3054"}], "negative_passages": []} {"query_id": "q-en-vscode-9d44a6a46c7e70592c3cbbe4edc499fd1aacb4d06549a94f11919cc1b0aeaee9", "query": "If this key is set, all telemetry information generated in a debug session of the corresponding debug type will be tagged with that key (so that the data is routed to the correct bucket). what would be a good name for that key? (it should match the name used in other places where this key is used).\nthis is probably something you want to use...\nThe functionality for reporting telemetry only supports application insights pipeline, so I suggest calling it something explicit as .\nwe are not using acronyms in our protocol at all, so not a big fan of , I would rather go with . I would put it as a top level attribute under in the . If this is not provided I would ignore the telemetry event so we never mix the adapter telemtery with our vscode telemetry. What do you think?\nyes, put aiKey at the top of . What's about our own debug adapters? Do we get our own keys for them so that their telemetry events go to vscode telemetry?\nWhat we do we with the current adapters telemetry? do we depend on any of them in our current active reporting? If not, let's put them in the standard first party extensions pipeline. Otherwise, we can use the same vscode key, if so I would want make sure that adds standard properties such as machineId and sessionId so the processing scripts can function normally.\nFor Microsoft owned debug adapters, wouldn't we want their telemetry in the same stream as VS Code so that one could look at all activity for the same session? Or are there other good ways to tie that together?\npreviously we were reporting telemetry events of all debug adapters to vscode. With the new mechanism we don't do this any more, so we have to make sure that the node-debug adapter (which is shipping with vscode) still gets reported in the same way as before. So I will set the aiKey.", "positive_passages": [{"docid": "doc-en-vscode-129e83f64f19f4973c1405b639b1ae8c58eba015c0c82f24a77add076e07bb0b", "text": "private configurationAttributes: any; public initialConfigurations: any[]; public enableBreakpointsFor: { languageIds: string[] }; public aiKey: string; constructor(rawAdapter: debug.IRawAdapter, systemVariables: SystemVariables, extensionFolderPath: string) { if (rawAdapter.windows) {", "commid": "vscode_pr_3054"}], "negative_passages": []} {"query_id": "q-en-vscode-9d44a6a46c7e70592c3cbbe4edc499fd1aacb4d06549a94f11919cc1b0aeaee9", "query": "If this key is set, all telemetry information generated in a debug session of the corresponding debug type will be tagged with that key (so that the data is routed to the correct bucket). what would be a good name for that key? (it should match the name used in other places where this key is used).\nthis is probably something you want to use...\nThe functionality for reporting telemetry only supports application insights pipeline, so I suggest calling it something explicit as .\nwe are not using acronyms in our protocol at all, so not a big fan of , I would rather go with . I would put it as a top level attribute under in the . If this is not provided I would ignore the telemetry event so we never mix the adapter telemtery with our vscode telemetry. What do you think?\nyes, put aiKey at the top of . What's about our own debug adapters? Do we get our own keys for them so that their telemetry events go to vscode telemetry?\nWhat we do we with the current adapters telemetry? do we depend on any of them in our current active reporting? If not, let's put them in the standard first party extensions pipeline. Otherwise, we can use the same vscode key, if so I would want make sure that adds standard properties such as machineId and sessionId so the processing scripts can function normally.\nFor Microsoft owned debug adapters, wouldn't we want their telemetry in the same stream as VS Code so that one could look at all activity for the same session? Or are there other good ways to tie that together?\npreviously we were reporting telemetry events of all debug adapters to vscode. With the new mechanism we don't do this any more, so we have to make sure that the node-debug adapter (which is shipping with vscode) still gets reported in the same way as before. So I will set the aiKey.", "positive_passages": [{"docid": "doc-en-vscode-d0d840071caf9f56c2595f047f5a3b3da5ef045e570a22cdc8190fc491d5fd91", "text": "this.initialConfigurations = rawAdapter.initialConfigurations; this._label = rawAdapter.label; this.enableBreakpointsFor = rawAdapter.enableBreakpointsFor; this.aiKey = rawAdapter.aiKey; } public get label() {", "commid": "vscode_pr_3054"}], "negative_passages": []} {"query_id": "q-en-vscode-be4726a31d84ae83f1d505d34fa8f6fcf3e732019f96e874318980db109a194c", "query": "opens the current directory, also opens the current directory - not the parent\nRepros on master. Also: opens opens etc.\ni see the bug and the fix is in - i guess a short term work around is opens the parent directory\nyes the fix should be in the next release, adding a slash is a good work around in the meantime.\nI hope something good happens here. cause the way things are going. pretty much saying microsoft has lost all control of windows", "positive_passages": [{"docid": "doc-en-vscode-1ee20a6b959f948608b88620570b76379af1c73c995e51760fba0c49d4a0d2a5", "text": "// Trim whitespaces path = strings.trim(strings.trim(path, ' '), 't'); // Remove trailing dots path = strings.rtrim(path, '.'); return path; }", "commid": "vscode_pr_3150"}], "negative_passages": []} {"query_id": "q-en-vscode-5798151fa7167a731663f33f538352f69e57179e599791d172c98110b6056027", "query": "when a link, src or url... contains an underscore character ( _ ) , you can't distinguish it from a misplaced space character because of the default underline below the links.\nAppears to be impractical to solve using in Chromium until it fully adopts the full CSS 3 spec on . What I'll do is use a instead. Tested locally, and it looks good to me: \"screen text-underline-position: under; } .monaco-editor .detected-link-active {", "commid": "vscode_pr_38948"}], "negative_passages": []} {"query_id": "q-en-vscode-8644cad47eb155299bb9ad12f53bc70ef56522af28f06684cdb21b4c2ab9435c", "query": "VS Code should optionally be able to sign git commits with a given GPG key, as it is a good practice for authorization nowadays.\nDoesn't GitHub's authentication basically do the same thing, since you need to auth with GitHub to push to repos you have access to?\nGitHub auth is NOT related to GPG-signed commits if I know right.\nBasically, I would like built-in functionality for appending the command line argument to , as shown .\nSure, but isn't what it's accomplishing done by GitHub account/email linking? You need to link your email to an account and need credentials to the account to push.\nGPG can be used in any git environment (for instance: GitLab, BitBucket, etc.) I though this could be actual after seeing the .\nthoughts?\nI'd argue that for any given repo, you'd either want to sign all commits or none. Based on that, I suggest to use the git configuration in your repo, , which will make git sign all commits by default. Does that work for you\nI use exactly that, but when I try to commit from VS Code with that config attribute set, I get the following error output in the Git console of Code:\nI misread the issue, I thought you were talking about the vscode repo starting to sign commits, not adding the feature. while looking into signing commits yesterday, this I came across this\nNot just vscode is affected: If you're using an agent: As a workaround (a configuration change affecting not just vscode) it's possible to add to your For example, run Snippet from explaining : From what I've noticed, is now less verbose (doesn't remind me that I \"need my passphrase\" on ; is completely silent on ). I don't know what else this affects and thus I feel bad for suggesting this, but it works. If you're not using an agent: Again referring to Launchpad, you seem to be out of luck.\nThanks for that Does it solve it for you,\nWell, having listened to I'm not signing my commits anymore, but thank you for all the help provided!\n. It is not strictly accurate that signing each commit is \"totally stupid.\"\nit would be nice if vscode gave me the opportunity to sign a commit.\nSigning commits is not \"totally stupid\" and, in fact, has very real security implications. Not all Git code happens to be \"pushed\" to Github or BitBucket. Many places use git internally for all sorts of things and git commit signing is a very needed feature and often a requirement. I am using a gpg-agent and still am unable to sign commits in VSCode, for what it's worth.\nI found the two places that need to be modified for this to work, but wasn't able to setup the vscode repository properly (not able to run tests, linter hangs, unable to run electron) so I just dropped it. I'm leaving the links to the lines here in hope that someone will pick it up, and soon Funny thing is they both do the same thing, and they are both nearly identical, but one is written in async/await and the other uses plain function arguments instead of an options object. Is there a reason for this? Why not just abstract it out as another module and use it through that, would be less hassle maintaining it (and any similar parts that can be solved via the same solution).\n^ seems that git support is divided into two parts - one is git workbench that's in and second is git extension (that's built-in?) Is there any progress on this?\ni dont there is any work going on yet. I will pick this up but not until this weekend\nI like to confirm I am starting work on this. I will a pull request with a WIP title to show progress soon\nHello here, I recently tried committing with set to . However the issue I encountered is related to my name: it contains an accented 'e' (\u00e9) and right now VSCode seems to have some encoding problem (at least with git): ! Which prevents git from detecting the correct GPG key.\nHi! Any progress updates? :)\ngot all the changes needed mapped now going to add menus items etc should be done soon just lots of test and things to write\nI have the change almost complete just tidying up and getting ready to commit.\nPull request Added support to GPG signing hope all is oke\nwould love to see this.\nMe too, it was to the June milestone that got me excited but now its back in the backlog.... So I don't know whats going on. The pull request is this one:\nPlease, that comment, which is purely subjective, is very old and it's quoting achieves nothing, but FUD. Impersonating authors on GitHub is easily done and signing ALL commits is good practice. Especially with hardware tokens, such as Yubikeys. I mean no harm with , I am merely showing how easy it is to submit a commit by another. I feel GitHub could do more here too. On the main page, images are small and easily distracted (I could even change mine, I guess ... and my name). But the \"Verified\" means we've signed that commit. I believe it's important, as others seem to have commented also. !\nI verify ALL my commit is important and we do use yubikeys here at my organisation\nGPG signing provides authentication on the commits themselves. What you said in and subsequent comments are irrelevant to the issue. Because without signing the commit, I can easily fake you as the author and submit a fraudulent patch (e.g. intentionally infringing copyright of your rival company) via other channels (e.g. email) to another committer, who will be having a hard time to know whether you actually wrote the patch or not. And if that committer push the CL to GitHub, GitHub will happily link that to your account. See this commit for example:\nHi all, no need to try to convince me anymore\nYEAHHHHH!\nThis error git commit --quiet --allow-empty-message --file - --all git show gpg: cannot open tty `no tty': No such file or directory error: gpg failed to sign the data fatal: failed to write commit object can be cause by password protected gpg key.\nsomething related to the error you seen:\nI got it to work for me, but only after signing a previous commit (~5 minutes prior) manually through the integrated terminal. I have a hunch that the root cause of the error message , is that VS Code is requesting to open the prompt, and failing to do so. If you already entered your password via prompt previously, VS Code signs the commits perfectly fine.\nYou'll probably want to use a pinentry program that remembers the pass code or prompts graphically. (sorry if terse) On Tue, 17 Oct 2017, 08:33 Jeremy Loy, <:\nusually you see this problem when you dont things set up properly for gpg signing. that has been my experience\nIn Linux, I solve /dev/tty problem by adding binary exec of gpg2 path to git global config", "positive_passages": [{"docid": "doc-en-vscode-95b39fd06de823aa14bd3b338bcc40ef579eb7d16ff25b8e22a11393a33fd081", "text": "\"type\": \"boolean\", \"description\": \"%config.enableSmartCommit%\", \"default\": false }, \"git.enableCommitSigning\": { \"type\": \"boolean\", \"description\": \"%config.enableCommitSigning%\", \"default\": false } } }", "commid": "vscode_pr_27136"}], "negative_passages": []} {"query_id": "q-en-vscode-8644cad47eb155299bb9ad12f53bc70ef56522af28f06684cdb21b4c2ab9435c", "query": "VS Code should optionally be able to sign git commits with a given GPG key, as it is a good practice for authorization nowadays.\nDoesn't GitHub's authentication basically do the same thing, since you need to auth with GitHub to push to repos you have access to?\nGitHub auth is NOT related to GPG-signed commits if I know right.\nBasically, I would like built-in functionality for appending the command line argument to , as shown .\nSure, but isn't what it's accomplishing done by GitHub account/email linking? You need to link your email to an account and need credentials to the account to push.\nGPG can be used in any git environment (for instance: GitLab, BitBucket, etc.) I though this could be actual after seeing the .\nthoughts?\nI'd argue that for any given repo, you'd either want to sign all commits or none. Based on that, I suggest to use the git configuration in your repo, , which will make git sign all commits by default. Does that work for you\nI use exactly that, but when I try to commit from VS Code with that config attribute set, I get the following error output in the Git console of Code:\nI misread the issue, I thought you were talking about the vscode repo starting to sign commits, not adding the feature. while looking into signing commits yesterday, this I came across this\nNot just vscode is affected: If you're using an agent: As a workaround (a configuration change affecting not just vscode) it's possible to add to your For example, run Snippet from explaining : From what I've noticed, is now less verbose (doesn't remind me that I \"need my passphrase\" on ; is completely silent on ). I don't know what else this affects and thus I feel bad for suggesting this, but it works. If you're not using an agent: Again referring to Launchpad, you seem to be out of luck.\nThanks for that Does it solve it for you,\nWell, having listened to I'm not signing my commits anymore, but thank you for all the help provided!\n. It is not strictly accurate that signing each commit is \"totally stupid.\"\nit would be nice if vscode gave me the opportunity to sign a commit.\nSigning commits is not \"totally stupid\" and, in fact, has very real security implications. Not all Git code happens to be \"pushed\" to Github or BitBucket. Many places use git internally for all sorts of things and git commit signing is a very needed feature and often a requirement. I am using a gpg-agent and still am unable to sign commits in VSCode, for what it's worth.\nI found the two places that need to be modified for this to work, but wasn't able to setup the vscode repository properly (not able to run tests, linter hangs, unable to run electron) so I just dropped it. I'm leaving the links to the lines here in hope that someone will pick it up, and soon Funny thing is they both do the same thing, and they are both nearly identical, but one is written in async/await and the other uses plain function arguments instead of an options object. Is there a reason for this? Why not just abstract it out as another module and use it through that, would be less hassle maintaining it (and any similar parts that can be solved via the same solution).\n^ seems that git support is divided into two parts - one is git workbench that's in and second is git extension (that's built-in?) Is there any progress on this?\ni dont there is any work going on yet. I will pick this up but not until this weekend\nI like to confirm I am starting work on this. I will a pull request with a WIP title to show progress soon\nHello here, I recently tried committing with set to . However the issue I encountered is related to my name: it contains an accented 'e' (\u00e9) and right now VSCode seems to have some encoding problem (at least with git): ! Which prevents git from detecting the correct GPG key.\nHi! Any progress updates? :)\ngot all the changes needed mapped now going to add menus items etc should be done soon just lots of test and things to write\nI have the change almost complete just tidying up and getting ready to commit.\nPull request Added support to GPG signing hope all is oke\nwould love to see this.\nMe too, it was to the June milestone that got me excited but now its back in the backlog.... So I don't know whats going on. The pull request is this one:\nPlease, that comment, which is purely subjective, is very old and it's quoting achieves nothing, but FUD. Impersonating authors on GitHub is easily done and signing ALL commits is good practice. Especially with hardware tokens, such as Yubikeys. I mean no harm with , I am merely showing how easy it is to submit a commit by another. I feel GitHub could do more here too. On the main page, images are small and easily distracted (I could even change mine, I guess ... and my name). But the \"Verified\" means we've signed that commit. I believe it's important, as others seem to have commented also. !\nI verify ALL my commit is important and we do use yubikeys here at my organisation\nGPG signing provides authentication on the commits themselves. What you said in and subsequent comments are irrelevant to the issue. Because without signing the commit, I can easily fake you as the author and submit a fraudulent patch (e.g. intentionally infringing copyright of your rival company) via other channels (e.g. email) to another committer, who will be having a hard time to know whether you actually wrote the patch or not. And if that committer push the CL to GitHub, GitHub will happily link that to your account. See this commit for example:\nHi all, no need to try to convince me anymore\nYEAHHHHH!\nThis error git commit --quiet --allow-empty-message --file - --all git show gpg: cannot open tty `no tty': No such file or directory error: gpg failed to sign the data fatal: failed to write commit object can be cause by password protected gpg key.\nsomething related to the error you seen:\nI got it to work for me, but only after signing a previous commit (~5 minutes prior) manually through the integrated terminal. I have a hunch that the root cause of the error message , is that VS Code is requesting to open the prompt, and failing to do so. If you already entered your password via prompt previously, VS Code signs the commits perfectly fine.\nYou'll probably want to use a pinentry program that remembers the pass code or prompts graphically. (sorry if terse) On Tue, 17 Oct 2017, 08:33 Jeremy Loy, <:\nusually you see this problem when you dont things set up properly for gpg signing. that has been my experience\nIn Linux, I solve /dev/tty problem by adding binary exec of gpg2 path to git global config", "positive_passages": [{"docid": "doc-en-vscode-0f64457f48abe431df9ff0629b048c80627c0b6e0287784d65982e87a01d189d", "text": "\"config.ignoreLegacyWarning\": \"Ignores the legacy Git warning\", \"config.ignoreLimitWarning\": \"Ignores the warning when there are too many changes in a repository\", \"config.defaultCloneDirectory\": \"The default location where to clone a git repository\", \"config.enableSmartCommit\": \"Commit all changes when there are no staged changes.\" \"config.enableSmartCommit\": \"Commit all changes when there are no staged changes.\", \"config.enableCommitSigning\": \"Enables commit signing with GPG.\" } No newline at end of file", "commid": "vscode_pr_27136"}], "negative_passages": []} {"query_id": "q-en-vscode-8644cad47eb155299bb9ad12f53bc70ef56522af28f06684cdb21b4c2ab9435c", "query": "VS Code should optionally be able to sign git commits with a given GPG key, as it is a good practice for authorization nowadays.\nDoesn't GitHub's authentication basically do the same thing, since you need to auth with GitHub to push to repos you have access to?\nGitHub auth is NOT related to GPG-signed commits if I know right.\nBasically, I would like built-in functionality for appending the command line argument to , as shown .\nSure, but isn't what it's accomplishing done by GitHub account/email linking? You need to link your email to an account and need credentials to the account to push.\nGPG can be used in any git environment (for instance: GitLab, BitBucket, etc.) I though this could be actual after seeing the .\nthoughts?\nI'd argue that for any given repo, you'd either want to sign all commits or none. Based on that, I suggest to use the git configuration in your repo, , which will make git sign all commits by default. Does that work for you\nI use exactly that, but when I try to commit from VS Code with that config attribute set, I get the following error output in the Git console of Code:\nI misread the issue, I thought you were talking about the vscode repo starting to sign commits, not adding the feature. while looking into signing commits yesterday, this I came across this\nNot just vscode is affected: If you're using an agent: As a workaround (a configuration change affecting not just vscode) it's possible to add to your For example, run Snippet from explaining : From what I've noticed, is now less verbose (doesn't remind me that I \"need my passphrase\" on ; is completely silent on ). I don't know what else this affects and thus I feel bad for suggesting this, but it works. If you're not using an agent: Again referring to Launchpad, you seem to be out of luck.\nThanks for that Does it solve it for you,\nWell, having listened to I'm not signing my commits anymore, but thank you for all the help provided!\n. It is not strictly accurate that signing each commit is \"totally stupid.\"\nit would be nice if vscode gave me the opportunity to sign a commit.\nSigning commits is not \"totally stupid\" and, in fact, has very real security implications. Not all Git code happens to be \"pushed\" to Github or BitBucket. Many places use git internally for all sorts of things and git commit signing is a very needed feature and often a requirement. I am using a gpg-agent and still am unable to sign commits in VSCode, for what it's worth.\nI found the two places that need to be modified for this to work, but wasn't able to setup the vscode repository properly (not able to run tests, linter hangs, unable to run electron) so I just dropped it. I'm leaving the links to the lines here in hope that someone will pick it up, and soon Funny thing is they both do the same thing, and they are both nearly identical, but one is written in async/await and the other uses plain function arguments instead of an options object. Is there a reason for this? Why not just abstract it out as another module and use it through that, would be less hassle maintaining it (and any similar parts that can be solved via the same solution).\n^ seems that git support is divided into two parts - one is git workbench that's in and second is git extension (that's built-in?) Is there any progress on this?\ni dont there is any work going on yet. I will pick this up but not until this weekend\nI like to confirm I am starting work on this. I will a pull request with a WIP title to show progress soon\nHello here, I recently tried committing with set to . However the issue I encountered is related to my name: it contains an accented 'e' (\u00e9) and right now VSCode seems to have some encoding problem (at least with git): ! Which prevents git from detecting the correct GPG key.\nHi! Any progress updates? :)\ngot all the changes needed mapped now going to add menus items etc should be done soon just lots of test and things to write\nI have the change almost complete just tidying up and getting ready to commit.\nPull request Added support to GPG signing hope all is oke\nwould love to see this.\nMe too, it was to the June milestone that got me excited but now its back in the backlog.... So I don't know whats going on. The pull request is this one:\nPlease, that comment, which is purely subjective, is very old and it's quoting achieves nothing, but FUD. Impersonating authors on GitHub is easily done and signing ALL commits is good practice. Especially with hardware tokens, such as Yubikeys. I mean no harm with , I am merely showing how easy it is to submit a commit by another. I feel GitHub could do more here too. On the main page, images are small and easily distracted (I could even change mine, I guess ... and my name). But the \"Verified\" means we've signed that commit. I believe it's important, as others seem to have commented also. !\nI verify ALL my commit is important and we do use yubikeys here at my organisation\nGPG signing provides authentication on the commits themselves. What you said in and subsequent comments are irrelevant to the issue. Because without signing the commit, I can easily fake you as the author and submit a fraudulent patch (e.g. intentionally infringing copyright of your rival company) via other channels (e.g. email) to another committer, who will be having a hard time to know whether you actually wrote the patch or not. And if that committer push the CL to GitHub, GitHub will happily link that to your account. See this commit for example:\nHi all, no need to try to convince me anymore\nYEAHHHHH!\nThis error git commit --quiet --allow-empty-message --file - --all git show gpg: cannot open tty `no tty': No such file or directory error: gpg failed to sign the data fatal: failed to write commit object can be cause by password protected gpg key.\nsomething related to the error you seen:\nI got it to work for me, but only after signing a previous commit (~5 minutes prior) manually through the integrated terminal. I have a hunch that the root cause of the error message , is that VS Code is requesting to open the prompt, and failing to do so. If you already entered your password via prompt previously, VS Code signs the commits perfectly fine.\nYou'll probably want to use a pinentry program that remembers the pass code or prompts graphically. (sorry if terse) On Tue, 17 Oct 2017, 08:33 Jeremy Loy, <:\nusually you see this problem when you dont things set up properly for gpg signing. that has been my experience\nIn Linux, I solve /dev/tty problem by adding binary exec of gpg2 path to git global config", "positive_passages": [{"docid": "doc-en-vscode-073bac355700a299eb7fd6a73de450c7aec8ef9c995328223b3b5f3a2ebea923", "text": "): Promise { const config = workspace.getConfiguration('git'); const enableSmartCommit = config.get('enableSmartCommit') === true; const enableCommitSigning = config.get('enableCommitSigning') === true; const noStagedChanges = this.model.indexGroup.resources.length === 0; const noUnstagedChanges = this.model.workingTreeGroup.resources.length === 0;", "commid": "vscode_pr_27136"}], "negative_passages": []} {"query_id": "q-en-vscode-8644cad47eb155299bb9ad12f53bc70ef56522af28f06684cdb21b4c2ab9435c", "query": "VS Code should optionally be able to sign git commits with a given GPG key, as it is a good practice for authorization nowadays.\nDoesn't GitHub's authentication basically do the same thing, since you need to auth with GitHub to push to repos you have access to?\nGitHub auth is NOT related to GPG-signed commits if I know right.\nBasically, I would like built-in functionality for appending the command line argument to , as shown .\nSure, but isn't what it's accomplishing done by GitHub account/email linking? You need to link your email to an account and need credentials to the account to push.\nGPG can be used in any git environment (for instance: GitLab, BitBucket, etc.) I though this could be actual after seeing the .\nthoughts?\nI'd argue that for any given repo, you'd either want to sign all commits or none. Based on that, I suggest to use the git configuration in your repo, , which will make git sign all commits by default. Does that work for you\nI use exactly that, but when I try to commit from VS Code with that config attribute set, I get the following error output in the Git console of Code:\nI misread the issue, I thought you were talking about the vscode repo starting to sign commits, not adding the feature. while looking into signing commits yesterday, this I came across this\nNot just vscode is affected: If you're using an agent: As a workaround (a configuration change affecting not just vscode) it's possible to add to your For example, run Snippet from explaining : From what I've noticed, is now less verbose (doesn't remind me that I \"need my passphrase\" on ; is completely silent on ). I don't know what else this affects and thus I feel bad for suggesting this, but it works. If you're not using an agent: Again referring to Launchpad, you seem to be out of luck.\nThanks for that Does it solve it for you,\nWell, having listened to I'm not signing my commits anymore, but thank you for all the help provided!\n. It is not strictly accurate that signing each commit is \"totally stupid.\"\nit would be nice if vscode gave me the opportunity to sign a commit.\nSigning commits is not \"totally stupid\" and, in fact, has very real security implications. Not all Git code happens to be \"pushed\" to Github or BitBucket. Many places use git internally for all sorts of things and git commit signing is a very needed feature and often a requirement. I am using a gpg-agent and still am unable to sign commits in VSCode, for what it's worth.\nI found the two places that need to be modified for this to work, but wasn't able to setup the vscode repository properly (not able to run tests, linter hangs, unable to run electron) so I just dropped it. I'm leaving the links to the lines here in hope that someone will pick it up, and soon Funny thing is they both do the same thing, and they are both nearly identical, but one is written in async/await and the other uses plain function arguments instead of an options object. Is there a reason for this? Why not just abstract it out as another module and use it through that, would be less hassle maintaining it (and any similar parts that can be solved via the same solution).\n^ seems that git support is divided into two parts - one is git workbench that's in and second is git extension (that's built-in?) Is there any progress on this?\ni dont there is any work going on yet. I will pick this up but not until this weekend\nI like to confirm I am starting work on this. I will a pull request with a WIP title to show progress soon\nHello here, I recently tried committing with set to . However the issue I encountered is related to my name: it contains an accented 'e' (\u00e9) and right now VSCode seems to have some encoding problem (at least with git): ! Which prevents git from detecting the correct GPG key.\nHi! Any progress updates? :)\ngot all the changes needed mapped now going to add menus items etc should be done soon just lots of test and things to write\nI have the change almost complete just tidying up and getting ready to commit.\nPull request Added support to GPG signing hope all is oke\nwould love to see this.\nMe too, it was to the June milestone that got me excited but now its back in the backlog.... So I don't know whats going on. The pull request is this one:\nPlease, that comment, which is purely subjective, is very old and it's quoting achieves nothing, but FUD. Impersonating authors on GitHub is easily done and signing ALL commits is good practice. Especially with hardware tokens, such as Yubikeys. I mean no harm with , I am merely showing how easy it is to submit a commit by another. I feel GitHub could do more here too. On the main page, images are small and easily distracted (I could even change mine, I guess ... and my name). But the \"Verified\" means we've signed that commit. I believe it's important, as others seem to have commented also. !\nI verify ALL my commit is important and we do use yubikeys here at my organisation\nGPG signing provides authentication on the commits themselves. What you said in and subsequent comments are irrelevant to the issue. Because without signing the commit, I can easily fake you as the author and submit a fraudulent patch (e.g. intentionally infringing copyright of your rival company) via other channels (e.g. email) to another committer, who will be having a hard time to know whether you actually wrote the patch or not. And if that committer push the CL to GitHub, GitHub will happily link that to your account. See this commit for example:\nHi all, no need to try to convince me anymore\nYEAHHHHH!\nThis error git commit --quiet --allow-empty-message --file - --all git show gpg: cannot open tty `no tty': No such file or directory error: gpg failed to sign the data fatal: failed to write commit object can be cause by password protected gpg key.\nsomething related to the error you seen:\nI got it to work for me, but only after signing a previous commit (~5 minutes prior) manually through the integrated terminal. I have a hunch that the root cause of the error message , is that VS Code is requesting to open the prompt, and failing to do so. If you already entered your password via prompt previously, VS Code signs the commits perfectly fine.\nYou'll probably want to use a pinentry program that remembers the pass code or prompts graphically. (sorry if terse) On Tue, 17 Oct 2017, 08:33 Jeremy Loy, <:\nusually you see this problem when you dont things set up properly for gpg signing. that has been my experience\nIn Linux, I solve /dev/tty problem by adding binary exec of gpg2 path to git global config", "positive_passages": [{"docid": "doc-en-vscode-51cd954e7002b4ec1d4f7ef4eb78d04eb881960e3edf674f2cdaf5ce87d7757c", "text": "opts = { all: noStagedChanges }; } // enable signing of commits if configurated opts.signCommit = enableCommitSigning; if ( // no changes (noStagedChanges && noUnstagedChanges)", "commid": "vscode_pr_27136"}], "negative_passages": []} {"query_id": "q-en-vscode-8644cad47eb155299bb9ad12f53bc70ef56522af28f06684cdb21b4c2ab9435c", "query": "VS Code should optionally be able to sign git commits with a given GPG key, as it is a good practice for authorization nowadays.\nDoesn't GitHub's authentication basically do the same thing, since you need to auth with GitHub to push to repos you have access to?\nGitHub auth is NOT related to GPG-signed commits if I know right.\nBasically, I would like built-in functionality for appending the command line argument to , as shown .\nSure, but isn't what it's accomplishing done by GitHub account/email linking? You need to link your email to an account and need credentials to the account to push.\nGPG can be used in any git environment (for instance: GitLab, BitBucket, etc.) I though this could be actual after seeing the .\nthoughts?\nI'd argue that for any given repo, you'd either want to sign all commits or none. Based on that, I suggest to use the git configuration in your repo, , which will make git sign all commits by default. Does that work for you\nI use exactly that, but when I try to commit from VS Code with that config attribute set, I get the following error output in the Git console of Code:\nI misread the issue, I thought you were talking about the vscode repo starting to sign commits, not adding the feature. while looking into signing commits yesterday, this I came across this\nNot just vscode is affected: If you're using an agent: As a workaround (a configuration change affecting not just vscode) it's possible to add to your For example, run Snippet from explaining : From what I've noticed, is now less verbose (doesn't remind me that I \"need my passphrase\" on ; is completely silent on ). I don't know what else this affects and thus I feel bad for suggesting this, but it works. If you're not using an agent: Again referring to Launchpad, you seem to be out of luck.\nThanks for that Does it solve it for you,\nWell, having listened to I'm not signing my commits anymore, but thank you for all the help provided!\n. It is not strictly accurate that signing each commit is \"totally stupid.\"\nit would be nice if vscode gave me the opportunity to sign a commit.\nSigning commits is not \"totally stupid\" and, in fact, has very real security implications. Not all Git code happens to be \"pushed\" to Github or BitBucket. Many places use git internally for all sorts of things and git commit signing is a very needed feature and often a requirement. I am using a gpg-agent and still am unable to sign commits in VSCode, for what it's worth.\nI found the two places that need to be modified for this to work, but wasn't able to setup the vscode repository properly (not able to run tests, linter hangs, unable to run electron) so I just dropped it. I'm leaving the links to the lines here in hope that someone will pick it up, and soon Funny thing is they both do the same thing, and they are both nearly identical, but one is written in async/await and the other uses plain function arguments instead of an options object. Is there a reason for this? Why not just abstract it out as another module and use it through that, would be less hassle maintaining it (and any similar parts that can be solved via the same solution).\n^ seems that git support is divided into two parts - one is git workbench that's in and second is git extension (that's built-in?) Is there any progress on this?\ni dont there is any work going on yet. I will pick this up but not until this weekend\nI like to confirm I am starting work on this. I will a pull request with a WIP title to show progress soon\nHello here, I recently tried committing with set to . However the issue I encountered is related to my name: it contains an accented 'e' (\u00e9) and right now VSCode seems to have some encoding problem (at least with git): ! Which prevents git from detecting the correct GPG key.\nHi! Any progress updates? :)\ngot all the changes needed mapped now going to add menus items etc should be done soon just lots of test and things to write\nI have the change almost complete just tidying up and getting ready to commit.\nPull request Added support to GPG signing hope all is oke\nwould love to see this.\nMe too, it was to the June milestone that got me excited but now its back in the backlog.... So I don't know whats going on. The pull request is this one:\nPlease, that comment, which is purely subjective, is very old and it's quoting achieves nothing, but FUD. Impersonating authors on GitHub is easily done and signing ALL commits is good practice. Especially with hardware tokens, such as Yubikeys. I mean no harm with , I am merely showing how easy it is to submit a commit by another. I feel GitHub could do more here too. On the main page, images are small and easily distracted (I could even change mine, I guess ... and my name). But the \"Verified\" means we've signed that commit. I believe it's important, as others seem to have commented also. !\nI verify ALL my commit is important and we do use yubikeys here at my organisation\nGPG signing provides authentication on the commits themselves. What you said in and subsequent comments are irrelevant to the issue. Because without signing the commit, I can easily fake you as the author and submit a fraudulent patch (e.g. intentionally infringing copyright of your rival company) via other channels (e.g. email) to another committer, who will be having a hard time to know whether you actually wrote the patch or not. And if that committer push the CL to GitHub, GitHub will happily link that to your account. See this commit for example:\nHi all, no need to try to convince me anymore\nYEAHHHHH!\nThis error git commit --quiet --allow-empty-message --file - --all git show gpg: cannot open tty `no tty': No such file or directory error: gpg failed to sign the data fatal: failed to write commit object can be cause by password protected gpg key.\nsomething related to the error you seen:\nI got it to work for me, but only after signing a previous commit (~5 minutes prior) manually through the integrated terminal. I have a hunch that the root cause of the error message , is that VS Code is requesting to open the prompt, and failing to do so. If you already entered your password via prompt previously, VS Code signs the commits perfectly fine.\nYou'll probably want to use a pinentry program that remembers the pass code or prompts graphically. (sorry if terse) On Tue, 17 Oct 2017, 08:33 Jeremy Loy, <:\nusually you see this problem when you dont things set up properly for gpg signing. that has been my experience\nIn Linux, I solve /dev/tty problem by adding binary exec of gpg2 path to git global config", "positive_passages": [{"docid": "doc-en-vscode-4adb30b17faada10df0fa96e25f50f0a712e51b3207da76202e59065594a03c0", "text": "} } async commit(message: string, opts: { all?: boolean, amend?: boolean, signoff?: boolean } = Object.create(null)): Promise { async commit(message: string, opts: { all?: boolean, amend?: boolean, signoff?: boolean, signCommit?: boolean } = Object.create(null)): Promise { const args = ['commit', '--quiet', '--allow-empty-message', '--file', '-']; if (opts.all) {", "commid": "vscode_pr_27136"}], "negative_passages": []} {"query_id": "q-en-vscode-8644cad47eb155299bb9ad12f53bc70ef56522af28f06684cdb21b4c2ab9435c", "query": "VS Code should optionally be able to sign git commits with a given GPG key, as it is a good practice for authorization nowadays.\nDoesn't GitHub's authentication basically do the same thing, since you need to auth with GitHub to push to repos you have access to?\nGitHub auth is NOT related to GPG-signed commits if I know right.\nBasically, I would like built-in functionality for appending the command line argument to , as shown .\nSure, but isn't what it's accomplishing done by GitHub account/email linking? You need to link your email to an account and need credentials to the account to push.\nGPG can be used in any git environment (for instance: GitLab, BitBucket, etc.) I though this could be actual after seeing the .\nthoughts?\nI'd argue that for any given repo, you'd either want to sign all commits or none. Based on that, I suggest to use the git configuration in your repo, , which will make git sign all commits by default. Does that work for you\nI use exactly that, but when I try to commit from VS Code with that config attribute set, I get the following error output in the Git console of Code:\nI misread the issue, I thought you were talking about the vscode repo starting to sign commits, not adding the feature. while looking into signing commits yesterday, this I came across this\nNot just vscode is affected: If you're using an agent: As a workaround (a configuration change affecting not just vscode) it's possible to add to your For example, run Snippet from explaining : From what I've noticed, is now less verbose (doesn't remind me that I \"need my passphrase\" on ; is completely silent on ). I don't know what else this affects and thus I feel bad for suggesting this, but it works. If you're not using an agent: Again referring to Launchpad, you seem to be out of luck.\nThanks for that Does it solve it for you,\nWell, having listened to I'm not signing my commits anymore, but thank you for all the help provided!\n. It is not strictly accurate that signing each commit is \"totally stupid.\"\nit would be nice if vscode gave me the opportunity to sign a commit.\nSigning commits is not \"totally stupid\" and, in fact, has very real security implications. Not all Git code happens to be \"pushed\" to Github or BitBucket. Many places use git internally for all sorts of things and git commit signing is a very needed feature and often a requirement. I am using a gpg-agent and still am unable to sign commits in VSCode, for what it's worth.\nI found the two places that need to be modified for this to work, but wasn't able to setup the vscode repository properly (not able to run tests, linter hangs, unable to run electron) so I just dropped it. I'm leaving the links to the lines here in hope that someone will pick it up, and soon Funny thing is they both do the same thing, and they are both nearly identical, but one is written in async/await and the other uses plain function arguments instead of an options object. Is there a reason for this? Why not just abstract it out as another module and use it through that, would be less hassle maintaining it (and any similar parts that can be solved via the same solution).\n^ seems that git support is divided into two parts - one is git workbench that's in and second is git extension (that's built-in?) Is there any progress on this?\ni dont there is any work going on yet. I will pick this up but not until this weekend\nI like to confirm I am starting work on this. I will a pull request with a WIP title to show progress soon\nHello here, I recently tried committing with set to . However the issue I encountered is related to my name: it contains an accented 'e' (\u00e9) and right now VSCode seems to have some encoding problem (at least with git): ! Which prevents git from detecting the correct GPG key.\nHi! Any progress updates? :)\ngot all the changes needed mapped now going to add menus items etc should be done soon just lots of test and things to write\nI have the change almost complete just tidying up and getting ready to commit.\nPull request Added support to GPG signing hope all is oke\nwould love to see this.\nMe too, it was to the June milestone that got me excited but now its back in the backlog.... So I don't know whats going on. The pull request is this one:\nPlease, that comment, which is purely subjective, is very old and it's quoting achieves nothing, but FUD. Impersonating authors on GitHub is easily done and signing ALL commits is good practice. Especially with hardware tokens, such as Yubikeys. I mean no harm with , I am merely showing how easy it is to submit a commit by another. I feel GitHub could do more here too. On the main page, images are small and easily distracted (I could even change mine, I guess ... and my name). But the \"Verified\" means we've signed that commit. I believe it's important, as others seem to have commented also. !\nI verify ALL my commit is important and we do use yubikeys here at my organisation\nGPG signing provides authentication on the commits themselves. What you said in and subsequent comments are irrelevant to the issue. Because without signing the commit, I can easily fake you as the author and submit a fraudulent patch (e.g. intentionally infringing copyright of your rival company) via other channels (e.g. email) to another committer, who will be having a hard time to know whether you actually wrote the patch or not. And if that committer push the CL to GitHub, GitHub will happily link that to your account. See this commit for example:\nHi all, no need to try to convince me anymore\nYEAHHHHH!\nThis error git commit --quiet --allow-empty-message --file - --all git show gpg: cannot open tty `no tty': No such file or directory error: gpg failed to sign the data fatal: failed to write commit object can be cause by password protected gpg key.\nsomething related to the error you seen:\nI got it to work for me, but only after signing a previous commit (~5 minutes prior) manually through the integrated terminal. I have a hunch that the root cause of the error message , is that VS Code is requesting to open the prompt, and failing to do so. If you already entered your password via prompt previously, VS Code signs the commits perfectly fine.\nYou'll probably want to use a pinentry program that remembers the pass code or prompts graphically. (sorry if terse) On Tue, 17 Oct 2017, 08:33 Jeremy Loy, <:\nusually you see this problem when you dont things set up properly for gpg signing. that has been my experience\nIn Linux, I solve /dev/tty problem by adding binary exec of gpg2 path to git global config", "positive_passages": [{"docid": "doc-en-vscode-88ac536184d03a6791dc5cf815828ca51711bf9a2c9cc5ac12aab7412e69de43", "text": "args.push('--signoff'); } if (opts.signCommit) { args.push('-S'); } try { await this.run(args, { input: message || '' }); } catch (commitErr) {", "commid": "vscode_pr_27136"}], "negative_passages": []} {"query_id": "q-en-vscode-8644cad47eb155299bb9ad12f53bc70ef56522af28f06684cdb21b4c2ab9435c", "query": "VS Code should optionally be able to sign git commits with a given GPG key, as it is a good practice for authorization nowadays.\nDoesn't GitHub's authentication basically do the same thing, since you need to auth with GitHub to push to repos you have access to?\nGitHub auth is NOT related to GPG-signed commits if I know right.\nBasically, I would like built-in functionality for appending the command line argument to , as shown .\nSure, but isn't what it's accomplishing done by GitHub account/email linking? You need to link your email to an account and need credentials to the account to push.\nGPG can be used in any git environment (for instance: GitLab, BitBucket, etc.) I though this could be actual after seeing the .\nthoughts?\nI'd argue that for any given repo, you'd either want to sign all commits or none. Based on that, I suggest to use the git configuration in your repo, , which will make git sign all commits by default. Does that work for you\nI use exactly that, but when I try to commit from VS Code with that config attribute set, I get the following error output in the Git console of Code:\nI misread the issue, I thought you were talking about the vscode repo starting to sign commits, not adding the feature. while looking into signing commits yesterday, this I came across this\nNot just vscode is affected: If you're using an agent: As a workaround (a configuration change affecting not just vscode) it's possible to add to your For example, run Snippet from explaining : From what I've noticed, is now less verbose (doesn't remind me that I \"need my passphrase\" on ; is completely silent on ). I don't know what else this affects and thus I feel bad for suggesting this, but it works. If you're not using an agent: Again referring to Launchpad, you seem to be out of luck.\nThanks for that Does it solve it for you,\nWell, having listened to I'm not signing my commits anymore, but thank you for all the help provided!\n. It is not strictly accurate that signing each commit is \"totally stupid.\"\nit would be nice if vscode gave me the opportunity to sign a commit.\nSigning commits is not \"totally stupid\" and, in fact, has very real security implications. Not all Git code happens to be \"pushed\" to Github or BitBucket. Many places use git internally for all sorts of things and git commit signing is a very needed feature and often a requirement. I am using a gpg-agent and still am unable to sign commits in VSCode, for what it's worth.\nI found the two places that need to be modified for this to work, but wasn't able to setup the vscode repository properly (not able to run tests, linter hangs, unable to run electron) so I just dropped it. I'm leaving the links to the lines here in hope that someone will pick it up, and soon Funny thing is they both do the same thing, and they are both nearly identical, but one is written in async/await and the other uses plain function arguments instead of an options object. Is there a reason for this? Why not just abstract it out as another module and use it through that, would be less hassle maintaining it (and any similar parts that can be solved via the same solution).\n^ seems that git support is divided into two parts - one is git workbench that's in and second is git extension (that's built-in?) Is there any progress on this?\ni dont there is any work going on yet. I will pick this up but not until this weekend\nI like to confirm I am starting work on this. I will a pull request with a WIP title to show progress soon\nHello here, I recently tried committing with set to . However the issue I encountered is related to my name: it contains an accented 'e' (\u00e9) and right now VSCode seems to have some encoding problem (at least with git): ! Which prevents git from detecting the correct GPG key.\nHi! Any progress updates? :)\ngot all the changes needed mapped now going to add menus items etc should be done soon just lots of test and things to write\nI have the change almost complete just tidying up and getting ready to commit.\nPull request Added support to GPG signing hope all is oke\nwould love to see this.\nMe too, it was to the June milestone that got me excited but now its back in the backlog.... So I don't know whats going on. The pull request is this one:\nPlease, that comment, which is purely subjective, is very old and it's quoting achieves nothing, but FUD. Impersonating authors on GitHub is easily done and signing ALL commits is good practice. Especially with hardware tokens, such as Yubikeys. I mean no harm with , I am merely showing how easy it is to submit a commit by another. I feel GitHub could do more here too. On the main page, images are small and easily distracted (I could even change mine, I guess ... and my name). But the \"Verified\" means we've signed that commit. I believe it's important, as others seem to have commented also. !\nI verify ALL my commit is important and we do use yubikeys here at my organisation\nGPG signing provides authentication on the commits themselves. What you said in and subsequent comments are irrelevant to the issue. Because without signing the commit, I can easily fake you as the author and submit a fraudulent patch (e.g. intentionally infringing copyright of your rival company) via other channels (e.g. email) to another committer, who will be having a hard time to know whether you actually wrote the patch or not. And if that committer push the CL to GitHub, GitHub will happily link that to your account. See this commit for example:\nHi all, no need to try to convince me anymore\nYEAHHHHH!\nThis error git commit --quiet --allow-empty-message --file - --all git show gpg: cannot open tty `no tty': No such file or directory error: gpg failed to sign the data fatal: failed to write commit object can be cause by password protected gpg key.\nsomething related to the error you seen:\nI got it to work for me, but only after signing a previous commit (~5 minutes prior) manually through the integrated terminal. I have a hunch that the root cause of the error message , is that VS Code is requesting to open the prompt, and failing to do so. If you already entered your password via prompt previously, VS Code signs the commits perfectly fine.\nYou'll probably want to use a pinentry program that remembers the pass code or prompts graphically. (sorry if terse) On Tue, 17 Oct 2017, 08:33 Jeremy Loy, <:\nusually you see this problem when you dont things set up properly for gpg signing. that has been my experience\nIn Linux, I solve /dev/tty problem by adding binary exec of gpg2 path to git global config", "positive_passages": [{"docid": "doc-en-vscode-0b05d4ed04cbe72bc3922ec427d38a2d18ba3d7152d97c0a233556450ebb84e1", "text": "all?: boolean; amend?: boolean; signoff?: boolean; signCommit?: boolean; } export class Model implements Disposable {", "commid": "vscode_pr_27136"}], "negative_passages": []} {"query_id": "q-en-vscode-3232970587aa16d34ea60e05b9c6b73f51948efe29a63d0089986357f575787d", "query": "Integrated terminal master issue: Open question: Currently pressing .pipe(replace('@@NAME_SHORT@@', product.nameShort)) .pipe(replace('@@NAME@@', product.applicationName)) .pipe(rename('usr/share/applications/' + product.applicationName + '.desktop'));", "commid": "vscode_pr_6985"}], "negative_passages": []} {"query_id": "q-en-vscode-3232970587aa16d34ea60e05b9c6b73f51948efe29a63d0089986357f575787d", "query": "Integrated terminal master issue: Open question: Currently pressing .pipe(replace('@@NAME_SHORT@@', product.nameShort)) .pipe(replace('@@NAME@@', product.applicationName)) .pipe(rename('BUILD/usr/share/applications/' + product.applicationName + '.desktop'));", "commid": "vscode_pr_6985"}], "negative_passages": []} {"query_id": "q-en-vscode-3232970587aa16d34ea60e05b9c6b73f51948efe29a63d0089986357f575787d", "query": "Integrated terminal master issue: Open question: Currently pressing Exec=/usr/bin/@@NAME@@ %U Exec=/usr/share/@@NAME@@/@@NAME@@ %U Icon=@@NAME@@ Type=Application StartupNotify=true StartupWMClass=@@NAME@@ StartupWMClass=@@NAME_SHORT@@ Categories=Utility;TextEditor;Development;IDE; MimeType=text/plain; Actions=new-window;", "commid": "vscode_pr_6985"}], "negative_passages": []} {"query_id": "q-en-vscode-3232970587aa16d34ea60e05b9c6b73f51948efe29a63d0089986357f575787d", "query": "Integrated terminal master issue: Open question: Currently pressing Exec=/usr/bin/@@NAME@@ --new-window %U Exec=/usr/share/@@NAME@@/@@NAME@@ --new-window %U Icon=@@NAME@@", "commid": "vscode_pr_6985"}], "negative_passages": []} {"query_id": "q-en-vscode-3232970587aa16d34ea60e05b9c6b73f51948efe29a63d0089986357f575787d", "query": "Integrated terminal master issue: Open question: Currently pressing this.toDispose.push(DOM.addDisposableListener(this.parentDomElement, 'keyup', (event: KeyboardEvent) => { // Keep terminal open on escape if (event.keyCode === 27) { event.stopPropagation(); } })); this.toDispose.push(this.themeService.onDidThemeChange((themeId) => { this.setTerminalTheme(themeId); this.setTerminalTheme(); })); this.toDispose.push(this.configurationService.onDidUpdateConfiguration((e) => { this.setTerminalFont(); })); this.terminal.open(this.terminalDomElement); this.parentDomElement.appendChild(terminalScrollbar.getDomNode()); let config = this.configurationService.getConfiguration(); this.terminalDomElement.style.fontFamily = config.terminal.integrated.fontFamily; this.setTerminalTheme(this.themeService.getTheme()); this.setTerminalFont(); this.setTerminalTheme(); resolve(void 0); }); } private setTerminalTheme(themeId: string) { private setTerminalTheme() { if (!this.terminal) { return; } let baseThemeId = getBaseThemeId(themeId); let baseThemeId = getBaseThemeId(this.themeService.getTheme()); this.terminal.colors = DEFAULT_ANSI_COLORS[baseThemeId]; this.terminal.refresh(0, this.terminal.rows); } private setTerminalFont() { let config = this.configurationService.getConfiguration(); this.terminalDomElement.style.fontFamily = config.terminal.integrated.fontFamily; } public focus(): void { this.focusTerminal(true); }", "commid": "vscode_pr_6985"}], "negative_passages": []} {"query_id": "q-en-vscode-d6288e676c13a8d6389645d2d3b2a858f2509dcc63ea670e2116e47797a645a0", "query": "I am using VSCode on Ubuntu 14.04 x64 VSCode About: Version 0.10.10 Commit Date 2016-03-07T10:30:20.458Z Shell 0.35.6 Renderer 45.0.2454.85 Node 4.1.1 Steps to Reproduce: a git repo folder a change the \"GIT\" tab typing a git message I am thinking of a counter starting with 50 (The number of character that'll be used as the short message appearing in git commits), it helps write meaning full messages, without have a word cut and completed in the description part, the behavior is taken as is from GitKraken\nMy suggestion would be to, instead of always showing a counter, when the first line's length has surpassed 50 characters. I'd gladly take this as a contribution PR! Wanna give it a try?\nIt seems easy to implement this, can I give it a try?\nAbsolutely, looking forward to it.\nIt unfortunately seems as if is no longer working on this.\nPlease bring it back!", "positive_passages": [{"docid": "doc-en-vscode-f684eb936dfa914156012d840839b4a8f5fc8240fb40ed0afd912d2313a1c4b4", "text": "private static COMMIT_KEYBINDING = Platform.isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter'; private static NEED_MESSAGE = nls.localize('needMessage', \"Please provide a commit message. You can always press **{0}** to commit changes. If there are any staged changes, only those will be committed; otherwise, all changes will.\", ChangesView.COMMIT_KEYBINDING); private static NOTHING_TO_COMMIT = nls.localize('nothingToCommit', \"Once there are some changes to commit, type in the commit message and either press **{0}** to commit changes. If there are any staged changes, only those will be committed; otherwise, all changes will.\", ChangesView.COMMIT_KEYBINDING); private static LONG_COMMIT = nls.localize('longCommit', \"Great commit summaries are 50 characters or less. Place extra information in next lines.\"); private instantiationService: IInstantiationService; private editorService: IWorkbenchEditorService;", "commid": "vscode_pr_7399"}], "negative_passages": []} {"query_id": "q-en-vscode-d6288e676c13a8d6389645d2d3b2a858f2509dcc63ea670e2116e47797a645a0", "query": "I am using VSCode on Ubuntu 14.04 x64 VSCode About: Version 0.10.10 Commit Date 2016-03-07T10:30:20.458Z Shell 0.35.6 Renderer 45.0.2454.85 Node 4.1.1 Steps to Reproduce: a git repo folder a change the \"GIT\" tab typing a git message I am thinking of a counter starting with 50 (The number of character that'll be used as the short message appearing in git commits), it helps write meaning full messages, without have a word cut and completed in the description part, the behavior is taken as is from GitKraken\nMy suggestion would be to, instead of always showing a counter, when the first line's length has surpassed 50 characters. I'd gladly take this as a contribution PR! Wanna give it a try?\nIt seems easy to implement this, can I give it a try?\nAbsolutely, looking forward to it.\nIt unfortunately seems as if is no longer working on this.\nPlease bring it back!", "positive_passages": [{"docid": "doc-en-vscode-4e253ebac02be36d275306e5d2641840c7dfd89bc6a731842a8ecef772ce3bc4", "text": "placeholder: nls.localize('commitMessage', \"Message (press {0} to commit)\", ChangesView.COMMIT_KEYBINDING), validationOptions: { showMessage: true, validation: (): InputBox.IMessage => null validation: (value): InputBox.IMessage => { if (Strings.trim(value.split('n')[0]).length > 50) { return { content: ChangesView.LONG_COMMIT, type: InputBox.MessageType.WARNING }; } return null; } }, ariaLabel: nls.localize('commitMessageAriaLabel', \"Git: Type commit message and press {0} to commit\", ChangesView.COMMIT_KEYBINDING), flexibleHeight: true", "commid": "vscode_pr_7399"}], "negative_passages": []} {"query_id": "q-en-vscode-181f61b6239acba66352b3e89967487fa755c468ed8d30e6341c71c5ee3218df", "query": "when i want to compare a local file with a online resource file, i need to save the online file in project folder, and then do compare. it's a little inconvenient. It'll be great if i can copy the content of the online file, and right-click the local file, and choose \"compare with clipboard\".\nAn extension would be ideal for a feature like this.\nfyi\nIt would be great too if also is allowed to compare selection with clipboard.\nIt would be great if we could compare unsaved files...\nI would be open to a PR here, I think it is not a lot of work. Some pointers: register a new text document content provider to be able to open the left hand side of the diff editor to be the contents of the clipboard (pointers: ) register a new action to diff the current editor with the resource that can be handled with from the text document content provider (similar to ) Due to sensitivity of data inside the clipboard it would probably make sense to ask the user for confirmation that the clipboard is accessed. Related to\nHas someone taken up this issue? I am a complete beginner to the VSCode codebase, would I be able to contribute to this issue?\nnot yet, but it seems has started a similar PR in which could be used as input to this one. The difference is that the contents of the left hand side are coming from the clipboard instead of the file on disk.", "positive_passages": [{"docid": "doc-en-vscode-d3064d55f230dc43a4dd1213e990ff5c5cef71a167eda43f50d37be80e4fb11e", "text": "class NoUnexternalizedStringsRuleWalker extends Lint.RuleWalker { private static ImportFailureMessage = 'Do not use double qoutes for imports.'; private static ImportFailureMessage = 'Do not use double quotes for imports.'; private static DOUBLE_QUOTE: string = '\"';", "commid": "vscode_pr_37841"}], "negative_passages": []} {"query_id": "q-en-vscode-181f61b6239acba66352b3e89967487fa755c468ed8d30e6341c71c5ee3218df", "query": "when i want to compare a local file with a online resource file, i need to save the online file in project folder, and then do compare. it's a little inconvenient. It'll be great if i can copy the content of the online file, and right-click the local file, and choose \"compare with clipboard\".\nAn extension would be ideal for a feature like this.\nfyi\nIt would be great too if also is allowed to compare selection with clipboard.\nIt would be great if we could compare unsaved files...\nI would be open to a PR here, I think it is not a lot of work. Some pointers: register a new text document content provider to be able to open the left hand side of the diff editor to be the contents of the clipboard (pointers: ) register a new action to diff the current editor with the resource that can be handled with from the text document content provider (similar to ) Due to sensitivity of data inside the clipboard it would probably make sense to ask the user for confirmation that the clipboard is accessed. Related to\nHas someone taken up this issue? I am a complete beginner to the VSCode codebase, would I be able to contribute to this issue?\nnot yet, but it seems has started a similar PR in which could be used as input to this one. The difference is that the contents of the left hand side are coming from the clipboard instead of the file on disk.", "positive_passages": [{"docid": "doc-en-vscode-6d6b59ff74f9e45be9a72920fad3662a82904326ecddfd8eecc4b1635f8c4f3b", "text": "* Writes text to the system clipboard. */ writeText(text: string): void; /** * Reads the content of the clipboard in plain text */ readText(): string; } No newline at end of file", "commid": "vscode_pr_37841"}], "negative_passages": []} {"query_id": "q-en-vscode-181f61b6239acba66352b3e89967487fa755c468ed8d30e6341c71c5ee3218df", "query": "when i want to compare a local file with a online resource file, i need to save the online file in project folder, and then do compare. it's a little inconvenient. It'll be great if i can copy the content of the online file, and right-click the local file, and choose \"compare with clipboard\".\nAn extension would be ideal for a feature like this.\nfyi\nIt would be great too if also is allowed to compare selection with clipboard.\nIt would be great if we could compare unsaved files...\nI would be open to a PR here, I think it is not a lot of work. Some pointers: register a new text document content provider to be able to open the left hand side of the diff editor to be the contents of the clipboard (pointers: ) register a new action to diff the current editor with the resource that can be handled with from the text document content provider (similar to ) Due to sensitivity of data inside the clipboard it would probably make sense to ask the user for confirmation that the clipboard is accessed. Related to\nHas someone taken up this issue? I am a complete beginner to the VSCode codebase, would I be able to contribute to this issue?\nnot yet, but it seems has started a similar PR in which could be used as input to this one. The difference is that the contents of the left hand side are coming from the clipboard instead of the file on disk.", "positive_passages": [{"docid": "doc-en-vscode-7a85cae5220d9e77607527ca27cc49f0ebd5abfc8544ca3ea130ff0e7797ed52", "text": "public writeText(text: string): void { clipboard.writeText(text); } public readText(): string { return clipboard.readText(); } } No newline at end of file", "commid": "vscode_pr_37841"}], "negative_passages": []} {"query_id": "q-en-vscode-181f61b6239acba66352b3e89967487fa755c468ed8d30e6341c71c5ee3218df", "query": "when i want to compare a local file with a online resource file, i need to save the online file in project folder, and then do compare. it's a little inconvenient. It'll be great if i can copy the content of the online file, and right-click the local file, and choose \"compare with clipboard\".\nAn extension would be ideal for a feature like this.\nfyi\nIt would be great too if also is allowed to compare selection with clipboard.\nIt would be great if we could compare unsaved files...\nI would be open to a PR here, I think it is not a lot of work. Some pointers: register a new text document content provider to be able to open the left hand side of the diff editor to be the contents of the clipboard (pointers: ) register a new action to diff the current editor with the resource that can be handled with from the text document content provider (similar to ) Due to sensitivity of data inside the clipboard it would probably make sense to ask the user for confirmation that the clipboard is accessed. Related to\nHas someone taken up this issue? I am a complete beginner to the VSCode codebase, would I be able to contribute to this issue?\nnot yet, but it seems has started a similar PR in which could be used as input to this one. The difference is that the contents of the left hand side are coming from the clipboard instead of the file on disk.", "positive_passages": [{"docid": "doc-en-vscode-fbd80b2e63c1a97fcdf9c8ca62c03a8042a032003a3e1b183f57fb50f3ba64ba", "text": "import { Action, IAction } from 'vs/base/common/actions'; import { ActionItem, BaseActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor } from 'vs/workbench/browser/actions'; import { GlobalNewUntitledFileAction, SaveFileAsAction, ShowOpenedFileInNewWindow, CopyPathAction, GlobalCopyPathAction, RevealInOSAction, GlobalRevealInOSAction, pasteIntoFocusedFilesExplorerViewItem, FocusOpenEditorsView, FocusFilesExplorer, GlobalCompareResourcesAction, GlobalNewFileAction, GlobalNewFolderAction, RevertFileAction, SaveFilesAction, SaveAllAction, SaveFileAction, MoveFileToTrashAction, TriggerRenameFileAction, PasteFileAction, CopyFileAction, SelectResourceForCompareAction, CompareResourcesAction, NewFolderAction, NewFileAction, OpenToSideAction, ShowActiveFileInExplorer, CollapseExplorerView, RefreshExplorerView, CompareWithSavedAction } from 'vs/workbench/parts/files/browser/fileActions'; import { GlobalNewUntitledFileAction, SaveFileAsAction, ShowOpenedFileInNewWindow, CopyPathAction, GlobalCopyPathAction, RevealInOSAction, GlobalRevealInOSAction, pasteIntoFocusedFilesExplorerViewItem, FocusOpenEditorsView, FocusFilesExplorer, GlobalCompareResourcesAction, GlobalNewFileAction, GlobalNewFolderAction, RevertFileAction, SaveFilesAction, SaveAllAction, SaveFileAction, MoveFileToTrashAction, TriggerRenameFileAction, PasteFileAction, CopyFileAction, SelectResourceForCompareAction, CompareResourcesAction, NewFolderAction, NewFileAction, OpenToSideAction, ShowActiveFileInExplorer, CollapseExplorerView, RefreshExplorerView, CompareWithSavedAction, CompareWithClipboardAction } from 'vs/workbench/parts/files/browser/fileActions'; import { revertLocalChangesCommand, acceptLocalChangesCommand, CONFLICT_RESOLUTION_CONTEXT } from 'vs/workbench/parts/files/browser/saveErrorHandler'; import { SyncActionDescriptor, MenuId, MenuRegistry } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions';", "commid": "vscode_pr_37841"}], "negative_passages": []} {"query_id": "q-en-vscode-181f61b6239acba66352b3e89967487fa755c468ed8d30e6341c71c5ee3218df", "query": "when i want to compare a local file with a online resource file, i need to save the online file in project folder, and then do compare. it's a little inconvenient. It'll be great if i can copy the content of the online file, and right-click the local file, and choose \"compare with clipboard\".\nAn extension would be ideal for a feature like this.\nfyi\nIt would be great too if also is allowed to compare selection with clipboard.\nIt would be great if we could compare unsaved files...\nI would be open to a PR here, I think it is not a lot of work. Some pointers: register a new text document content provider to be able to open the left hand side of the diff editor to be the contents of the clipboard (pointers: ) register a new action to diff the current editor with the resource that can be handled with from the text document content provider (similar to ) Due to sensitivity of data inside the clipboard it would probably make sense to ask the user for confirmation that the clipboard is accessed. Related to\nHas someone taken up this issue? I am a complete beginner to the VSCode codebase, would I be able to contribute to this issue?\nnot yet, but it seems has started a similar PR in which could be used as input to this one. The difference is that the contents of the left hand side are coming from the clipboard instead of the file on disk.", "positive_passages": [{"docid": "doc-en-vscode-29f127d9e4d50bd641083ad32972db27d2def204fa9feb04e02941b64bddc2f3", "text": "registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalRevealInOSAction, GlobalRevealInOSAction.ID, GlobalRevealInOSAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_R) }), 'File: Reveal Active File', category); registry.registerWorkbenchAction(new SyncActionDescriptor(ShowOpenedFileInNewWindow, ShowOpenedFileInNewWindow.ID, ShowOpenedFileInNewWindow.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_O) }), 'File: Open Active File in New Window', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CompareWithSavedAction, CompareWithSavedAction.ID, CompareWithSavedAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_D) }), 'File: Compare Active File with Saved', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CompareWithClipboardAction, CompareWithClipboardAction.ID, CompareWithClipboardAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_C) }), 'File: Compare Active File with Clipboard', category); // Commands CommandsRegistry.registerCommand('_files.windowOpen', openWindowCommand);", "commid": "vscode_pr_37841"}], "negative_passages": []} {"query_id": "q-en-vscode-181f61b6239acba66352b3e89967487fa755c468ed8d30e6341c71c5ee3218df", "query": "when i want to compare a local file with a online resource file, i need to save the online file in project folder, and then do compare. it's a little inconvenient. It'll be great if i can copy the content of the online file, and right-click the local file, and choose \"compare with clipboard\".\nAn extension would be ideal for a feature like this.\nfyi\nIt would be great too if also is allowed to compare selection with clipboard.\nIt would be great if we could compare unsaved files...\nI would be open to a PR here, I think it is not a lot of work. Some pointers: register a new text document content provider to be able to open the left hand side of the diff editor to be the contents of the clipboard (pointers: ) register a new action to diff the current editor with the resource that can be handled with from the text document content provider (similar to ) Due to sensitivity of data inside the clipboard it would probably make sense to ask the user for confirmation that the clipboard is accessed. Related to\nHas someone taken up this issue? I am a complete beginner to the VSCode codebase, would I be able to contribute to this issue?\nnot yet, but it seems has started a similar PR in which could be used as input to this one. The difference is that the contents of the left hand side are coming from the clipboard instead of the file on disk.", "positive_passages": [{"docid": "doc-en-vscode-86fd04aa4f629b39b24fb714f60eb3b942391e85e3ef61bd48381d1bca6be132", "text": "import { IMessageService, IMessageWithAction, IConfirmation, Severity, CancelAction, IConfirmationResult } from 'vs/platform/message/common/message'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService'; import { IEditorViewState } from 'vs/editor/common/editorCommon'; import { IEditorViewState, IModel } from 'vs/editor/common/editorCommon'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { IWindowsService } from 'vs/platform/windows/common/windows'; import { withFocusedFilesExplorer, revealInOSCommand, revealInExplorerCommand, copyPathCommand } from 'vs/workbench/parts/files/browser/fileCommands'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { ITextModelService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; import { IConfigurationService, ConfigurationTarget } from 'vs/platform/configuration/common/configuration'; import { once } from 'vs/base/common/event'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IModelService } from 'vs/editor/common/services/modelService'; export interface IEditableData { action: IAction;", "commid": "vscode_pr_37841"}], "negative_passages": []} {"query_id": "q-en-vscode-181f61b6239acba66352b3e89967487fa755c468ed8d30e6341c71c5ee3218df", "query": "when i want to compare a local file with a online resource file, i need to save the online file in project folder, and then do compare. it's a little inconvenient. It'll be great if i can copy the content of the online file, and right-click the local file, and choose \"compare with clipboard\".\nAn extension would be ideal for a feature like this.\nfyi\nIt would be great too if also is allowed to compare selection with clipboard.\nIt would be great if we could compare unsaved files...\nI would be open to a PR here, I think it is not a lot of work. Some pointers: register a new text document content provider to be able to open the left hand side of the diff editor to be the contents of the clipboard (pointers: ) register a new action to diff the current editor with the resource that can be handled with from the text document content provider (similar to ) Due to sensitivity of data inside the clipboard it would probably make sense to ask the user for confirmation that the clipboard is accessed. Related to\nHas someone taken up this issue? I am a complete beginner to the VSCode codebase, would I be able to contribute to this issue?\nnot yet, but it seems has started a similar PR in which could be used as input to this one. The difference is that the contents of the left hand side are coming from the clipboard instead of the file on disk.", "positive_passages": [{"docid": "doc-en-vscode-9308ae6cd354a215d13c340d5842f4037373ea11e233dfacf405d00149417780", "text": "} } export class CompareWithClipboardAction extends Action { public static ID = 'workbench.files.action.compareWithClipboard'; public static LABEL = nls.localize('compareWithClipboard', \"Compare Active File with Clipboard\"); private static SCHEME = 'clipboard'; private toDispose: IDisposable[]; constructor( id: string, label: string, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IInstantiationService private instantiationService: IInstantiationService, @ITextModelService private textModelService: ITextModelService, ) { super(id, label); this.enabled = true; this.toDispose = []; } public run(): TPromise { let resource: URI = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' } ); const provider = this.instantiationService.createInstance(ClipboardContentProvider); const registrationDisposal = this.textModelService.registerTextModelContentProvider(CompareWithClipboardAction.SCHEME, provider); this.toDispose.push(registrationDisposal); if (resource) { const name = paths.basename(resource.fsPath); const editorLabel = nls.localize('clipboardComparisonLabel', \"Clipboard \u2194 {0}\", name); return this.editorService.openEditor({ leftResource: URI.from({ scheme: CompareWithClipboardAction.SCHEME, path: resource.fsPath }), rightResource: resource, label: editorLabel }); } return TPromise.as(true); } public dispose(): void { super.dispose(); this.toDispose = dispose(this.toDispose); } } class ClipboardContentProvider implements ITextModelContentProvider { constructor( @IClipboardService private clipboardService: IClipboardService, @IModeService private modeService: IModeService, @IModelService private modelService: IModelService ) { } provideTextContent(resource: URI): TPromise { const model = this.modelService.createModel(this.clipboardService.readText(), this.modeService.getOrCreateMode('text/plain'), resource); return TPromise.as(model); } } // Diagnostics support let diag: (...args: any[]) => void; if (!diag) {", "commid": "vscode_pr_37841"}], "negative_passages": []} {"query_id": "q-en-vscode-1258bf932f264a3ab40bb3716a2b2dc7ec7f20005585c52c48abb70395819afa", "query": "VSCode Version: Version 1.3.0-insider (1.3.0-insider) OS Version: OS X El Capitan 10.11.5 Steps to Reproduce: on the non-link area of a code lens line that nothing at all happens Would really like it to at a minimum to focus the editor (if not already focused), but we really love it if it move the cursor to the previous line. I find myself VERY often clicking on that area to start typing above it and nothing happens.\nI'm assuming (maybe) that this wouldn't be a difficult change -- so if someone had the time to point me in the vague direction, I would be happy to attempt to open a PR for this. :)\nPR welcome! :) It is in I would extract the code that does the focus: to a closure called inside the method. Then, at you can call and then : The reason focusing is complicated is because IE has some weirdness around redirecting focus when coming from the URL bar and doing a mouse down. And the already is a good indicator that the view zone does not want to handle mouse events.", "positive_passages": [{"docid": "doc-en-vscode-7ce41709c55ab77826924e39ee7384b4b1c0781452547e406d944cea94d51744", "text": "getLineNumberAtVerticalOffset(verticalOffset: number): number; getVerticalOffsetForLineNumber(lineNumber: number): number; getWhitespaceAtVerticalOffset(verticalOffset:number): editorCommon.IViewWhitespaceViewportData; shouldSuppressMouseDownOnViewZone(viewZoneId:number): boolean; shouldSuppressMouseDownOnViewZone(viewZoneId: number): boolean; shouldSuppressMouseDownOnWidget(widgetId: string): boolean; /** * Decode an Editor.IPosition from a rendered dom node", "commid": "vscode_pr_9249"}], "negative_passages": []} {"query_id": "q-en-vscode-1258bf932f264a3ab40bb3716a2b2dc7ec7f20005585c52c48abb70395819afa", "query": "VSCode Version: Version 1.3.0-insider (1.3.0-insider) OS Version: OS X El Capitan 10.11.5 Steps to Reproduce: on the non-link area of a code lens line that nothing at all happens Would really like it to at a minimum to focus the editor (if not already focused), but we really love it if it move the cursor to the previous line. I find myself VERY often clicking on that area to start typing above it and nothing happens.\nI'm assuming (maybe) that this wouldn't be a difficult change -- so if someone had the time to point me in the vague direction, I would be happy to attempt to open a PR for this. :)\nPR welcome! :) It is in I would extract the code that does the focus: to a closure called inside the method. Then, at you can call and then : The reason focusing is complicated is because IE has some weirdness around redirecting focus when coming from the URL bar and doing a mouse down. And the already is a good indicator that the view zone does not want to handle mouse events.", "positive_passages": [{"docid": "doc-en-vscode-c62e4f9abbaebf9fb4a63fefe6b9cb12f5eb20f9739b0b46b882817c094035af", "text": "let targetIsLineNumbers = (t.type === editorCommon.MouseTargetType.GUTTER_LINE_NUMBERS); let selectOnLineNumbers = this._context.configuration.editor.viewInfo.selectOnLineNumbers; let targetIsViewZone = (t.type === editorCommon.MouseTargetType.CONTENT_VIEW_ZONE || t.type === editorCommon.MouseTargetType.GUTTER_VIEW_ZONE); let targetIsWidget = (t.type === editorCommon.MouseTargetType.CONTENT_WIDGET); let shouldHandle = e.leftButton; if (platform.isMacintosh && e.ctrlKey) { shouldHandle = false; } if (shouldHandle && (targetIsContent || (targetIsLineNumbers && selectOnLineNumbers))) { var focus = () => { if (browser.isIE11orEarlier) { // IE does not want to focus when coming in from the browser's address bar if ((e.browserEvent).fromElement) {", "commid": "vscode_pr_9249"}], "negative_passages": []} {"query_id": "q-en-vscode-1258bf932f264a3ab40bb3716a2b2dc7ec7f20005585c52c48abb70395819afa", "query": "VSCode Version: Version 1.3.0-insider (1.3.0-insider) OS Version: OS X El Capitan 10.11.5 Steps to Reproduce: on the non-link area of a code lens line that nothing at all happens Would really like it to at a minimum to focus the editor (if not already focused), but we really love it if it move the cursor to the previous line. I find myself VERY often clicking on that area to start typing above it and nothing happens.\nI'm assuming (maybe) that this wouldn't be a difficult change -- so if someone had the time to point me in the vague direction, I would be happy to attempt to open a PR for this. :)\nPR welcome! :) It is in I would extract the code that does the focus: to a closure called inside the method. Then, at you can call and then : The reason focusing is complicated is because IE has some weirdness around redirecting focus when coming from the URL bar and doing a mouse down. And the already is a good indicator that the view zone does not want to handle mouse events.", "positive_passages": [{"docid": "doc-en-vscode-ee36ef308bf2d2da39bc808b38fe1a5849a0b4f5c80cc6fcf19be70e7d8fce56", "text": "e.preventDefault(); this.viewHelper.focusTextArea(); } }; if (shouldHandle && (targetIsContent || (targetIsLineNumbers && selectOnLineNumbers))) { focus(); this._mouseDownOperation.start(t.type, e); } else if (targetIsGutter) {", "commid": "vscode_pr_9249"}], "negative_passages": []} {"query_id": "q-en-vscode-1258bf932f264a3ab40bb3716a2b2dc7ec7f20005585c52c48abb70395819afa", "query": "VSCode Version: Version 1.3.0-insider (1.3.0-insider) OS Version: OS X El Capitan 10.11.5 Steps to Reproduce: on the non-link area of a code lens line that nothing at all happens Would really like it to at a minimum to focus the editor (if not already focused), but we really love it if it move the cursor to the previous line. I find myself VERY often clicking on that area to start typing above it and nothing happens.\nI'm assuming (maybe) that this wouldn't be a difficult change -- so if someone had the time to point me in the vague direction, I would be happy to attempt to open a PR for this. :)\nPR welcome! :) It is in I would extract the code that does the focus: to a closure called inside the method. Then, at you can call and then : The reason focusing is complicated is because IE has some weirdness around redirecting focus when coming from the URL bar and doing a mouse down. And the already is a good indicator that the view zone does not want to handle mouse events.", "positive_passages": [{"docid": "doc-en-vscode-1c6cd73b18b7d60f3e36bc190e09477e815fb65c9a13318b1ca9e1e83cff368d", "text": "} else if (targetIsViewZone) { let viewZoneData = t.detail; if (this.viewHelper.shouldSuppressMouseDownOnViewZone(viewZoneData.viewZoneId)) { focus(); this._mouseDownOperation.start(t.type, e); e.preventDefault(); } } else if (targetIsWidget && this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)) { focus(); e.preventDefault(); } this.viewController.emitMouseDown({", "commid": "vscode_pr_9249"}], "negative_passages": []} {"query_id": "q-en-vscode-1258bf932f264a3ab40bb3716a2b2dc7ec7f20005585c52c48abb70395819afa", "query": "VSCode Version: Version 1.3.0-insider (1.3.0-insider) OS Version: OS X El Capitan 10.11.5 Steps to Reproduce: on the non-link area of a code lens line that nothing at all happens Would really like it to at a minimum to focus the editor (if not already focused), but we really love it if it move the cursor to the previous line. I find myself VERY often clicking on that area to start typing above it and nothing happens.\nI'm assuming (maybe) that this wouldn't be a difficult change -- so if someone had the time to point me in the vague direction, I would be happy to attempt to open a PR for this. :)\nPR welcome! :) It is in I would extract the code that does the focus: to a closure called inside the method. Then, at you can call and then : The reason focusing is complicated is because IE has some weirdness around redirecting focus when coming from the URL bar and doing a mouse down. And the already is a good indicator that the view zone does not want to handle mouse events.", "positive_passages": [{"docid": "doc-en-vscode-b8ba47461734f84c433e41ce53f0b660d06d813f5d9a39ba31eb31caecf40213", "text": "} return this.viewZones.shouldSuppressMouseDownOnViewZone(viewZoneId); }, shouldSuppressMouseDownOnWidget: (widgetId: string) => { if (this._isDisposed) { throw new Error('ViewImpl.pointerHandler.shouldSuppressMouseDownOnWidget: View is disposed'); } return this.contentWidgets.shouldSuppressMouseDownOnWidget(widgetId); }, getPositionFromDOMInfo: (spanNode: HTMLElement, offset: number) => { if (this._isDisposed) { throw new Error('ViewImpl.pointerHandler.getPositionFromDOMInfo: View is disposed');", "commid": "vscode_pr_9249"}], "negative_passages": []} {"query_id": "q-en-vscode-1258bf932f264a3ab40bb3716a2b2dc7ec7f20005585c52c48abb70395819afa", "query": "VSCode Version: Version 1.3.0-insider (1.3.0-insider) OS Version: OS X El Capitan 10.11.5 Steps to Reproduce: on the non-link area of a code lens line that nothing at all happens Would really like it to at a minimum to focus the editor (if not already focused), but we really love it if it move the cursor to the previous line. I find myself VERY often clicking on that area to start typing above it and nothing happens.\nI'm assuming (maybe) that this wouldn't be a difficult change -- so if someone had the time to point me in the vague direction, I would be happy to attempt to open a PR for this. :)\nPR welcome! :) It is in I would extract the code that does the focus: to a closure called inside the method. Then, at you can call and then : The reason focusing is complicated is because IE has some weirdness around redirecting focus when coming from the URL bar and doing a mouse down. And the already is a good indicator that the view zone does not want to handle mouse events.", "positive_passages": [{"docid": "doc-en-vscode-5f3211ccf3237a363060522814194793f764d097b2856106b3e09483fb56ef66", "text": "} } public shouldSuppressMouseDownOnWidget(widgetId: string): boolean { if (this._widgets.hasOwnProperty(widgetId)) { let widgetData = this._widgets[widgetId]; return widgetData.widget.suppressMouseDown; } return false; } private _layoutBoxInViewport(position:Position, domNode:HTMLElement, ctx:IRenderingContext): IBoxLayoutResult { let visibleRange = ctx.visibleRangeForPosition(position);", "commid": "vscode_pr_9249"}], "negative_passages": []} {"query_id": "q-en-vscode-1258bf932f264a3ab40bb3716a2b2dc7ec7f20005585c52c48abb70395819afa", "query": "VSCode Version: Version 1.3.0-insider (1.3.0-insider) OS Version: OS X El Capitan 10.11.5 Steps to Reproduce: on the non-link area of a code lens line that nothing at all happens Would really like it to at a minimum to focus the editor (if not already focused), but we really love it if it move the cursor to the previous line. I find myself VERY often clicking on that area to start typing above it and nothing happens.\nI'm assuming (maybe) that this wouldn't be a difficult change -- so if someone had the time to point me in the vague direction, I would be happy to attempt to open a PR for this. :)\nPR welcome! :) It is in I would extract the code that does the focus: to a closure called inside the method. Then, at you can call and then : The reason focusing is complicated is because IE has some weirdness around redirecting focus when coming from the URL bar and doing a mouse down. And the already is a good indicator that the view zone does not want to handle mouse events.", "positive_passages": [{"docid": "doc-en-vscode-5ce23d7743ce78f024273db7303d6c2fc68df8038322bad3858b8a2a541772fe", "text": "private static ID: number = 0; public suppressMouseDown: boolean; private _id: string; private _domNode: HTMLElement;", "commid": "vscode_pr_9249"}], "negative_passages": []} {"query_id": "q-en-vscode-1258bf932f264a3ab40bb3716a2b2dc7ec7f20005585c52c48abb70395819afa", "query": "VSCode Version: Version 1.3.0-insider (1.3.0-insider) OS Version: OS X El Capitan 10.11.5 Steps to Reproduce: on the non-link area of a code lens line that nothing at all happens Would really like it to at a minimum to focus the editor (if not already focused), but we really love it if it move the cursor to the previous line. I find myself VERY often clicking on that area to start typing above it and nothing happens.\nI'm assuming (maybe) that this wouldn't be a difficult change -- so if someone had the time to point me in the vague direction, I would be happy to attempt to open a PR for this. :)\nPR welcome! :) It is in I would extract the code that does the focus: to a closure called inside the method. Then, at you can call and then : The reason focusing is complicated is because IE has some weirdness around redirecting focus when coming from the URL bar and doing a mouse down. And the already is a good indicator that the view zone does not want to handle mouse events.", "positive_passages": [{"docid": "doc-en-vscode-e62248c6afa5621ee4a8e912331db2d3f6d21be958df408a0c3f7fd6f614a0c6", "text": "this._id = 'codeLensWidget' + (++CodeLensContentWidget.ID); this._editor = editor; this.suppressMouseDown = true; this.setSymbolRange(symbolRange); this._domNode = document.createElement('span');", "commid": "vscode_pr_9249"}], "negative_passages": []} {"query_id": "q-en-vscode-1258bf932f264a3ab40bb3716a2b2dc7ec7f20005585c52c48abb70395819afa", "query": "VSCode Version: Version 1.3.0-insider (1.3.0-insider) OS Version: OS X El Capitan 10.11.5 Steps to Reproduce: on the non-link area of a code lens line that nothing at all happens Would really like it to at a minimum to focus the editor (if not already focused), but we really love it if it move the cursor to the previous line. I find myself VERY often clicking on that area to start typing above it and nothing happens.\nI'm assuming (maybe) that this wouldn't be a difficult change -- so if someone had the time to point me in the vague direction, I would be happy to attempt to open a PR for this. :)\nPR welcome! :) It is in I would extract the code that does the focus: to a closure called inside the method. Then, at you can call and then : The reason focusing is complicated is because IE has some weirdness around redirecting focus when coming from the URL bar and doing a mouse down. And the already is a good indicator that the view zone does not want to handle mouse events.", "positive_passages": [{"docid": "doc-en-vscode-832b607656d488c495de0ee328874be0da3b7118b1bc10743694051e37255c56", "text": "* Render this content widget in a location where it could overflow the editor's view dom node. */ allowEditorOverflow?: boolean; suppressMouseDown?: boolean; /** * Get a unique identifier of the content widget. */", "commid": "vscode_pr_9249"}], "negative_passages": []} {"query_id": "q-en-vscode-09f5e117e81d9e5bdec091f4c997089bfb0b4798d3891053b600f2d1bbc6fea6", "query": "VSCode Version: 1.5.0 OS Version: OS X 10.11.6 Steps to Reproduce: this snippet to use Then the example Focus is on the newly created terminal and not preserved.\nBug for", "positive_passages": [{"docid": "doc-en-vscode-5311db0cae2a2eaae4ad45f778ecc7930a348de9ebdfceae6d3f2a453be42739", "text": "public $show(terminalId: number, preserveFocus: boolean): void { this._terminalService.show(!preserveFocus).then((terminalPanel) => { this._terminalService.setActiveTerminalById(terminalId); if (!preserveFocus) { // If the panel was already showing an explicit focus call is necessary here. terminalPanel.focus(); } }); }", "commid": "vscode_pr_11419"}], "negative_passages": []} {"query_id": "q-en-vscode-09f5e117e81d9e5bdec091f4c997089bfb0b4798d3891053b600f2d1bbc6fea6", "query": "VSCode Version: 1.5.0 OS Version: OS X 10.11.6 Steps to Reproduce: this snippet to use Then the example Focus is on the newly created terminal and not preserved.\nBug for", "positive_passages": [{"docid": "doc-en-vscode-fef8a4b702ab05c9572fb4d07fe306732fe1328dcc62c209dd811d691d2a1548", "text": "export interface ITerminalPanel { closeTerminalById(terminalId: number): TPromise; focus(): void; sendTextToActiveTerminal(text: string, addNewLine: boolean): void; }", "commid": "vscode_pr_11419"}], "negative_passages": []} {"query_id": "q-en-vscode-09f5e117e81d9e5bdec091f4c997089bfb0b4798d3891053b600f2d1bbc6fea6", "query": "VSCode Version: 1.5.0 OS Version: OS X 10.11.6 Steps to Reproduce: this snippet to use Then the example Focus is on the newly created terminal and not preserved.\nBug for", "positive_passages": [{"docid": "doc-en-vscode-38755db06c2f5693ebddaa353e9bcded051b104e22dbfdc643c273ccaeffaba4", "text": "return this.show(false).then((terminalPanel) => { this.activeTerminalIndex = index; terminalPanel.setActiveTerminal(this.activeTerminalIndex); terminalPanel.focus(); this._onActiveInstanceChanged.fire(); }); }", "commid": "vscode_pr_11419"}], "negative_passages": []} {"query_id": "q-en-vscode-c802ada0b44750ffacdefb120b0549a0bdb3a04531582e8bd12fd7b5f07e79a7", "query": "VSCode Version: 1.5.3 (commit ) OS Version: Ubuntu Linux 14.04 Steps to Reproduce: some code that prints the characters to the output window. are incorrectly turned into a newline. F# Code: Output: This has already been reported as , but that bug was incorrectly closed as \"working as designed\" because it was assumed that the code in (I couldn't trace it further back than that). The character sequence is not the ANSI escape for a linefeed/newline; in fact, , since ANSI just uses the single character for that purpose. It's pretty clear, looking at the code, that that's what was the regex was intended to be set to in the lines just above the : it is set to . However, is actually an invalid Javascript hex escape. The specifies that must be followed by two hex digits, because otherwise the sequences (U+0007 BELL) and (U+000C FORM FEED) would be ambiguous. So is an invalid sequence, and is instead interpreted by Javascript as the character followed by the character (the backslash is swallowed). So the correct fix to bug is actually to replace that regex with . Then one could notice that the code immediately below is replacing all occurrences of with , which is a no-op since is . So the regex and the line serve no purpose but to slow things down by spending O(N) time doing a no-op regex search. They can safely be removed without affecting any other code, and this would actually speed things up a fraction.\nfyi\nYup, we should look into this and fix\nmight you be interested into doing a PR that fixes this since you have already done this great analysis? If not, we can follow your analysis to do the changes you proposed. Thanks either way!\nSure, why not? Here's the PR. Do you need me to sign a code licensing agreement of some kind before it can be merged in? If so, let me know how. UPDATE: Oh, I see that MSBOT replied on the PR's comment thread. I'm not surprised that no CLA is required for a commit that removed two lines and none.", "positive_passages": [{"docid": "doc-en-vscode-057f8c4a4a3e8425aabaa27634b9a8807e5b61fd29b83da32dd43df861f48d45", "text": "// Escape codes // http://en.wikipedia.org/wiki/ANSI_escape_code const EL = /x1Bx5B[12]?K/g; // Erase in line const LF = /xA/g; // line feed const COLOR_START = /x1b[d+m/g; // Color const COLOR_END = /x1b[0?m/g; // Color export function removeAnsiEscapeCodes(str: string): string { if (str) { str = str.replace(EL, ''); str = str.replace(LF, 'n'); str = str.replace(COLOR_START, ''); str = str.replace(COLOR_END, ''); }", "commid": "vscode_pr_13345"}], "negative_passages": []} {"query_id": "q-en-vscode-51f4c7e71ecebd0fc42cb014aa5cd2b6cf513272a8888e632bceb598640b9941", "query": "VSCode Version: 1.6.0 OS Version: windows7 Steps to Reproduce: Create a vscode extension project. Pull off the cable to keep offine. Launch Extension (F5) I cant set breakpoint in my source file. And I find some warn information in Extension Development Host Window : I change the code in Its works. fyi\nSounds like a potential PR fyi\nYeah, PR welcome.\ncan you elaborate why your change is fixing this? If I look at the docs of I can see that host per default is .\ncan`t be resolved when being offline. And fyi\nthanks", "positive_passages": [{"docid": "doc-en-vscode-0d2f5a85913e86ec82244b291822827e443c7b9dd76d741f50695c3c529dc474", "text": "return clb(startPort); }); client.connect(startPort); client.connect(startPort, '127.0.0.1'); } function dispose(socket: net.Socket): void {", "commid": "vscode_pr_13739"}], "negative_passages": []} {"query_id": "q-en-vscode-49a6e04313299b638bdf063b63202f9ab857773dfc5e59e34f2b8e381cfb762f", "query": "When you hover over a type in a TypeScript file, the tooltip that appears has a very low max width, making it difficult to read long type signatures.\nI would include a screenshot but it's not easy to take a screenshot keeping the tooltip on screen!\n! Errors are quite unreadable if the width does not adapt to the font size.\n! it would be nice if the tip used the available space instead of wrapping at an arbitrary point in c# too\n!\n! Same problem using rust's language server.\nGeneral styling control would be very helpful. Also line-height. Another approach would be to have a bottom panel that displays the full error and the tooltip displays a shortened version.\n!\n! When using the auto import feature it is often impossible to differentiate whats what as the import path is cut off due to the limited width of the suggestions window.\nIs this something we can adjust with custom css? It makes snippet infoormation very difficult to read as well. !\nSame in Python. We have to jump through hoops trying to flow doc nicely. And when it appears OK on Windows, it breaks on Mac... ! And it is inconsistent. Ex, hover is OK ! But completion list decides to wrap. What gives? ! Looks like hover respects markdown while completion item doc is plain string and gets wrapped randomly.\n!\nSomeone say long type signatures? !\nHere is a workaround by hacking the file \"C:Program FilesMicrosoft VS Coderesourcesappoutvsworkbench\" Simply append the code above after the original content of file, and restart VSCode. (Title bar may alert a warning message \"Not Supported\" and hacked changes would be overridden by updating VSCode) !\nIt would be nice to have some control on the width. The above does work but vscode presents the message your installation may be corrupt on restarting.\nInstead of hacking the CSS directly as mentioned above, I recommend using the to just override the current CSS. That way when VSCode updates, you can just reload the custom css file that you have specified (personally, I have a project where I hold configurations for my shell, Spacemacs, etc. and this custom CSS file goes there). Until it's officially supported, hacking the CSS is likely the best route. The suggested widths above were a bit much for me, so I settled on the following values for now:\nWhat is preventing the devs from providing a configuration option for this? This issue has been open for almost 2 years, and it bugs me on a daily basis. Would love to see it fixed.\n(since you seem like the most relevant person to ping) is anything likely to be done about this?\nI would love to hear an explanation from devs too. What are the difficulties of implementing this? I imagine it's settings a dynamic max-width and adding some more lines to add it in Settings. Are there other design blockers?\nWill you take a look at this? In 3 days it will be a 2 year anniversary for this simple feature request.\nAssigned to and as I remember we are going to have some UX improvements for editor tooltips and so on.\nmaybe now is the time to take this on? current iteration tries to solve parameter hints ux and this is not that much different\n! I employed CSS and put together full instructions: [Custom CSS and JS Loader extension][1] macOS VS Code: VS Code Insiders: Linux: : [1]: Restart VSCode Ignore \"VSCode is corrupt\" error You can choose to suppress this notice forever Run command \"Reload Custom CSS and JS\"\njust as a disclaimer, if anyone modifies the CSS/JS of the app, it comes up at \u201ccorrupted\u201d in diagnostic checks, and you\u2019ll typically get pushback if you report issues and include diagnostic information. Or, at least, I received pushback when I had custom CSS/JS enabled, and wouldn\u2019t receive help until I turned it off (even though it was harmless/not related to the issue I was having). While this is indeed an okay workaround, we should just keep making our voices heard so that this is natively supported.\n100% agree. This is just a workaround. It's hard enough to read TypeScript lint as it is! :)\nCurrenlty using VSCode 1.30.2, followed instructions step by step, but it's not working. I don't even get the VSCode corrupt error. I'm running Windows 10 (V.1803). Edit: It was my mistake. For anyone who's having trouble, make sure to run Enable Custom CSS and JS from the command palette. Simply restarting won't work.\nThis issue seems to be fixed in 1.32.0-insider (1.32.0-insider) . I hope this is an intended behavior. I want to thank the developers.\nThis change is related to . I confirmed that the max width of is still small as mentioned above. \"2019-02-22 .hover-contents:not(.code-hover-contents) { max-width: 500px; word-wrap: break-word; }", "commid": "vscode_pr_178811"}], "negative_passages": []} {"query_id": "q-en-vscode-49a6e04313299b638bdf063b63202f9ab857773dfc5e59e34f2b8e381cfb762f", "query": "When you hover over a type in a TypeScript file, the tooltip that appears has a very low max width, making it difficult to read long type signatures.\nI would include a screenshot but it's not easy to take a screenshot keeping the tooltip on screen!\n! Errors are quite unreadable if the width does not adapt to the font size.\n! it would be nice if the tip used the available space instead of wrapping at an arbitrary point in c# too\n!\n! Same problem using rust's language server.\nGeneral styling control would be very helpful. Also line-height. Another approach would be to have a bottom panel that displays the full error and the tooltip displays a shortened version.\n!\n! When using the auto import feature it is often impossible to differentiate whats what as the import path is cut off due to the limited width of the suggestions window.\nIs this something we can adjust with custom css? It makes snippet infoormation very difficult to read as well. !\nSame in Python. We have to jump through hoops trying to flow doc nicely. And when it appears OK on Windows, it breaks on Mac... ! And it is inconsistent. Ex, hover is OK ! But completion list decides to wrap. What gives? ! Looks like hover respects markdown while completion item doc is plain string and gets wrapped randomly.\n!\nSomeone say long type signatures? !\nHere is a workaround by hacking the file \"C:Program FilesMicrosoft VS Coderesourcesappoutvsworkbench\" Simply append the code above after the original content of file, and restart VSCode. (Title bar may alert a warning message \"Not Supported\" and hacked changes would be overridden by updating VSCode) !\nIt would be nice to have some control on the width. The above does work but vscode presents the message your installation may be corrupt on restarting.\nInstead of hacking the CSS directly as mentioned above, I recommend using the to just override the current CSS. That way when VSCode updates, you can just reload the custom css file that you have specified (personally, I have a project where I hold configurations for my shell, Spacemacs, etc. and this custom CSS file goes there). Until it's officially supported, hacking the CSS is likely the best route. The suggested widths above were a bit much for me, so I settled on the following values for now:\nWhat is preventing the devs from providing a configuration option for this? This issue has been open for almost 2 years, and it bugs me on a daily basis. Would love to see it fixed.\n(since you seem like the most relevant person to ping) is anything likely to be done about this?\nI would love to hear an explanation from devs too. What are the difficulties of implementing this? I imagine it's settings a dynamic max-width and adding some more lines to add it in Settings. Are there other design blockers?\nWill you take a look at this? In 3 days it will be a 2 year anniversary for this simple feature request.\nAssigned to and as I remember we are going to have some UX improvements for editor tooltips and so on.\nmaybe now is the time to take this on? current iteration tries to solve parameter hints ux and this is not that much different\n! I employed CSS and put together full instructions: [Custom CSS and JS Loader extension][1] macOS VS Code: VS Code Insiders: Linux: : [1]: Restart VSCode Ignore \"VSCode is corrupt\" error You can choose to suppress this notice forever Run command \"Reload Custom CSS and JS\"\njust as a disclaimer, if anyone modifies the CSS/JS of the app, it comes up at \u201ccorrupted\u201d in diagnostic checks, and you\u2019ll typically get pushback if you report issues and include diagnostic information. Or, at least, I received pushback when I had custom CSS/JS enabled, and wouldn\u2019t receive help until I turned it off (even though it was harmless/not related to the issue I was having). While this is indeed an okay workaround, we should just keep making our voices heard so that this is natively supported.\n100% agree. This is just a workaround. It's hard enough to read TypeScript lint as it is! :)\nCurrenlty using VSCode 1.30.2, followed instructions step by step, but it's not working. I don't even get the VSCode corrupt error. I'm running Windows 10 (V.1803). Edit: It was my mistake. For anyone who's having trouble, make sure to run Enable Custom CSS and JS from the command palette. Simply restarting won't work.\nThis issue seems to be fixed in 1.32.0-insider (1.32.0-insider) . I hope this is an intended behavior. I want to thank the developers.\nThis change is related to . I confirmed that the max width of is still small as mentioned above. \"2019-02-22 background: transparent; background: red; } .monaco-workbench:not(.reduce-motion) .monaco-sash:before {", "commid": "vscode_pr_178811"}], "negative_passages": []} {"query_id": "q-en-vscode-49a6e04313299b638bdf063b63202f9ab857773dfc5e59e34f2b8e381cfb762f", "query": "When you hover over a type in a TypeScript file, the tooltip that appears has a very low max width, making it difficult to read long type signatures.\nI would include a screenshot but it's not easy to take a screenshot keeping the tooltip on screen!\n! Errors are quite unreadable if the width does not adapt to the font size.\n! it would be nice if the tip used the available space instead of wrapping at an arbitrary point in c# too\n!\n! Same problem using rust's language server.\nGeneral styling control would be very helpful. Also line-height. Another approach would be to have a bottom panel that displays the full error and the tooltip displays a shortened version.\n!\n! When using the auto import feature it is often impossible to differentiate whats what as the import path is cut off due to the limited width of the suggestions window.\nIs this something we can adjust with custom css? It makes snippet infoormation very difficult to read as well. !\nSame in Python. We have to jump through hoops trying to flow doc nicely. And when it appears OK on Windows, it breaks on Mac... ! And it is inconsistent. Ex, hover is OK ! But completion list decides to wrap. What gives? ! Looks like hover respects markdown while completion item doc is plain string and gets wrapped randomly.\n!\nSomeone say long type signatures? !\nHere is a workaround by hacking the file \"C:Program FilesMicrosoft VS Coderesourcesappoutvsworkbench\" Simply append the code above after the original content of file, and restart VSCode. (Title bar may alert a warning message \"Not Supported\" and hacked changes would be overridden by updating VSCode) !\nIt would be nice to have some control on the width. The above does work but vscode presents the message your installation may be corrupt on restarting.\nInstead of hacking the CSS directly as mentioned above, I recommend using the to just override the current CSS. That way when VSCode updates, you can just reload the custom css file that you have specified (personally, I have a project where I hold configurations for my shell, Spacemacs, etc. and this custom CSS file goes there). Until it's officially supported, hacking the CSS is likely the best route. The suggested widths above were a bit much for me, so I settled on the following values for now:\nWhat is preventing the devs from providing a configuration option for this? This issue has been open for almost 2 years, and it bugs me on a daily basis. Would love to see it fixed.\n(since you seem like the most relevant person to ping) is anything likely to be done about this?\nI would love to hear an explanation from devs too. What are the difficulties of implementing this? I imagine it's settings a dynamic max-width and adding some more lines to add it in Settings. Are there other design blockers?\nWill you take a look at this? In 3 days it will be a 2 year anniversary for this simple feature request.\nAssigned to and as I remember we are going to have some UX improvements for editor tooltips and so on.\nmaybe now is the time to take this on? current iteration tries to solve parameter hints ux and this is not that much different\n! I employed CSS and put together full instructions: [Custom CSS and JS Loader extension][1] macOS VS Code: VS Code Insiders: Linux: : [1]: Restart VSCode Ignore \"VSCode is corrupt\" error You can choose to suppress this notice forever Run command \"Reload Custom CSS and JS\"\njust as a disclaimer, if anyone modifies the CSS/JS of the app, it comes up at \u201ccorrupted\u201d in diagnostic checks, and you\u2019ll typically get pushback if you report issues and include diagnostic information. Or, at least, I received pushback when I had custom CSS/JS enabled, and wouldn\u2019t receive help until I turned it off (even though it was harmless/not related to the issue I was having). While this is indeed an okay workaround, we should just keep making our voices heard so that this is natively supported.\n100% agree. This is just a workaround. It's hard enough to read TypeScript lint as it is! :)\nCurrenlty using VSCode 1.30.2, followed instructions step by step, but it's not working. I don't even get the VSCode corrupt error. I'm running Windows 10 (V.1803). Edit: It was my mistake. For anyone who's having trouble, make sure to run Enable Custom CSS and JS from the command palette. Simply restarting won't work.\nThis issue seems to be fixed in 1.32.0-insider (1.32.0-insider) . I hope this is an intended behavior. I want to thank the developers.\nThis change is related to . I confirmed that the max width of is still small as mentioned above. \"2019-02-22 import { ResizableHoverWidget } from 'vs/editor/contrib/hover/browser/resizableHoverWidget'; const $ = dom.$; export class ContentHoverController extends Disposable { private readonly _participants: IEditorHoverParticipant[]; private readonly _widget = this._register(this._instantiationService.createInstance(ContentHoverWidget, this._editor)); // INITIALLY: private readonly _widget = this._register(this._instantiationService.createInstance(ContentHoverWidget, this._editor)); private readonly _widget; private readonly _computer: ContentHoverComputer; private readonly _hoverOperation: HoverOperation;", "commid": "vscode_pr_178811"}], "negative_passages": []} {"query_id": "q-en-vscode-49a6e04313299b638bdf063b63202f9ab857773dfc5e59e34f2b8e381cfb762f", "query": "When you hover over a type in a TypeScript file, the tooltip that appears has a very low max width, making it difficult to read long type signatures.\nI would include a screenshot but it's not easy to take a screenshot keeping the tooltip on screen!\n! Errors are quite unreadable if the width does not adapt to the font size.\n! it would be nice if the tip used the available space instead of wrapping at an arbitrary point in c# too\n!\n! Same problem using rust's language server.\nGeneral styling control would be very helpful. Also line-height. Another approach would be to have a bottom panel that displays the full error and the tooltip displays a shortened version.\n!\n! When using the auto import feature it is often impossible to differentiate whats what as the import path is cut off due to the limited width of the suggestions window.\nIs this something we can adjust with custom css? It makes snippet infoormation very difficult to read as well. !\nSame in Python. We have to jump through hoops trying to flow doc nicely. And when it appears OK on Windows, it breaks on Mac... ! And it is inconsistent. Ex, hover is OK ! But completion list decides to wrap. What gives? ! Looks like hover respects markdown while completion item doc is plain string and gets wrapped randomly.\n!\nSomeone say long type signatures? !\nHere is a workaround by hacking the file \"C:Program FilesMicrosoft VS Coderesourcesappoutvsworkbench\" Simply append the code above after the original content of file, and restart VSCode. (Title bar may alert a warning message \"Not Supported\" and hacked changes would be overridden by updating VSCode) !\nIt would be nice to have some control on the width. The above does work but vscode presents the message your installation may be corrupt on restarting.\nInstead of hacking the CSS directly as mentioned above, I recommend using the to just override the current CSS. That way when VSCode updates, you can just reload the custom css file that you have specified (personally, I have a project where I hold configurations for my shell, Spacemacs, etc. and this custom CSS file goes there). Until it's officially supported, hacking the CSS is likely the best route. The suggested widths above were a bit much for me, so I settled on the following values for now:\nWhat is preventing the devs from providing a configuration option for this? This issue has been open for almost 2 years, and it bugs me on a daily basis. Would love to see it fixed.\n(since you seem like the most relevant person to ping) is anything likely to be done about this?\nI would love to hear an explanation from devs too. What are the difficulties of implementing this? I imagine it's settings a dynamic max-width and adding some more lines to add it in Settings. Are there other design blockers?\nWill you take a look at this? In 3 days it will be a 2 year anniversary for this simple feature request.\nAssigned to and as I remember we are going to have some UX improvements for editor tooltips and so on.\nmaybe now is the time to take this on? current iteration tries to solve parameter hints ux and this is not that much different\n! I employed CSS and put together full instructions: [Custom CSS and JS Loader extension][1] macOS VS Code: VS Code Insiders: Linux: : [1]: Restart VSCode Ignore \"VSCode is corrupt\" error You can choose to suppress this notice forever Run command \"Reload Custom CSS and JS\"\njust as a disclaimer, if anyone modifies the CSS/JS of the app, it comes up at \u201ccorrupted\u201d in diagnostic checks, and you\u2019ll typically get pushback if you report issues and include diagnostic information. Or, at least, I received pushback when I had custom CSS/JS enabled, and wouldn\u2019t receive help until I turned it off (even though it was harmless/not related to the issue I was having). While this is indeed an okay workaround, we should just keep making our voices heard so that this is natively supported.\n100% agree. This is just a workaround. It's hard enough to read TypeScript lint as it is! :)\nCurrenlty using VSCode 1.30.2, followed instructions step by step, but it's not working. I don't even get the VSCode corrupt error. I'm running Windows 10 (V.1803). Edit: It was my mistake. For anyone who's having trouble, make sure to run Enable Custom CSS and JS from the command palette. Simply restarting won't work.\nThis issue seems to be fixed in 1.32.0-insider (1.32.0-insider) . I hope this is an intended behavior. I want to thank the developers.\nThis change is related to . I confirmed that the max width of is still small as mentioned above. \"2019-02-22 this._widget = this._register(this._instantiationService.createInstance(ResizableHoverWidget, this._editor)); // Instantiate participants and sort them by `hoverOrdinal` which is relevant for rendering order. this._participants = []; for (const participant of HoverParticipantRegistry.getAll()) {", "commid": "vscode_pr_178811"}], "negative_passages": []} {"query_id": "q-en-vscode-49a6e04313299b638bdf063b63202f9ab857773dfc5e59e34f2b8e381cfb762f", "query": "When you hover over a type in a TypeScript file, the tooltip that appears has a very low max width, making it difficult to read long type signatures.\nI would include a screenshot but it's not easy to take a screenshot keeping the tooltip on screen!\n! Errors are quite unreadable if the width does not adapt to the font size.\n! it would be nice if the tip used the available space instead of wrapping at an arbitrary point in c# too\n!\n! Same problem using rust's language server.\nGeneral styling control would be very helpful. Also line-height. Another approach would be to have a bottom panel that displays the full error and the tooltip displays a shortened version.\n!\n! When using the auto import feature it is often impossible to differentiate whats what as the import path is cut off due to the limited width of the suggestions window.\nIs this something we can adjust with custom css? It makes snippet infoormation very difficult to read as well. !\nSame in Python. We have to jump through hoops trying to flow doc nicely. And when it appears OK on Windows, it breaks on Mac... ! And it is inconsistent. Ex, hover is OK ! But completion list decides to wrap. What gives? ! Looks like hover respects markdown while completion item doc is plain string and gets wrapped randomly.\n!\nSomeone say long type signatures? !\nHere is a workaround by hacking the file \"C:Program FilesMicrosoft VS Coderesourcesappoutvsworkbench\" Simply append the code above after the original content of file, and restart VSCode. (Title bar may alert a warning message \"Not Supported\" and hacked changes would be overridden by updating VSCode) !\nIt would be nice to have some control on the width. The above does work but vscode presents the message your installation may be corrupt on restarting.\nInstead of hacking the CSS directly as mentioned above, I recommend using the to just override the current CSS. That way when VSCode updates, you can just reload the custom css file that you have specified (personally, I have a project where I hold configurations for my shell, Spacemacs, etc. and this custom CSS file goes there). Until it's officially supported, hacking the CSS is likely the best route. The suggested widths above were a bit much for me, so I settled on the following values for now:\nWhat is preventing the devs from providing a configuration option for this? This issue has been open for almost 2 years, and it bugs me on a daily basis. Would love to see it fixed.\n(since you seem like the most relevant person to ping) is anything likely to be done about this?\nI would love to hear an explanation from devs too. What are the difficulties of implementing this? I imagine it's settings a dynamic max-width and adding some more lines to add it in Settings. Are there other design blockers?\nWill you take a look at this? In 3 days it will be a 2 year anniversary for this simple feature request.\nAssigned to and as I remember we are going to have some UX improvements for editor tooltips and so on.\nmaybe now is the time to take this on? current iteration tries to solve parameter hints ux and this is not that much different\n! I employed CSS and put together full instructions: [Custom CSS and JS Loader extension][1] macOS VS Code: VS Code Insiders: Linux: : [1]: Restart VSCode Ignore \"VSCode is corrupt\" error You can choose to suppress this notice forever Run command \"Reload Custom CSS and JS\"\njust as a disclaimer, if anyone modifies the CSS/JS of the app, it comes up at \u201ccorrupted\u201d in diagnostic checks, and you\u2019ll typically get pushback if you report issues and include diagnostic information. Or, at least, I received pushback when I had custom CSS/JS enabled, and wouldn\u2019t receive help until I turned it off (even though it was harmless/not related to the issue I was having). While this is indeed an okay workaround, we should just keep making our voices heard so that this is natively supported.\n100% agree. This is just a workaround. It's hard enough to read TypeScript lint as it is! :)\nCurrenlty using VSCode 1.30.2, followed instructions step by step, but it's not working. I don't even get the VSCode corrupt error. I'm running Windows 10 (V.1803). Edit: It was my mistake. For anyone who's having trouble, make sure to run Enable Custom CSS and JS from the command palette. Simply restarting won't work.\nThis issue seems to be fixed in 1.32.0-insider (1.32.0-insider) . I hope this is an intended behavior. I want to thank the developers.\nThis change is related to . I confirmed that the max width of is still small as mentioned above. \"2019-02-22 /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ .monaco-editor .resizable-widget { z-index: 40; display: block; } ", "commid": "vscode_pr_178811"}], "negative_passages": []} {"query_id": "q-en-vscode-49a6e04313299b638bdf063b63202f9ab857773dfc5e59e34f2b8e381cfb762f", "query": "When you hover over a type in a TypeScript file, the tooltip that appears has a very low max width, making it difficult to read long type signatures.\nI would include a screenshot but it's not easy to take a screenshot keeping the tooltip on screen!\n! Errors are quite unreadable if the width does not adapt to the font size.\n! it would be nice if the tip used the available space instead of wrapping at an arbitrary point in c# too\n!\n! Same problem using rust's language server.\nGeneral styling control would be very helpful. Also line-height. Another approach would be to have a bottom panel that displays the full error and the tooltip displays a shortened version.\n!\n! When using the auto import feature it is often impossible to differentiate whats what as the import path is cut off due to the limited width of the suggestions window.\nIs this something we can adjust with custom css? It makes snippet infoormation very difficult to read as well. !\nSame in Python. We have to jump through hoops trying to flow doc nicely. And when it appears OK on Windows, it breaks on Mac... ! And it is inconsistent. Ex, hover is OK ! But completion list decides to wrap. What gives? ! Looks like hover respects markdown while completion item doc is plain string and gets wrapped randomly.\n!\nSomeone say long type signatures? !\nHere is a workaround by hacking the file \"C:Program FilesMicrosoft VS Coderesourcesappoutvsworkbench\" Simply append the code above after the original content of file, and restart VSCode. (Title bar may alert a warning message \"Not Supported\" and hacked changes would be overridden by updating VSCode) !\nIt would be nice to have some control on the width. The above does work but vscode presents the message your installation may be corrupt on restarting.\nInstead of hacking the CSS directly as mentioned above, I recommend using the to just override the current CSS. That way when VSCode updates, you can just reload the custom css file that you have specified (personally, I have a project where I hold configurations for my shell, Spacemacs, etc. and this custom CSS file goes there). Until it's officially supported, hacking the CSS is likely the best route. The suggested widths above were a bit much for me, so I settled on the following values for now:\nWhat is preventing the devs from providing a configuration option for this? This issue has been open for almost 2 years, and it bugs me on a daily basis. Would love to see it fixed.\n(since you seem like the most relevant person to ping) is anything likely to be done about this?\nI would love to hear an explanation from devs too. What are the difficulties of implementing this? I imagine it's settings a dynamic max-width and adding some more lines to add it in Settings. Are there other design blockers?\nWill you take a look at this? In 3 days it will be a 2 year anniversary for this simple feature request.\nAssigned to and as I remember we are going to have some UX improvements for editor tooltips and so on.\nmaybe now is the time to take this on? current iteration tries to solve parameter hints ux and this is not that much different\n! I employed CSS and put together full instructions: [Custom CSS and JS Loader extension][1] macOS VS Code: VS Code Insiders: Linux: : [1]: Restart VSCode Ignore \"VSCode is corrupt\" error You can choose to suppress this notice forever Run command \"Reload Custom CSS and JS\"\njust as a disclaimer, if anyone modifies the CSS/JS of the app, it comes up at \u201ccorrupted\u201d in diagnostic checks, and you\u2019ll typically get pushback if you report issues and include diagnostic information. Or, at least, I received pushback when I had custom CSS/JS enabled, and wouldn\u2019t receive help until I turned it off (even though it was harmless/not related to the issue I was having). While this is indeed an okay workaround, we should just keep making our voices heard so that this is natively supported.\n100% agree. This is just a workaround. It's hard enough to read TypeScript lint as it is! :)\nCurrenlty using VSCode 1.30.2, followed instructions step by step, but it's not working. I don't even get the VSCode corrupt error. I'm running Windows 10 (V.1803). Edit: It was my mistake. For anyone who's having trouble, make sure to run Enable Custom CSS and JS from the command palette. Simply restarting won't work.\nThis issue seems to be fixed in 1.32.0-insider (1.32.0-insider) . I hope this is an intended behavior. I want to thank the developers.\nThis change is related to . I confirmed that the max width of is still small as mentioned above. \"2019-02-22 /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { IResizeEvent, ResizableHTMLElement } from 'vs/base/browser/ui/resizable/resizable'; import { DisposableStore, IDisposable } from 'vs/base/common/lifecycle'; import { ResourceMap } from 'vs/base/common/map'; import { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from 'vs/editor/browser/editorBrowser'; import { IPosition } from 'vs/editor/common/core/position'; import { PositionAffinity } from 'vs/editor/common/model'; import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; import * as dom from 'vs/base/browser/dom'; import { clamp } from 'vs/base/common/numbers'; import { EditorOption } from 'vs/editor/common/config/editorOptions'; import { Emitter, Event } from 'vs/base/common/event'; export abstract class ResizableWidget implements IDisposable { readonly element: ResizableHTMLElement; private readonly _disposables = new DisposableStore(); private readonly _persistingMechanism: IPersistingMechanism; constructor( private readonly _editor: ICodeEditor, private readonly _persistingOptions: IPersistingOptions, ) { console.log('Inside of ResizableWidget constructor'); this.element = new ResizableHTMLElement(); this.element.domNode.classList.add('editor-widget', 'resizable-widget'); if (this._persistingOptions instanceof SingleSizePersistingOptions) { this._persistingMechanism = new SingleSizePersistingMechanism(this, this.element, this._editor, this._persistingOptions); } else if (this._persistingOptions instanceof MultipleSizePersistingOptions) { this._persistingMechanism = new MultipleSizePersistingMechanism(this, this.element, this._editor); } else { throw new Error('Please specify a valid persisting mechanism'); } } dispose(): void { this._disposables.dispose(); this.element.dispose(); } resize(dimension: dom.Dimension): void { } hide(): void { this.element.clearSashHoverState(); } findMaximumRenderingHeight(): number | undefined { return Infinity; } findMaximumRenderingWidth(): number | undefined { return Infinity; } findPersistedSize(): dom.Dimension | undefined { return this._persistingMechanism.findSize(); } } export abstract class ResizableContentWidget implements IContentWidget { abstract ID: string; private _position: IPosition | null = null; private _secondaryPosition: IPosition | null = null; private _preference: ContentWidgetPositionPreference[] = []; private _positionAffinity: PositionAffinity | undefined = undefined; constructor(private readonly resizableWidget: ResizableWidget, private readonly editor: ICodeEditor) { this.editor.addContentWidget(this); console.log('Inisde of ResizableContentWidget constructor'); } findPersistedSize(): dom.Dimension | undefined { return this.resizableWidget.findPersistedSize(); } getId(): string { console.log('this.ID : ', this.ID); return this.ID; } getDomNode(): HTMLElement { console.log('Inside of getDomNode of ResizableContentWidget'); console.log('this.resizableWidget.element.domNode : ', this.resizableWidget.element.domNode); this.resizableWidget.element.domNode.style.zIndex = '49'; this.resizableWidget.element.domNode.style.position = 'fixed'; // this.resizableWidget.element.domNode.style.display = 'block'; return this.resizableWidget.element.domNode; } getPosition(): IContentWidgetPosition | null { console.log('Inside of getPosition of ResizableContentWidget'); const contentWidgetPosition = { position: this._position, secondaryPosition: this._secondaryPosition, preference: (this._preference), positionAffinity: this._positionAffinity }; console.log('contentWidgetPosition: ', contentWidgetPosition); return contentWidgetPosition; } hide(): void { this.editor.layoutContentWidget(this); } set position(position: IPosition | null) { this._position = position; } set secondaryPosition(position: IPosition | null) { this._secondaryPosition = position; } set preference(preference: ContentWidgetPositionPreference[]) { this._preference = preference; } set positionAffinity(affinity: PositionAffinity | undefined) { this._positionAffinity = affinity; } } interface IPersistingOptions { } export class SingleSizePersistingOptions implements IPersistingOptions { constructor( public readonly key: string, public readonly defaultSize: dom.Dimension, @IStorageService public readonly storageService: IStorageService ) { } } export class MultipleSizePersistingOptions implements IPersistingOptions { constructor() { } } interface IPersistingMechanism extends IDisposable { findSize(): dom.Dimension | undefined; } // TODO: maybe need to make more generic, this is specific to the suggest widget class SingleSizePersistingMechanism implements IPersistingMechanism { private readonly _persistedWidgetSize: PersistedWidgetSize | null = null; private readonly _disposables = new DisposableStore(); constructor( private readonly resizableWidget: ResizableWidget, private readonly element: ResizableHTMLElement, private readonly editor: ICodeEditor, private readonly persistingOptions: SingleSizePersistingOptions ) { this._persistedWidgetSize = new PersistedWidgetSize(this.persistingOptions.key, this.persistingOptions.storageService, this.editor); class ResizeState { constructor( readonly persistedSize: dom.Dimension | undefined, readonly currentSize: dom.Dimension, public persistHeight = false, public persistWidth = false, ) { } } let state: ResizeState | undefined; this._disposables.add(this.element.onDidWillResize(() => { // TODO: add back, this._contentWidget.lockPreference(); state = new ResizeState(this._persistedWidgetSize!.restore(), this.element.size); })); this._disposables.add(this.element.onDidResize(e => { this.resizableWidget.resize(new dom.Dimension(e.dimension.width, e.dimension.height)); if (state) { state.persistHeight = state.persistHeight || !!e.north || !!e.south; state.persistWidth = state.persistWidth || !!e.east || !!e.west; } if (!e.done) { return; } if (state) { const fontInfo = this.editor.getOption(EditorOption.fontInfo); const itemHeight = clamp(this.editor.getOption(EditorOption.suggestLineHeight) || fontInfo.lineHeight, 8, 1000); const threshold = Math.round(itemHeight / 2); let { width, height } = this.element.size; if (!state.persistHeight || Math.abs(state.currentSize.height - height) <= threshold) { height = state.persistedSize?.height ?? this.persistingOptions.defaultSize.height; } if (!state.persistWidth || Math.abs(state.currentSize.width - width) <= threshold) { width = state.persistedSize?.width ?? this.persistingOptions.defaultSize.width; } this._persistedWidgetSize!.store(new dom.Dimension(width, height)); } // TODO: add back, reset working state // this._contentWidget.unlockPreference(); state = undefined; })); } findSize(): dom.Dimension | undefined { return undefined; } dispose(): void { this._disposables.dispose(); } } class MultipleSizePersistingMechanism implements IPersistingMechanism { private readonly _persistedWidgetSizes: ResourceMap> = new ResourceMap>(); private readonly _disposables = new DisposableStore(); private _tooltipPosition: IPosition | null = null; // TODO: not sure if I need the following // private _initialHeight: number = 0; // private _initialTop: number = 0; private _resizing: boolean = false; private _size: dom.Dimension | undefined = undefined; private _maxRenderingHeight: number | undefined = Infinity; private _maxRenderingWidth: number | undefined = Infinity; private readonly _onDidResize = new Emitter(); readonly onDidResize: Event = this._onDidResize.event; // private _renderingAbove: ContentWidgetPositionPreference | undefined = undefined; constructor( private readonly resizableWidget: ResizableWidget, private readonly element: ResizableHTMLElement, public readonly editor: ICodeEditor ) { this.element.minSize = new dom.Dimension(10, 24); this._disposables.add(this.editor.onDidChangeModelContent((e) => { const uri = this.editor.getModel()?.uri; if (!uri || !this._persistedWidgetSizes.has(uri)) { return; } const persistedSizesForUri = this._persistedWidgetSizes.get(uri)!; const updatedPersistedSizesForUri = new Map(); for (const change of e.changes) { const changeOffset = change.rangeOffset; const rangeLength = change.rangeLength; const endOffset = changeOffset + rangeLength; const textLength = change.text.length; for (const key of persistedSizesForUri.keys()) { const parsedKey = JSON.parse(key); const tokenOffset = parsedKey[0]; const tokenLength = parsedKey[1]; if (endOffset < tokenOffset) { const oldSize = persistedSizesForUri.get(key)!; const newKey: [number, number] = [tokenOffset - rangeLength + textLength, tokenLength]; updatedPersistedSizesForUri.set(JSON.stringify(newKey), oldSize); } else if (changeOffset >= tokenOffset + tokenLength) { updatedPersistedSizesForUri.set(key, persistedSizesForUri.get(key)!); } } } this._persistedWidgetSizes.set(uri, updatedPersistedSizesForUri); })); this._disposables.add(this.element.onDidWillResize(() => { this._resizing = true; // this._initialHeight = this.element.domNode.clientHeight; // this._initialTop = this.element.domNode.offsetTop; })); this._disposables.add(this.element.onDidResize(e => { let height = e.dimension.height; let width = e.dimension.width; const maxWidth = this.element.maxSize.width; const maxHeight = this.element.maxSize.height; width = Math.min(maxWidth, width); height = Math.min(maxHeight, height); if (!this._maxRenderingHeight) { return; } this._size = new dom.Dimension(width, height); this.element.layout(height, width); // Calling the resize function of the this.resizableWidget.resize(new dom.Dimension(width, height)); // Update the top parameters only when we decided to render above // TODO: presumably do not need to resize the element // if (this._renderingAbove === ContentWidgetPositionPreference.ABOVE) { // \tthis.element.domNode.style.top = this._initialTop - (height - this._initialHeight) + 'px'; // } // const horizontalSashWidth = width - 2 * SASH_WIDTH + 2 * TOTAL_BORDER_WIDTH + 'px'; // this.element.northSash.el.style.width = horizontalSashWidth; // this.element.southSash.el.style.width = horizontalSashWidth; // const verticalSashWidth = height - 2 * SASH_WIDTH + 2 * TOTAL_BORDER_WIDTH + 'px'; // this.element.eastSash.el.style.height = verticalSashWidth; // this.element.westSash.el.style.height = verticalSashWidth; // this.element.eastSash.el.style.top = TOTAL_BORDER_WIDTH + 'px'; // Fire the current dimension // TODO: probably don't need to listen on the firing event? // this._onDidResize.fire({ dimension: this._size, done: false }); this._maxRenderingWidth = this.resizableWidget.findMaximumRenderingWidth(); this._maxRenderingHeight = this.resizableWidget.findMaximumRenderingHeight(); // this._maxRenderingHeight = this.resizableWidget.findMaximumRenderingHeight(this._renderingAbove); if (!this._maxRenderingHeight || !this._maxRenderingWidth) { return; } this.element.maxSize = new dom.Dimension(this._maxRenderingWidth, this._maxRenderingHeight); // Persist the height only when the resizing has stopped if (e.done) { if (!this.editor.hasModel()) { return; } const uri = this.editor.getModel().uri; if (!uri || !this._tooltipPosition) { return; } const persistedSize = new dom.Dimension(width, height); const wordPosition = this.editor.getModel().getWordAtPosition(this._tooltipPosition); if (!wordPosition) { return; } const offset = this.editor.getModel().getOffsetAt({ lineNumber: this._tooltipPosition.lineNumber, column: wordPosition.startColumn }); const length = wordPosition.word.length; // Suppose that the uri does not exist in the persisted widget hover sizes, then create a map if (!this._persistedWidgetSizes.get(uri)) { const persistedWidgetSizesForUri = new Map([]); persistedWidgetSizesForUri.set(JSON.stringify([offset, length]), persistedSize); this._persistedWidgetSizes.set(uri, persistedWidgetSizesForUri); } else { const persistedWidgetSizesForUri = this._persistedWidgetSizes.get(uri)!; persistedWidgetSizesForUri.set(JSON.stringify([offset, length]), persistedSize); } this._resizing = false; } // this.editor.layoutOverlayWidget(this); // this.editor.render(); })); } set tooltipPosition(position: IPosition) { this._tooltipPosition = position; } findSize(): dom.Dimension | undefined { console.log('Inside of findSize of the MultiplePersistingMechanisms'); if (!this._tooltipPosition || !this.editor.hasModel()) { return; } const wordPosition = this.editor.getModel().getWordAtPosition(this._tooltipPosition); if (!wordPosition) { return; } const offset = this.editor.getModel().getOffsetAt({ lineNumber: this._tooltipPosition.lineNumber, column: wordPosition.startColumn }); const length = wordPosition.word.length; const uri = this.editor.getModel().uri; const persistedSizesForUri = this._persistedWidgetSizes.get(uri); if (!persistedSizesForUri) { return; } return persistedSizesForUri.get(JSON.stringify([offset, length])); } dispose(): void { this._disposables.dispose(); } } class PersistedWidgetSize { constructor( private readonly _key: string, private readonly _service: IStorageService, editor: ICodeEditor ) { } restore(): dom.Dimension | undefined { const raw = this._service.get(this._key, StorageScope.PROFILE) ?? ''; try { const obj = JSON.parse(raw); if (dom.Dimension.is(obj)) { return dom.Dimension.lift(obj); } } catch { // ignore } return undefined; } store(size: dom.Dimension) { this._service.store(this._key, JSON.stringify(size), StorageScope.PROFILE, StorageTarget.MACHINE); } reset(): void { this._service.remove(this._key, StorageScope.PROFILE); } } ", "commid": "vscode_pr_178811"}], "negative_passages": []} {"query_id": "q-en-vscode-49a6e04313299b638bdf063b63202f9ab857773dfc5e59e34f2b8e381cfb762f", "query": "When you hover over a type in a TypeScript file, the tooltip that appears has a very low max width, making it difficult to read long type signatures.\nI would include a screenshot but it's not easy to take a screenshot keeping the tooltip on screen!\n! Errors are quite unreadable if the width does not adapt to the font size.\n! it would be nice if the tip used the available space instead of wrapping at an arbitrary point in c# too\n!\n! Same problem using rust's language server.\nGeneral styling control would be very helpful. Also line-height. Another approach would be to have a bottom panel that displays the full error and the tooltip displays a shortened version.\n!\n! When using the auto import feature it is often impossible to differentiate whats what as the import path is cut off due to the limited width of the suggestions window.\nIs this something we can adjust with custom css? It makes snippet infoormation very difficult to read as well. !\nSame in Python. We have to jump through hoops trying to flow doc nicely. And when it appears OK on Windows, it breaks on Mac... ! And it is inconsistent. Ex, hover is OK ! But completion list decides to wrap. What gives? ! Looks like hover respects markdown while completion item doc is plain string and gets wrapped randomly.\n!\nSomeone say long type signatures? !\nHere is a workaround by hacking the file \"C:Program FilesMicrosoft VS Coderesourcesappoutvsworkbench\" Simply append the code above after the original content of file, and restart VSCode. (Title bar may alert a warning message \"Not Supported\" and hacked changes would be overridden by updating VSCode) !\nIt would be nice to have some control on the width. The above does work but vscode presents the message your installation may be corrupt on restarting.\nInstead of hacking the CSS directly as mentioned above, I recommend using the to just override the current CSS. That way when VSCode updates, you can just reload the custom css file that you have specified (personally, I have a project where I hold configurations for my shell, Spacemacs, etc. and this custom CSS file goes there). Until it's officially supported, hacking the CSS is likely the best route. The suggested widths above were a bit much for me, so I settled on the following values for now:\nWhat is preventing the devs from providing a configuration option for this? This issue has been open for almost 2 years, and it bugs me on a daily basis. Would love to see it fixed.\n(since you seem like the most relevant person to ping) is anything likely to be done about this?\nI would love to hear an explanation from devs too. What are the difficulties of implementing this? I imagine it's settings a dynamic max-width and adding some more lines to add it in Settings. Are there other design blockers?\nWill you take a look at this? In 3 days it will be a 2 year anniversary for this simple feature request.\nAssigned to and as I remember we are going to have some UX improvements for editor tooltips and so on.\nmaybe now is the time to take this on? current iteration tries to solve parameter hints ux and this is not that much different\n! I employed CSS and put together full instructions: [Custom CSS and JS Loader extension][1] macOS VS Code: VS Code Insiders: Linux: : [1]: Restart VSCode Ignore \"VSCode is corrupt\" error You can choose to suppress this notice forever Run command \"Reload Custom CSS and JS\"\njust as a disclaimer, if anyone modifies the CSS/JS of the app, it comes up at \u201ccorrupted\u201d in diagnostic checks, and you\u2019ll typically get pushback if you report issues and include diagnostic information. Or, at least, I received pushback when I had custom CSS/JS enabled, and wouldn\u2019t receive help until I turned it off (even though it was harmless/not related to the issue I was having). While this is indeed an okay workaround, we should just keep making our voices heard so that this is natively supported.\n100% agree. This is just a workaround. It's hard enough to read TypeScript lint as it is! :)\nCurrenlty using VSCode 1.30.2, followed instructions step by step, but it's not working. I don't even get the VSCode corrupt error. I'm running Windows 10 (V.1803). Edit: It was my mistake. For anyone who's having trouble, make sure to run Enable Custom CSS and JS from the command palette. Simply restarting won't work.\nThis issue seems to be fixed in 1.32.0-insider (1.32.0-insider) . I hope this is an intended behavior. I want to thank the developers.\nThis change is related to . I confirmed that the max width of is still small as mentioned above. \"2019-02-22 /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { HoverWidget } from 'vs/base/browser/ui/hover/hoverWidget'; import { DisposableStore } from 'vs/base/common/lifecycle'; import { ContentWidgetPositionPreference, ICodeEditor, IContentWidgetPosition } from 'vs/editor/browser/editorBrowser'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { MultipleSizePersistingOptions, ResizableContentWidget, ResizableWidget } from 'vs/editor/contrib/hover/browser/resizableContentWidget'; import * as dom from 'vs/base/browser/dom'; import { ConfigurationChangedEvent, EditorOption } from 'vs/editor/common/config/editorOptions'; import { Position } from 'vs/editor/common/core/position'; import { HoverStartSource } from 'vs/editor/contrib/hover/browser/hoverOperation'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { PositionAffinity } from 'vs/editor/common/model'; import { IEditorHoverColorPickerWidget } from 'vs/editor/contrib/hover/browser/hoverTypes'; const SCROLLBAR_WIDTH = 10; // TODO: maybe don't need the resizable widget class export class ResizableHoverWidget extends ResizableWidget { public ID = 'editor.contrib.resizableContentHoverWidget'; private hoverDisposables = new DisposableStore(); // The ContentWidget is a child of the resizable widget private resizableContentWidget: ResizableContentHoverWidget; public readonly allowEditorOverflow = true; public readonly _hover: HoverWidget = this.hoverDisposables.add(new HoverWidget()); private readonly editor: ICodeEditor; private readonly _hoverVisibleKey = EditorContextKeys.hoverVisible.bindTo(this._contextKeyService); private readonly _hoverFocusedKey = EditorContextKeys.hoverFocused.bindTo(this._contextKeyService); private readonly _focusTracker = this.hoverDisposables.add(dom.trackFocus(this.getDomNode())); private readonly _horizontalScrollingBy: number = 30; private _visibleData: ContentHoverVisibleData | null = null; private _renderingAbove: ContentWidgetPositionPreference; constructor( editor: ICodeEditor, @IContextKeyService private readonly _contextKeyService: IContextKeyService ) { super(editor, new MultipleSizePersistingOptions()); this.editor = editor; // create here the dom node and all other logic should go here that was in the super abstract class this.resizableContentWidget = new ResizableContentHoverWidget(this, editor); this._renderingAbove = this.editor.getOption(EditorOption.hover).above ? ContentWidgetPositionPreference.ABOVE : ContentWidgetPositionPreference.BELOW; this.hoverDisposables.add(this.element.onDidResize((e) => { // When the resizable hover overlay changes, resize the widget // this._widget.resize(e.dimension); })); this.hoverDisposables.add(this.editor.onDidLayoutChange(() => this._layout())); this.hoverDisposables.add(this.editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => { if (e.hasChanged(EditorOption.fontInfo)) { this._updateFont(); } })); this._setVisibleData(null); this._layout(); this.hoverDisposables.add(this._focusTracker.onDidFocus(() => { this._hoverFocusedKey.set(true); })); this.hoverDisposables.add(this._focusTracker.onDidBlur(() => { this._hoverFocusedKey.set(false); })); dom.append(this.element.domNode, this._hover.containerDomNode); } public get position(): Position | null { return this._visibleData?.showAtPosition ?? null; } public get isColorPickerVisible(): boolean { return Boolean(this._visibleData?.colorPicker); } public get isVisibleFromKeyboard(): boolean { return (this._visibleData?.source === HoverStartSource.Keyboard); } public get isVisible(): boolean { return this._hoverVisibleKey.get() ?? false; } public get renderingAbove(): ContentWidgetPositionPreference { return this._renderingAbove; } public set renderingAbove(renderingAbove: ContentWidgetPositionPreference) { this._renderingAbove = renderingAbove; } // NEW public override resize(size: dom.Dimension) { console.log('Inside of resize'); // Removing the max height and max width here - the max size is controlled by the resizable overlay this._hover.contentsDomNode.style.maxHeight = 'none'; this._hover.contentsDomNode.style.maxWidth = 'none'; const width = size.width + 'px'; // const width = size.width - 2 * SASH_WIDTH + TOTAL_BORDER_WIDTH + 'px'; this._hover.containerDomNode.style.width = width; this._hover.contentsDomNode.style.width = width; // const height = size.height - 2 * SASH_WIDTH + TOTAL_BORDER_WIDTH + 'px'; const height = size.height + 'px'; this._hover.containerDomNode.style.height = height; this._hover.contentsDomNode.style.height = height; const scrollDimensions = this._hover.scrollbar.getScrollDimensions(); const hasHorizontalScrollbar = (scrollDimensions.scrollWidth > scrollDimensions.width); if (hasHorizontalScrollbar) { // When there is a horizontal scroll-bar use a different height to make the scroll-bar visible const extraBottomPadding = `${this._hover.scrollbar.options.horizontalScrollbarSize}px`; if (this._hover.contentsDomNode.style.paddingBottom !== extraBottomPadding) { this._hover.contentsDomNode.style.paddingBottom = extraBottomPadding; } this._hover.contentsDomNode.style.height = size.height - SCROLLBAR_WIDTH + 'px'; // - 2 * SASH_WIDTH + TOTAL_BORDER_WIDTH } this._hover.scrollbar.scanDomNode(); this.editor.layoutContentWidget(this.resizableContentWidget); this.editor.render(); } public override findMaximumRenderingHeight(): number | undefined { if (!this.editor || !this.editor.hasModel() || !this._visibleData?.showAtPosition) { return; } const editorBox = dom.getDomNodePagePosition(this.editor.getDomNode()); const mouseBox = this.editor.getScrolledVisiblePosition(this._visibleData.showAtPosition); const bodyBox = dom.getClientArea(document.body); let availableSpace: number; if (this._renderingAbove === ContentWidgetPositionPreference.ABOVE) { availableSpace = editorBox.top + mouseBox.top - 30; } else { const mouseBottom = editorBox.top + mouseBox!.top + mouseBox!.height; availableSpace = bodyBox.height - mouseBottom; } let divMaxHeight = 0; for (const childHtmlElement of this._hover.contentsDomNode.children) { divMaxHeight += childHtmlElement.clientHeight; } if (this._hover.contentsDomNode.clientWidth < this._hover.contentsDomNode.scrollWidth) { divMaxHeight += SCROLLBAR_WIDTH; } return Math.min(availableSpace, divMaxHeight); } public findMaxRenderingWidth(): number | undefined { if (!this.editor || !this.editor.hasModel()) { return; } const editorBox = dom.getDomNodePagePosition(this.editor.getDomNode()); const widthOfEditor = editorBox.width; const leftOfEditor = editorBox.left; const glyphMarginWidth = this.editor.getLayoutInfo().glyphMarginWidth; const leftOfContainer = this._hover.containerDomNode.offsetLeft; return widthOfEditor + leftOfEditor - leftOfContainer - glyphMarginWidth; } public override dispose(): void { this.editor.removeContentWidget(this.resizableContentWidget); if (this._visibleData) { this._visibleData.disposables.dispose(); } super.dispose(); } public getDomNode() { return this._hover.containerDomNode; } public getContentsDomNode() { return this._hover.contentsDomNode; } public isMouseGettingCloser(posx: number, posy: number): boolean { if (!this._visibleData) { return false; } if (typeof this._visibleData.initialMousePosX === 'undefined' || typeof this._visibleData.initialMousePosY === 'undefined') { this._visibleData.initialMousePosX = posx; this._visibleData.initialMousePosY = posy; return false; } const widgetRect = dom.getDomNodePagePosition(this.resizableContentWidget.getDomNode()); if (typeof this._visibleData.closestMouseDistance === 'undefined') { this._visibleData.closestMouseDistance = computeDistanceFromPointToRectangle(this._visibleData.initialMousePosX, this._visibleData.initialMousePosY, widgetRect.left, widgetRect.top, widgetRect.width, widgetRect.height); } const distance = computeDistanceFromPointToRectangle(posx, posy, widgetRect.left, widgetRect.top, widgetRect.width, widgetRect.height); if (!distance || !this._visibleData.closestMouseDistance || distance > this._visibleData.closestMouseDistance + 4 /* tolerance of 4 pixels */) { // The mouse is getting farther away return false; } this._visibleData.closestMouseDistance = Math.min(this._visibleData.closestMouseDistance, distance); return true; } private _setVisibleData(visibleData: ContentHoverVisibleData | null): void { if (this._visibleData) { this._visibleData.disposables.dispose(); } this._visibleData = visibleData; this._hoverVisibleKey.set(!!this._visibleData); this._hover.containerDomNode.classList.toggle('hidden', !this._visibleData); } private _layout(): void { const height = Math.max(this.editor.getLayoutInfo().height / 4, 250); const { fontSize, lineHeight } = this.editor.getOption(EditorOption.fontInfo); this._hover.contentsDomNode.style.fontSize = `${fontSize}px`; this._hover.contentsDomNode.style.lineHeight = `${lineHeight / fontSize}`; this._hover.contentsDomNode.style.maxHeight = `${height}px`; this._hover.contentsDomNode.style.maxWidth = `${Math.max(this.editor.getLayoutInfo().width * 0.66, 500)}px`; } private _updateFont(): void { const codeClasses: HTMLElement[] = Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName('code')); codeClasses.forEach(node => this.editor.applyFontInfo(node)); } public showAt(node: DocumentFragment, visibleData: ContentHoverVisibleData): void { this.editor.addContentWidget(this.resizableContentWidget); const persistedSize = this.findPersistedSize(); if (!this.editor || !this.editor.hasModel()) { return; } this._setVisibleData(visibleData); this._hover.contentsDomNode.textContent = ''; this._hover.contentsDomNode.appendChild(node); this._hover.contentsDomNode.style.paddingBottom = ''; this._updateFont(); const containerDomNode = this.resizableContentWidget.getDomNode(); let height; // If the persisted size has already been found then set a maximum height and width if (!persistedSize) { this._hover.contentsDomNode.style.maxHeight = `${Math.max(this.editor.getLayoutInfo().height / 4, 250)}px`; this._hover.contentsDomNode.style.maxWidth = `${Math.max(this.editor.getLayoutInfo().width * 0.66, 500)}px`; this.onContentsChanged(); // Simply force a synchronous render on the editor // such that the widget does not really render with left = '0px' this.editor.render(); height = containerDomNode.clientHeight; } // When there is a persisted size then do not use a maximum height or width else { this._hover.contentsDomNode.style.maxHeight = 'none'; this._hover.contentsDomNode.style.maxWidth = 'none'; height = persistedSize.height; } // The dimensions of the document in which we are displaying the hover const bodyBox = dom.getClientArea(document.body); // Hard-coded in the hover.css file as 1.5em or 24px const minHeight = 24; // The full height is already passed in as a parameter const fullHeight = height; const editorBox = dom.getDomNodePagePosition(this.editor.getDomNode()); const mouseBox = this.editor.getScrolledVisiblePosition(visibleData.showAtPosition); // Position where the editor box starts + the top of the mouse box relatve to the editor + mouse box height const mouseBottom = editorBox.top + mouseBox.top + mouseBox.height; // Total height of the box minus the position of the bottom of the mouse, this is the maximum height below the mouse position const availableSpaceBelow = bodyBox.height - mouseBottom; // Max height below is the minimum of the available space below and the full height of the widget const maxHeightBelow = Math.min(availableSpaceBelow, fullHeight); // The available space above the mouse position is the height of the top of the editor plus the top of the mouse box relative to the editor const availableSpaceAbove = editorBox.top + mouseBox.top - 30; const maxHeightAbove = Math.min(availableSpaceAbove, fullHeight); // We find the maximum height of the widget possible on the top or on the bottom const maxHeight = Math.min(Math.max(maxHeightAbove, maxHeightBelow), fullHeight); if (height < minHeight) { height = minHeight; } if (height > maxHeight) { height = maxHeight; } // Determining whether we should render above or not ideally if (this.editor.getOption(EditorOption.hover).above) { this._renderingAbove = height <= maxHeightAbove ? ContentWidgetPositionPreference.ABOVE : ContentWidgetPositionPreference.BELOW; } else { this._renderingAbove = height <= maxHeightBelow ? ContentWidgetPositionPreference.BELOW : ContentWidgetPositionPreference.ABOVE; } // See https://github.com/microsoft/vscode/issues/140339 // TODO: Doing a second layout of the hover after force rendering the editor if (!persistedSize) { this.onContentsChanged(); } if (visibleData.stoleFocus) { this._hover.containerDomNode.focus(); } visibleData.colorPicker?.layout(); if (!this._visibleData) { return; } const clientHeight = this._hover.containerDomNode.clientHeight; const clientWidth = this._hover.containerDomNode.clientWidth; this.element.layout(clientHeight, clientWidth); this.resizableContentWidget.position = this._visibleData.showAtPosition; this.resizableContentWidget.secondaryPosition = this._visibleData.showAtSecondaryPosition; this.resizableContentWidget.preference = [this._renderingAbove]; this.resizableContentWidget.positionAffinity = this._visibleData.isBeforeContent ? PositionAffinity.LeftOfInjectedText : undefined; this.editor.layoutContentWidget(this.resizableContentWidget); this.editor.render(); console.log('At the end of showAt'); } public override hide(): void { this.element.clearSashHoverState(); if (this._visibleData) { const stoleFocus = this._visibleData.stoleFocus; this._setVisibleData(null); this.editor.layoutContentWidget(this.resizableContentWidget); if (stoleFocus) { this.editor.focus(); } } } // NEW public onContentsChanged(persistedSize?: dom.Dimension | undefined): void { console.log('Inside of onContentsChanged'); const containerDomNode = this.getDomNode(); const contentsDomNode = this.getContentsDomNode(); // Suppose a persisted size is defined if (persistedSize) { const widthMinusSash = Math.min(this.findMaximumRenderingWidth() ?? Infinity, persistedSize.width); // - SASH_WIDTH // const heightMinusSash = Math.min(this.findMaxRenderingHeight(this._renderingAbove) ?? Infinity, persistedSize.height - SASH_WIDTH); const heightMinusSash = Math.min(this.findMaximumRenderingHeight() ?? Infinity, persistedSize.height); // SASH_WIDTH // Already setting directly the height and width parameters containerDomNode.style.width = widthMinusSash + 'px'; containerDomNode.style.height = heightMinusSash + 'px'; contentsDomNode.style.width = widthMinusSash + 'px'; contentsDomNode.style.height = heightMinusSash + 'px'; } else { // Otherwise the height and width are set to auto containerDomNode.style.width = 'auto'; containerDomNode.style.height = 'auto'; contentsDomNode.style.width = 'auto'; contentsDomNode.style.height = 'auto'; } this.editor.layoutContentWidget(this.resizableContentWidget); this._hover.onContentsChanged(); const scrollDimensions = this._hover.scrollbar.getScrollDimensions(); const hasHorizontalScrollbar = (scrollDimensions.scrollWidth > scrollDimensions.width); if (hasHorizontalScrollbar) { // There is just a horizontal scrollbar const extraBottomPadding = `${this._hover.scrollbar.options.horizontalScrollbarSize}px`; let reposition = false; if (this._hover.contentsDomNode.style.paddingBottom !== extraBottomPadding) { this._hover.contentsDomNode.style.paddingBottom = extraBottomPadding; reposition = true; } const maxRenderingHeight = this.findMaximumRenderingHeight(); // Need the following code since we are using an exact height when using the persisted size. If not used the horizontal scrollbar would just not be visible. if (persistedSize && maxRenderingHeight) { containerDomNode.style.height = Math.min(maxRenderingHeight, persistedSize.height) + 'px'; // - SASH_WIDTH contentsDomNode.style.height = Math.min(maxRenderingHeight, persistedSize.height - SCROLLBAR_WIDTH) + 'px'; // - SASH_WIDTH reposition = true; } if (reposition) { this.editor.layoutContentWidget(this.resizableContentWidget); this._hover.onContentsChanged(); } } } // OLD FUNCTION /* public onContentsChanged(): void { this.editor.layoutContentWidget(this.resizableContentWidget); this._hover.onContentsChanged(); const scrollDimensions = this._hover.scrollbar.getScrollDimensions(); const hasHorizontalScrollbar = (scrollDimensions.scrollWidth > scrollDimensions.width); if (hasHorizontalScrollbar) { // There is just a horizontal scrollbar const extraBottomPadding = `${this._hover.scrollbar.options.horizontalScrollbarSize}px`; if (this._hover.contentsDomNode.style.paddingBottom !== extraBottomPadding) { this._hover.contentsDomNode.style.paddingBottom = extraBottomPadding; this.editor.layoutContentWidget(this.resizableContentWidget); this._hover.onContentsChanged(); } } } */ public clear(): void { this._hover.contentsDomNode.textContent = ''; } public focus(): void { this._hover.containerDomNode.focus(); } public scrollUp(): void { const scrollTop = this._hover.scrollbar.getScrollPosition().scrollTop; const fontInfo = this.editor.getOption(EditorOption.fontInfo); this._hover.scrollbar.setScrollPosition({ scrollTop: scrollTop - fontInfo.lineHeight }); } public scrollDown(): void { const scrollTop = this._hover.scrollbar.getScrollPosition().scrollTop; const fontInfo = this.editor.getOption(EditorOption.fontInfo); this._hover.scrollbar.setScrollPosition({ scrollTop: scrollTop + fontInfo.lineHeight }); } public scrollLeft(): void { const scrollLeft = this._hover.scrollbar.getScrollPosition().scrollLeft; this._hover.scrollbar.setScrollPosition({ scrollLeft: scrollLeft - this._horizontalScrollingBy }); } public scrollRight(): void { const scrollLeft = this._hover.scrollbar.getScrollPosition().scrollLeft; this._hover.scrollbar.setScrollPosition({ scrollLeft: scrollLeft + this._horizontalScrollingBy }); } public pageUp(): void { const scrollTop = this._hover.scrollbar.getScrollPosition().scrollTop; const scrollHeight = this._hover.scrollbar.getScrollDimensions().height; this._hover.scrollbar.setScrollPosition({ scrollTop: scrollTop - scrollHeight }); } public pageDown(): void { const scrollTop = this._hover.scrollbar.getScrollPosition().scrollTop; const scrollHeight = this._hover.scrollbar.getScrollDimensions().height; this._hover.scrollbar.setScrollPosition({ scrollTop: scrollTop + scrollHeight }); } public goToTop(): void { this._hover.scrollbar.setScrollPosition({ scrollTop: 0 }); } public goToBottom(): void { this._hover.scrollbar.setScrollPosition({ scrollTop: this._hover.scrollbar.getScrollDimensions().scrollHeight }); } public escape(): void { this.editor.focus(); } } export class ResizableContentHoverWidget extends ResizableContentWidget { public ID = 'editor.contrib.resizableContentHoverWidget'; private hoverDisposables = new DisposableStore(); constructor(resizableHoverWidget: ResizableHoverWidget, editor: ICodeEditor) { super(resizableHoverWidget, editor); console.log('Inside of resizable content hover widget'); } } class ContentHoverVisibleData { public closestMouseDistance: number | undefined = undefined; constructor( public readonly colorPicker: IEditorHoverColorPickerWidget | null, public readonly showAtPosition: Position, public readonly showAtSecondaryPosition: Position, public readonly preferAbove: boolean, public readonly stoleFocus: boolean, public readonly source: HoverStartSource, public readonly isBeforeContent: boolean, public initialMousePosX: number | undefined, public initialMousePosY: number | undefined, public readonly disposables: DisposableStore ) { } } function computeDistanceFromPointToRectangle(pointX: number, pointY: number, left: number, top: number, width: number, height: number): number { const x = (left + width / 2); // x center of rectangle const y = (top + height / 2); // y center of rectangle const dx = Math.max(Math.abs(pointX - x) - width / 2, 0); const dy = Math.max(Math.abs(pointY - y) - height / 2, 0); return Math.sqrt(dx * dx + dy * dy); } ", "commid": "vscode_pr_178811"}], "negative_passages": []} {"query_id": "q-en-vscode-49a6e04313299b638bdf063b63202f9ab857773dfc5e59e34f2b8e381cfb762f", "query": "When you hover over a type in a TypeScript file, the tooltip that appears has a very low max width, making it difficult to read long type signatures.\nI would include a screenshot but it's not easy to take a screenshot keeping the tooltip on screen!\n! Errors are quite unreadable if the width does not adapt to the font size.\n! it would be nice if the tip used the available space instead of wrapping at an arbitrary point in c# too\n!\n! Same problem using rust's language server.\nGeneral styling control would be very helpful. Also line-height. Another approach would be to have a bottom panel that displays the full error and the tooltip displays a shortened version.\n!\n! When using the auto import feature it is often impossible to differentiate whats what as the import path is cut off due to the limited width of the suggestions window.\nIs this something we can adjust with custom css? It makes snippet infoormation very difficult to read as well. !\nSame in Python. We have to jump through hoops trying to flow doc nicely. And when it appears OK on Windows, it breaks on Mac... ! And it is inconsistent. Ex, hover is OK ! But completion list decides to wrap. What gives? ! Looks like hover respects markdown while completion item doc is plain string and gets wrapped randomly.\n!\nSomeone say long type signatures? !\nHere is a workaround by hacking the file \"C:Program FilesMicrosoft VS Coderesourcesappoutvsworkbench\" Simply append the code above after the original content of file, and restart VSCode. (Title bar may alert a warning message \"Not Supported\" and hacked changes would be overridden by updating VSCode) !\nIt would be nice to have some control on the width. The above does work but vscode presents the message your installation may be corrupt on restarting.\nInstead of hacking the CSS directly as mentioned above, I recommend using the to just override the current CSS. That way when VSCode updates, you can just reload the custom css file that you have specified (personally, I have a project where I hold configurations for my shell, Spacemacs, etc. and this custom CSS file goes there). Until it's officially supported, hacking the CSS is likely the best route. The suggested widths above were a bit much for me, so I settled on the following values for now:\nWhat is preventing the devs from providing a configuration option for this? This issue has been open for almost 2 years, and it bugs me on a daily basis. Would love to see it fixed.\n(since you seem like the most relevant person to ping) is anything likely to be done about this?\nI would love to hear an explanation from devs too. What are the difficulties of implementing this? I imagine it's settings a dynamic max-width and adding some more lines to add it in Settings. Are there other design blockers?\nWill you take a look at this? In 3 days it will be a 2 year anniversary for this simple feature request.\nAssigned to and as I remember we are going to have some UX improvements for editor tooltips and so on.\nmaybe now is the time to take this on? current iteration tries to solve parameter hints ux and this is not that much different\n! I employed CSS and put together full instructions: [Custom CSS and JS Loader extension][1] macOS VS Code: VS Code Insiders: Linux: : [1]: Restart VSCode Ignore \"VSCode is corrupt\" error You can choose to suppress this notice forever Run command \"Reload Custom CSS and JS\"\njust as a disclaimer, if anyone modifies the CSS/JS of the app, it comes up at \u201ccorrupted\u201d in diagnostic checks, and you\u2019ll typically get pushback if you report issues and include diagnostic information. Or, at least, I received pushback when I had custom CSS/JS enabled, and wouldn\u2019t receive help until I turned it off (even though it was harmless/not related to the issue I was having). While this is indeed an okay workaround, we should just keep making our voices heard so that this is natively supported.\n100% agree. This is just a workaround. It's hard enough to read TypeScript lint as it is! :)\nCurrenlty using VSCode 1.30.2, followed instructions step by step, but it's not working. I don't even get the VSCode corrupt error. I'm running Windows 10 (V.1803). Edit: It was my mistake. For anyone who's having trouble, make sure to run Enable Custom CSS and JS from the command palette. Simply restarting won't work.\nThis issue seems to be fixed in 1.32.0-insider (1.32.0-insider) . I hope this is an intended behavior. I want to thank the developers.\nThis change is related to . I confirmed that the max width of is still small as mentioned above. \"2019-02-22 .hover-contents:not(.code-hover-contents) { max-width: 500px; word-wrap: break-word; }", "commid": "vscode_pr_185540"}], "negative_passages": []} {"query_id": "q-en-vscode-49a6e04313299b638bdf063b63202f9ab857773dfc5e59e34f2b8e381cfb762f", "query": "When you hover over a type in a TypeScript file, the tooltip that appears has a very low max width, making it difficult to read long type signatures.\nI would include a screenshot but it's not easy to take a screenshot keeping the tooltip on screen!\n! Errors are quite unreadable if the width does not adapt to the font size.\n! it would be nice if the tip used the available space instead of wrapping at an arbitrary point in c# too\n!\n! Same problem using rust's language server.\nGeneral styling control would be very helpful. Also line-height. Another approach would be to have a bottom panel that displays the full error and the tooltip displays a shortened version.\n!\n! When using the auto import feature it is often impossible to differentiate whats what as the import path is cut off due to the limited width of the suggestions window.\nIs this something we can adjust with custom css? It makes snippet infoormation very difficult to read as well. !\nSame in Python. We have to jump through hoops trying to flow doc nicely. And when it appears OK on Windows, it breaks on Mac... ! And it is inconsistent. Ex, hover is OK ! But completion list decides to wrap. What gives? ! Looks like hover respects markdown while completion item doc is plain string and gets wrapped randomly.\n!\nSomeone say long type signatures? !\nHere is a workaround by hacking the file \"C:Program FilesMicrosoft VS Coderesourcesappoutvsworkbench\" Simply append the code above after the original content of file, and restart VSCode. (Title bar may alert a warning message \"Not Supported\" and hacked changes would be overridden by updating VSCode) !\nIt would be nice to have some control on the width. The above does work but vscode presents the message your installation may be corrupt on restarting.\nInstead of hacking the CSS directly as mentioned above, I recommend using the to just override the current CSS. That way when VSCode updates, you can just reload the custom css file that you have specified (personally, I have a project where I hold configurations for my shell, Spacemacs, etc. and this custom CSS file goes there). Until it's officially supported, hacking the CSS is likely the best route. The suggested widths above were a bit much for me, so I settled on the following values for now:\nWhat is preventing the devs from providing a configuration option for this? This issue has been open for almost 2 years, and it bugs me on a daily basis. Would love to see it fixed.\n(since you seem like the most relevant person to ping) is anything likely to be done about this?\nI would love to hear an explanation from devs too. What are the difficulties of implementing this? I imagine it's settings a dynamic max-width and adding some more lines to add it in Settings. Are there other design blockers?\nWill you take a look at this? In 3 days it will be a 2 year anniversary for this simple feature request.\nAssigned to and as I remember we are going to have some UX improvements for editor tooltips and so on.\nmaybe now is the time to take this on? current iteration tries to solve parameter hints ux and this is not that much different\n! I employed CSS and put together full instructions: [Custom CSS and JS Loader extension][1] macOS VS Code: VS Code Insiders: Linux: : [1]: Restart VSCode Ignore \"VSCode is corrupt\" error You can choose to suppress this notice forever Run command \"Reload Custom CSS and JS\"\njust as a disclaimer, if anyone modifies the CSS/JS of the app, it comes up at \u201ccorrupted\u201d in diagnostic checks, and you\u2019ll typically get pushback if you report issues and include diagnostic information. Or, at least, I received pushback when I had custom CSS/JS enabled, and wouldn\u2019t receive help until I turned it off (even though it was harmless/not related to the issue I was having). While this is indeed an okay workaround, we should just keep making our voices heard so that this is natively supported.\n100% agree. This is just a workaround. It's hard enough to read TypeScript lint as it is! :)\nCurrenlty using VSCode 1.30.2, followed instructions step by step, but it's not working. I don't even get the VSCode corrupt error. I'm running Windows 10 (V.1803). Edit: It was my mistake. For anyone who's having trouble, make sure to run Enable Custom CSS and JS from the command palette. Simply restarting won't work.\nThis issue seems to be fixed in 1.32.0-insider (1.32.0-insider) . I hope this is an intended behavior. I want to thank the developers.\nThis change is related to . I confirmed that the max width of is still small as mentioned above. \"2019-02-22 background: transparent; background: red; } .monaco-workbench:not(.reduce-motion) .monaco-sash:before {", "commid": "vscode_pr_185540"}], "negative_passages": []} {"query_id": "q-en-vscode-49a6e04313299b638bdf063b63202f9ab857773dfc5e59e34f2b8e381cfb762f", "query": "When you hover over a type in a TypeScript file, the tooltip that appears has a very low max width, making it difficult to read long type signatures.\nI would include a screenshot but it's not easy to take a screenshot keeping the tooltip on screen!\n! Errors are quite unreadable if the width does not adapt to the font size.\n! it would be nice if the tip used the available space instead of wrapping at an arbitrary point in c# too\n!\n! Same problem using rust's language server.\nGeneral styling control would be very helpful. Also line-height. Another approach would be to have a bottom panel that displays the full error and the tooltip displays a shortened version.\n!\n! When using the auto import feature it is often impossible to differentiate whats what as the import path is cut off due to the limited width of the suggestions window.\nIs this something we can adjust with custom css? It makes snippet infoormation very difficult to read as well. !\nSame in Python. We have to jump through hoops trying to flow doc nicely. And when it appears OK on Windows, it breaks on Mac... ! And it is inconsistent. Ex, hover is OK ! But completion list decides to wrap. What gives? ! Looks like hover respects markdown while completion item doc is plain string and gets wrapped randomly.\n!\nSomeone say long type signatures? !\nHere is a workaround by hacking the file \"C:Program FilesMicrosoft VS Coderesourcesappoutvsworkbench\" Simply append the code above after the original content of file, and restart VSCode. (Title bar may alert a warning message \"Not Supported\" and hacked changes would be overridden by updating VSCode) !\nIt would be nice to have some control on the width. The above does work but vscode presents the message your installation may be corrupt on restarting.\nInstead of hacking the CSS directly as mentioned above, I recommend using the to just override the current CSS. That way when VSCode updates, you can just reload the custom css file that you have specified (personally, I have a project where I hold configurations for my shell, Spacemacs, etc. and this custom CSS file goes there). Until it's officially supported, hacking the CSS is likely the best route. The suggested widths above were a bit much for me, so I settled on the following values for now:\nWhat is preventing the devs from providing a configuration option for this? This issue has been open for almost 2 years, and it bugs me on a daily basis. Would love to see it fixed.\n(since you seem like the most relevant person to ping) is anything likely to be done about this?\nI would love to hear an explanation from devs too. What are the difficulties of implementing this? I imagine it's settings a dynamic max-width and adding some more lines to add it in Settings. Are there other design blockers?\nWill you take a look at this? In 3 days it will be a 2 year anniversary for this simple feature request.\nAssigned to and as I remember we are going to have some UX improvements for editor tooltips and so on.\nmaybe now is the time to take this on? current iteration tries to solve parameter hints ux and this is not that much different\n! I employed CSS and put together full instructions: [Custom CSS and JS Loader extension][1] macOS VS Code: VS Code Insiders: Linux: : [1]: Restart VSCode Ignore \"VSCode is corrupt\" error You can choose to suppress this notice forever Run command \"Reload Custom CSS and JS\"\njust as a disclaimer, if anyone modifies the CSS/JS of the app, it comes up at \u201ccorrupted\u201d in diagnostic checks, and you\u2019ll typically get pushback if you report issues and include diagnostic information. Or, at least, I received pushback when I had custom CSS/JS enabled, and wouldn\u2019t receive help until I turned it off (even though it was harmless/not related to the issue I was having). While this is indeed an okay workaround, we should just keep making our voices heard so that this is natively supported.\n100% agree. This is just a workaround. It's hard enough to read TypeScript lint as it is! :)\nCurrenlty using VSCode 1.30.2, followed instructions step by step, but it's not working. I don't even get the VSCode corrupt error. I'm running Windows 10 (V.1803). Edit: It was my mistake. For anyone who's having trouble, make sure to run Enable Custom CSS and JS from the command palette. Simply restarting won't work.\nThis issue seems to be fixed in 1.32.0-insider (1.32.0-insider) . I hope this is an intended behavior. I want to thank the developers.\nThis change is related to . I confirmed that the max width of is still small as mentioned above. \"2019-02-22 import { ResizableHoverWidget } from 'vs/editor/contrib/hover/browser/resizableHoverWidget'; const $ = dom.$; export class ContentHoverController extends Disposable { private readonly _participants: IEditorHoverParticipant[]; private readonly _widget = this._register(this._instantiationService.createInstance(ContentHoverWidget, this._editor)); // INITIALLY: private readonly _widget = this._register(this._instantiationService.createInstance(ContentHoverWidget, this._editor)); private readonly _widget; private readonly _computer: ContentHoverComputer; private readonly _hoverOperation: HoverOperation;", "commid": "vscode_pr_185540"}], "negative_passages": []} {"query_id": "q-en-vscode-49a6e04313299b638bdf063b63202f9ab857773dfc5e59e34f2b8e381cfb762f", "query": "When you hover over a type in a TypeScript file, the tooltip that appears has a very low max width, making it difficult to read long type signatures.\nI would include a screenshot but it's not easy to take a screenshot keeping the tooltip on screen!\n! Errors are quite unreadable if the width does not adapt to the font size.\n! it would be nice if the tip used the available space instead of wrapping at an arbitrary point in c# too\n!\n! Same problem using rust's language server.\nGeneral styling control would be very helpful. Also line-height. Another approach would be to have a bottom panel that displays the full error and the tooltip displays a shortened version.\n!\n! When using the auto import feature it is often impossible to differentiate whats what as the import path is cut off due to the limited width of the suggestions window.\nIs this something we can adjust with custom css? It makes snippet infoormation very difficult to read as well. !\nSame in Python. We have to jump through hoops trying to flow doc nicely. And when it appears OK on Windows, it breaks on Mac... ! And it is inconsistent. Ex, hover is OK ! But completion list decides to wrap. What gives? ! Looks like hover respects markdown while completion item doc is plain string and gets wrapped randomly.\n!\nSomeone say long type signatures? !\nHere is a workaround by hacking the file \"C:Program FilesMicrosoft VS Coderesourcesappoutvsworkbench\" Simply append the code above after the original content of file, and restart VSCode. (Title bar may alert a warning message \"Not Supported\" and hacked changes would be overridden by updating VSCode) !\nIt would be nice to have some control on the width. The above does work but vscode presents the message your installation may be corrupt on restarting.\nInstead of hacking the CSS directly as mentioned above, I recommend using the to just override the current CSS. That way when VSCode updates, you can just reload the custom css file that you have specified (personally, I have a project where I hold configurations for my shell, Spacemacs, etc. and this custom CSS file goes there). Until it's officially supported, hacking the CSS is likely the best route. The suggested widths above were a bit much for me, so I settled on the following values for now:\nWhat is preventing the devs from providing a configuration option for this? This issue has been open for almost 2 years, and it bugs me on a daily basis. Would love to see it fixed.\n(since you seem like the most relevant person to ping) is anything likely to be done about this?\nI would love to hear an explanation from devs too. What are the difficulties of implementing this? I imagine it's settings a dynamic max-width and adding some more lines to add it in Settings. Are there other design blockers?\nWill you take a look at this? In 3 days it will be a 2 year anniversary for this simple feature request.\nAssigned to and as I remember we are going to have some UX improvements for editor tooltips and so on.\nmaybe now is the time to take this on? current iteration tries to solve parameter hints ux and this is not that much different\n! I employed CSS and put together full instructions: [Custom CSS and JS Loader extension][1] macOS VS Code: VS Code Insiders: Linux: : [1]: Restart VSCode Ignore \"VSCode is corrupt\" error You can choose to suppress this notice forever Run command \"Reload Custom CSS and JS\"\njust as a disclaimer, if anyone modifies the CSS/JS of the app, it comes up at \u201ccorrupted\u201d in diagnostic checks, and you\u2019ll typically get pushback if you report issues and include diagnostic information. Or, at least, I received pushback when I had custom CSS/JS enabled, and wouldn\u2019t receive help until I turned it off (even though it was harmless/not related to the issue I was having). While this is indeed an okay workaround, we should just keep making our voices heard so that this is natively supported.\n100% agree. This is just a workaround. It's hard enough to read TypeScript lint as it is! :)\nCurrenlty using VSCode 1.30.2, followed instructions step by step, but it's not working. I don't even get the VSCode corrupt error. I'm running Windows 10 (V.1803). Edit: It was my mistake. For anyone who's having trouble, make sure to run Enable Custom CSS and JS from the command palette. Simply restarting won't work.\nThis issue seems to be fixed in 1.32.0-insider (1.32.0-insider) . I hope this is an intended behavior. I want to thank the developers.\nThis change is related to . I confirmed that the max width of is still small as mentioned above. \"2019-02-22 this._widget = this._register(this._instantiationService.createInstance(ResizableHoverWidget, this._editor)); // Instantiate participants and sort them by `hoverOrdinal` which is relevant for rendering order. this._participants = []; for (const participant of HoverParticipantRegistry.getAll()) {", "commid": "vscode_pr_185540"}], "negative_passages": []} {"query_id": "q-en-vscode-49a6e04313299b638bdf063b63202f9ab857773dfc5e59e34f2b8e381cfb762f", "query": "When you hover over a type in a TypeScript file, the tooltip that appears has a very low max width, making it difficult to read long type signatures.\nI would include a screenshot but it's not easy to take a screenshot keeping the tooltip on screen!\n! Errors are quite unreadable if the width does not adapt to the font size.\n! it would be nice if the tip used the available space instead of wrapping at an arbitrary point in c# too\n!\n! Same problem using rust's language server.\nGeneral styling control would be very helpful. Also line-height. Another approach would be to have a bottom panel that displays the full error and the tooltip displays a shortened version.\n!\n! When using the auto import feature it is often impossible to differentiate whats what as the import path is cut off due to the limited width of the suggestions window.\nIs this something we can adjust with custom css? It makes snippet infoormation very difficult to read as well. !\nSame in Python. We have to jump through hoops trying to flow doc nicely. And when it appears OK on Windows, it breaks on Mac... ! And it is inconsistent. Ex, hover is OK ! But completion list decides to wrap. What gives? ! Looks like hover respects markdown while completion item doc is plain string and gets wrapped randomly.\n!\nSomeone say long type signatures? !\nHere is a workaround by hacking the file \"C:Program FilesMicrosoft VS Coderesourcesappoutvsworkbench\" Simply append the code above after the original content of file, and restart VSCode. (Title bar may alert a warning message \"Not Supported\" and hacked changes would be overridden by updating VSCode) !\nIt would be nice to have some control on the width. The above does work but vscode presents the message your installation may be corrupt on restarting.\nInstead of hacking the CSS directly as mentioned above, I recommend using the to just override the current CSS. That way when VSCode updates, you can just reload the custom css file that you have specified (personally, I have a project where I hold configurations for my shell, Spacemacs, etc. and this custom CSS file goes there). Until it's officially supported, hacking the CSS is likely the best route. The suggested widths above were a bit much for me, so I settled on the following values for now:\nWhat is preventing the devs from providing a configuration option for this? This issue has been open for almost 2 years, and it bugs me on a daily basis. Would love to see it fixed.\n(since you seem like the most relevant person to ping) is anything likely to be done about this?\nI would love to hear an explanation from devs too. What are the difficulties of implementing this? I imagine it's settings a dynamic max-width and adding some more lines to add it in Settings. Are there other design blockers?\nWill you take a look at this? In 3 days it will be a 2 year anniversary for this simple feature request.\nAssigned to and as I remember we are going to have some UX improvements for editor tooltips and so on.\nmaybe now is the time to take this on? current iteration tries to solve parameter hints ux and this is not that much different\n! I employed CSS and put together full instructions: [Custom CSS and JS Loader extension][1] macOS VS Code: VS Code Insiders: Linux: : [1]: Restart VSCode Ignore \"VSCode is corrupt\" error You can choose to suppress this notice forever Run command \"Reload Custom CSS and JS\"\njust as a disclaimer, if anyone modifies the CSS/JS of the app, it comes up at \u201ccorrupted\u201d in diagnostic checks, and you\u2019ll typically get pushback if you report issues and include diagnostic information. Or, at least, I received pushback when I had custom CSS/JS enabled, and wouldn\u2019t receive help until I turned it off (even though it was harmless/not related to the issue I was having). While this is indeed an okay workaround, we should just keep making our voices heard so that this is natively supported.\n100% agree. This is just a workaround. It's hard enough to read TypeScript lint as it is! :)\nCurrenlty using VSCode 1.30.2, followed instructions step by step, but it's not working. I don't even get the VSCode corrupt error. I'm running Windows 10 (V.1803). Edit: It was my mistake. For anyone who's having trouble, make sure to run Enable Custom CSS and JS from the command palette. Simply restarting won't work.\nThis issue seems to be fixed in 1.32.0-insider (1.32.0-insider) . I hope this is an intended behavior. I want to thank the developers.\nThis change is related to . I confirmed that the max width of is still small as mentioned above. \"2019-02-22 /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ .monaco-editor .resizable-widget { z-index: 40; display: block; } ", "commid": "vscode_pr_185540"}], "negative_passages": []} {"query_id": "q-en-vscode-49a6e04313299b638bdf063b63202f9ab857773dfc5e59e34f2b8e381cfb762f", "query": "When you hover over a type in a TypeScript file, the tooltip that appears has a very low max width, making it difficult to read long type signatures.\nI would include a screenshot but it's not easy to take a screenshot keeping the tooltip on screen!\n! Errors are quite unreadable if the width does not adapt to the font size.\n! it would be nice if the tip used the available space instead of wrapping at an arbitrary point in c# too\n!\n! Same problem using rust's language server.\nGeneral styling control would be very helpful. Also line-height. Another approach would be to have a bottom panel that displays the full error and the tooltip displays a shortened version.\n!\n! When using the auto import feature it is often impossible to differentiate whats what as the import path is cut off due to the limited width of the suggestions window.\nIs this something we can adjust with custom css? It makes snippet infoormation very difficult to read as well. !\nSame in Python. We have to jump through hoops trying to flow doc nicely. And when it appears OK on Windows, it breaks on Mac... ! And it is inconsistent. Ex, hover is OK ! But completion list decides to wrap. What gives? ! Looks like hover respects markdown while completion item doc is plain string and gets wrapped randomly.\n!\nSomeone say long type signatures? !\nHere is a workaround by hacking the file \"C:Program FilesMicrosoft VS Coderesourcesappoutvsworkbench\" Simply append the code above after the original content of file, and restart VSCode. (Title bar may alert a warning message \"Not Supported\" and hacked changes would be overridden by updating VSCode) !\nIt would be nice to have some control on the width. The above does work but vscode presents the message your installation may be corrupt on restarting.\nInstead of hacking the CSS directly as mentioned above, I recommend using the to just override the current CSS. That way when VSCode updates, you can just reload the custom css file that you have specified (personally, I have a project where I hold configurations for my shell, Spacemacs, etc. and this custom CSS file goes there). Until it's officially supported, hacking the CSS is likely the best route. The suggested widths above were a bit much for me, so I settled on the following values for now:\nWhat is preventing the devs from providing a configuration option for this? This issue has been open for almost 2 years, and it bugs me on a daily basis. Would love to see it fixed.\n(since you seem like the most relevant person to ping) is anything likely to be done about this?\nI would love to hear an explanation from devs too. What are the difficulties of implementing this? I imagine it's settings a dynamic max-width and adding some more lines to add it in Settings. Are there other design blockers?\nWill you take a look at this? In 3 days it will be a 2 year anniversary for this simple feature request.\nAssigned to and as I remember we are going to have some UX improvements for editor tooltips and so on.\nmaybe now is the time to take this on? current iteration tries to solve parameter hints ux and this is not that much different\n! I employed CSS and put together full instructions: [Custom CSS and JS Loader extension][1] macOS VS Code: VS Code Insiders: Linux: : [1]: Restart VSCode Ignore \"VSCode is corrupt\" error You can choose to suppress this notice forever Run command \"Reload Custom CSS and JS\"\njust as a disclaimer, if anyone modifies the CSS/JS of the app, it comes up at \u201ccorrupted\u201d in diagnostic checks, and you\u2019ll typically get pushback if you report issues and include diagnostic information. Or, at least, I received pushback when I had custom CSS/JS enabled, and wouldn\u2019t receive help until I turned it off (even though it was harmless/not related to the issue I was having). While this is indeed an okay workaround, we should just keep making our voices heard so that this is natively supported.\n100% agree. This is just a workaround. It's hard enough to read TypeScript lint as it is! :)\nCurrenlty using VSCode 1.30.2, followed instructions step by step, but it's not working. I don't even get the VSCode corrupt error. I'm running Windows 10 (V.1803). Edit: It was my mistake. For anyone who's having trouble, make sure to run Enable Custom CSS and JS from the command palette. Simply restarting won't work.\nThis issue seems to be fixed in 1.32.0-insider (1.32.0-insider) . I hope this is an intended behavior. I want to thank the developers.\nThis change is related to . I confirmed that the max width of is still small as mentioned above. \"2019-02-22 /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { IResizeEvent, ResizableHTMLElement } from 'vs/base/browser/ui/resizable/resizable'; import { DisposableStore, IDisposable } from 'vs/base/common/lifecycle'; import { ResourceMap } from 'vs/base/common/map'; import { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from 'vs/editor/browser/editorBrowser'; import { IPosition } from 'vs/editor/common/core/position'; import { PositionAffinity } from 'vs/editor/common/model'; import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; import * as dom from 'vs/base/browser/dom'; import { clamp } from 'vs/base/common/numbers'; import { EditorOption } from 'vs/editor/common/config/editorOptions'; import { Emitter, Event } from 'vs/base/common/event'; export abstract class ResizableWidget implements IDisposable { readonly element: ResizableHTMLElement; private readonly _disposables = new DisposableStore(); private readonly _persistingMechanism: IPersistingMechanism; constructor( private readonly _editor: ICodeEditor, private readonly _persistingOptions: IPersistingOptions, ) { console.log('Inside of ResizableWidget constructor'); this.element = new ResizableHTMLElement(); this.element.domNode.classList.add('editor-widget', 'resizable-widget'); if (this._persistingOptions instanceof SingleSizePersistingOptions) { this._persistingMechanism = new SingleSizePersistingMechanism(this, this.element, this._editor, this._persistingOptions); } else if (this._persistingOptions instanceof MultipleSizePersistingOptions) { this._persistingMechanism = new MultipleSizePersistingMechanism(this, this.element, this._editor); } else { throw new Error('Please specify a valid persisting mechanism'); } } dispose(): void { this._disposables.dispose(); this.element.dispose(); } resize(dimension: dom.Dimension): void { } hide(): void { this.element.clearSashHoverState(); } findMaximumRenderingHeight(): number | undefined { return Infinity; } findMaximumRenderingWidth(): number | undefined { return Infinity; } findPersistedSize(): dom.Dimension | undefined { return this._persistingMechanism.findSize(); } } export abstract class ResizableContentWidget implements IContentWidget { abstract ID: string; private _position: IPosition | null = null; private _secondaryPosition: IPosition | null = null; private _preference: ContentWidgetPositionPreference[] = []; private _positionAffinity: PositionAffinity | undefined = undefined; constructor(private readonly resizableWidget: ResizableWidget, private readonly editor: ICodeEditor) { this.editor.addContentWidget(this); console.log('Inisde of ResizableContentWidget constructor'); } findPersistedSize(): dom.Dimension | undefined { return this.resizableWidget.findPersistedSize(); } getId(): string { console.log('this.ID : ', this.ID); return this.ID; } getDomNode(): HTMLElement { console.log('Inside of getDomNode of ResizableContentWidget'); console.log('this.resizableWidget.element.domNode : ', this.resizableWidget.element.domNode); this.resizableWidget.element.domNode.style.zIndex = '49'; this.resizableWidget.element.domNode.style.position = 'fixed'; // this.resizableWidget.element.domNode.style.display = 'block'; return this.resizableWidget.element.domNode; } getPosition(): IContentWidgetPosition | null { console.log('Inside of getPosition of ResizableContentWidget'); const contentWidgetPosition = { position: this._position, secondaryPosition: this._secondaryPosition, preference: (this._preference), positionAffinity: this._positionAffinity }; console.log('contentWidgetPosition: ', contentWidgetPosition); return contentWidgetPosition; } hide(): void { this.editor.layoutContentWidget(this); } set position(position: IPosition | null) { this._position = position; } set secondaryPosition(position: IPosition | null) { this._secondaryPosition = position; } set preference(preference: ContentWidgetPositionPreference[]) { this._preference = preference; } set positionAffinity(affinity: PositionAffinity | undefined) { this._positionAffinity = affinity; } } interface IPersistingOptions { } export class SingleSizePersistingOptions implements IPersistingOptions { constructor( public readonly key: string, public readonly defaultSize: dom.Dimension, @IStorageService public readonly storageService: IStorageService ) { } } export class MultipleSizePersistingOptions implements IPersistingOptions { constructor() { } } interface IPersistingMechanism extends IDisposable { findSize(): dom.Dimension | undefined; } // TODO: maybe need to make more generic, this is specific to the suggest widget class SingleSizePersistingMechanism implements IPersistingMechanism { private readonly _persistedWidgetSize: PersistedWidgetSize | null = null; private readonly _disposables = new DisposableStore(); constructor( private readonly resizableWidget: ResizableWidget, private readonly element: ResizableHTMLElement, private readonly editor: ICodeEditor, private readonly persistingOptions: SingleSizePersistingOptions ) { this._persistedWidgetSize = new PersistedWidgetSize(this.persistingOptions.key, this.persistingOptions.storageService, this.editor); class ResizeState { constructor( readonly persistedSize: dom.Dimension | undefined, readonly currentSize: dom.Dimension, public persistHeight = false, public persistWidth = false, ) { } } let state: ResizeState | undefined; this._disposables.add(this.element.onDidWillResize(() => { // TODO: add back, this._contentWidget.lockPreference(); state = new ResizeState(this._persistedWidgetSize!.restore(), this.element.size); })); this._disposables.add(this.element.onDidResize(e => { this.resizableWidget.resize(new dom.Dimension(e.dimension.width, e.dimension.height)); if (state) { state.persistHeight = state.persistHeight || !!e.north || !!e.south; state.persistWidth = state.persistWidth || !!e.east || !!e.west; } if (!e.done) { return; } if (state) { const fontInfo = this.editor.getOption(EditorOption.fontInfo); const itemHeight = clamp(this.editor.getOption(EditorOption.suggestLineHeight) || fontInfo.lineHeight, 8, 1000); const threshold = Math.round(itemHeight / 2); let { width, height } = this.element.size; if (!state.persistHeight || Math.abs(state.currentSize.height - height) <= threshold) { height = state.persistedSize?.height ?? this.persistingOptions.defaultSize.height; } if (!state.persistWidth || Math.abs(state.currentSize.width - width) <= threshold) { width = state.persistedSize?.width ?? this.persistingOptions.defaultSize.width; } this._persistedWidgetSize!.store(new dom.Dimension(width, height)); } // TODO: add back, reset working state // this._contentWidget.unlockPreference(); state = undefined; })); } findSize(): dom.Dimension | undefined { return undefined; } dispose(): void { this._disposables.dispose(); } } class MultipleSizePersistingMechanism implements IPersistingMechanism { private readonly _persistedWidgetSizes: ResourceMap> = new ResourceMap>(); private readonly _disposables = new DisposableStore(); private _tooltipPosition: IPosition | null = null; // TODO: not sure if I need the following // private _initialHeight: number = 0; // private _initialTop: number = 0; private _resizing: boolean = false; private _size: dom.Dimension | undefined = undefined; private _maxRenderingHeight: number | undefined = Infinity; private _maxRenderingWidth: number | undefined = Infinity; private readonly _onDidResize = new Emitter(); readonly onDidResize: Event = this._onDidResize.event; // private _renderingAbove: ContentWidgetPositionPreference | undefined = undefined; constructor( private readonly resizableWidget: ResizableWidget, private readonly element: ResizableHTMLElement, public readonly editor: ICodeEditor ) { this.element.minSize = new dom.Dimension(10, 24); this._disposables.add(this.editor.onDidChangeModelContent((e) => { const uri = this.editor.getModel()?.uri; if (!uri || !this._persistedWidgetSizes.has(uri)) { return; } const persistedSizesForUri = this._persistedWidgetSizes.get(uri)!; const updatedPersistedSizesForUri = new Map(); for (const change of e.changes) { const changeOffset = change.rangeOffset; const rangeLength = change.rangeLength; const endOffset = changeOffset + rangeLength; const textLength = change.text.length; for (const key of persistedSizesForUri.keys()) { const parsedKey = JSON.parse(key); const tokenOffset = parsedKey[0]; const tokenLength = parsedKey[1]; if (endOffset < tokenOffset) { const oldSize = persistedSizesForUri.get(key)!; const newKey: [number, number] = [tokenOffset - rangeLength + textLength, tokenLength]; updatedPersistedSizesForUri.set(JSON.stringify(newKey), oldSize); } else if (changeOffset >= tokenOffset + tokenLength) { updatedPersistedSizesForUri.set(key, persistedSizesForUri.get(key)!); } } } this._persistedWidgetSizes.set(uri, updatedPersistedSizesForUri); })); this._disposables.add(this.element.onDidWillResize(() => { this._resizing = true; // this._initialHeight = this.element.domNode.clientHeight; // this._initialTop = this.element.domNode.offsetTop; })); this._disposables.add(this.element.onDidResize(e => { let height = e.dimension.height; let width = e.dimension.width; const maxWidth = this.element.maxSize.width; const maxHeight = this.element.maxSize.height; width = Math.min(maxWidth, width); height = Math.min(maxHeight, height); if (!this._maxRenderingHeight) { return; } this._size = new dom.Dimension(width, height); this.element.layout(height, width); // Calling the resize function of the this.resizableWidget.resize(new dom.Dimension(width, height)); // Update the top parameters only when we decided to render above // TODO: presumably do not need to resize the element // if (this._renderingAbove === ContentWidgetPositionPreference.ABOVE) { // \tthis.element.domNode.style.top = this._initialTop - (height - this._initialHeight) + 'px'; // } // const horizontalSashWidth = width - 2 * SASH_WIDTH + 2 * TOTAL_BORDER_WIDTH + 'px'; // this.element.northSash.el.style.width = horizontalSashWidth; // this.element.southSash.el.style.width = horizontalSashWidth; // const verticalSashWidth = height - 2 * SASH_WIDTH + 2 * TOTAL_BORDER_WIDTH + 'px'; // this.element.eastSash.el.style.height = verticalSashWidth; // this.element.westSash.el.style.height = verticalSashWidth; // this.element.eastSash.el.style.top = TOTAL_BORDER_WIDTH + 'px'; // Fire the current dimension // TODO: probably don't need to listen on the firing event? // this._onDidResize.fire({ dimension: this._size, done: false }); this._maxRenderingWidth = this.resizableWidget.findMaximumRenderingWidth(); this._maxRenderingHeight = this.resizableWidget.findMaximumRenderingHeight(); // this._maxRenderingHeight = this.resizableWidget.findMaximumRenderingHeight(this._renderingAbove); if (!this._maxRenderingHeight || !this._maxRenderingWidth) { return; } this.element.maxSize = new dom.Dimension(this._maxRenderingWidth, this._maxRenderingHeight); // Persist the height only when the resizing has stopped if (e.done) { if (!this.editor.hasModel()) { return; } const uri = this.editor.getModel().uri; if (!uri || !this._tooltipPosition) { return; } const persistedSize = new dom.Dimension(width, height); const wordPosition = this.editor.getModel().getWordAtPosition(this._tooltipPosition); if (!wordPosition) { return; } const offset = this.editor.getModel().getOffsetAt({ lineNumber: this._tooltipPosition.lineNumber, column: wordPosition.startColumn }); const length = wordPosition.word.length; // Suppose that the uri does not exist in the persisted widget hover sizes, then create a map if (!this._persistedWidgetSizes.get(uri)) { const persistedWidgetSizesForUri = new Map([]); persistedWidgetSizesForUri.set(JSON.stringify([offset, length]), persistedSize); this._persistedWidgetSizes.set(uri, persistedWidgetSizesForUri); } else { const persistedWidgetSizesForUri = this._persistedWidgetSizes.get(uri)!; persistedWidgetSizesForUri.set(JSON.stringify([offset, length]), persistedSize); } this._resizing = false; } // this.editor.layoutOverlayWidget(this); // this.editor.render(); })); } set tooltipPosition(position: IPosition) { this._tooltipPosition = position; } findSize(): dom.Dimension | undefined { console.log('Inside of findSize of the MultiplePersistingMechanisms'); if (!this._tooltipPosition || !this.editor.hasModel()) { return; } const wordPosition = this.editor.getModel().getWordAtPosition(this._tooltipPosition); if (!wordPosition) { return; } const offset = this.editor.getModel().getOffsetAt({ lineNumber: this._tooltipPosition.lineNumber, column: wordPosition.startColumn }); const length = wordPosition.word.length; const uri = this.editor.getModel().uri; const persistedSizesForUri = this._persistedWidgetSizes.get(uri); if (!persistedSizesForUri) { return; } return persistedSizesForUri.get(JSON.stringify([offset, length])); } dispose(): void { this._disposables.dispose(); } } class PersistedWidgetSize { constructor( private readonly _key: string, private readonly _service: IStorageService, editor: ICodeEditor ) { } restore(): dom.Dimension | undefined { const raw = this._service.get(this._key, StorageScope.PROFILE) ?? ''; try { const obj = JSON.parse(raw); if (dom.Dimension.is(obj)) { return dom.Dimension.lift(obj); } } catch { // ignore } return undefined; } store(size: dom.Dimension) { this._service.store(this._key, JSON.stringify(size), StorageScope.PROFILE, StorageTarget.MACHINE); } reset(): void { this._service.remove(this._key, StorageScope.PROFILE); } } ", "commid": "vscode_pr_185540"}], "negative_passages": []} {"query_id": "q-en-vscode-49a6e04313299b638bdf063b63202f9ab857773dfc5e59e34f2b8e381cfb762f", "query": "When you hover over a type in a TypeScript file, the tooltip that appears has a very low max width, making it difficult to read long type signatures.\nI would include a screenshot but it's not easy to take a screenshot keeping the tooltip on screen!\n! Errors are quite unreadable if the width does not adapt to the font size.\n! it would be nice if the tip used the available space instead of wrapping at an arbitrary point in c# too\n!\n! Same problem using rust's language server.\nGeneral styling control would be very helpful. Also line-height. Another approach would be to have a bottom panel that displays the full error and the tooltip displays a shortened version.\n!\n! When using the auto import feature it is often impossible to differentiate whats what as the import path is cut off due to the limited width of the suggestions window.\nIs this something we can adjust with custom css? It makes snippet infoormation very difficult to read as well. !\nSame in Python. We have to jump through hoops trying to flow doc nicely. And when it appears OK on Windows, it breaks on Mac... ! And it is inconsistent. Ex, hover is OK ! But completion list decides to wrap. What gives? ! Looks like hover respects markdown while completion item doc is plain string and gets wrapped randomly.\n!\nSomeone say long type signatures? !\nHere is a workaround by hacking the file \"C:Program FilesMicrosoft VS Coderesourcesappoutvsworkbench\" Simply append the code above after the original content of file, and restart VSCode. (Title bar may alert a warning message \"Not Supported\" and hacked changes would be overridden by updating VSCode) !\nIt would be nice to have some control on the width. The above does work but vscode presents the message your installation may be corrupt on restarting.\nInstead of hacking the CSS directly as mentioned above, I recommend using the to just override the current CSS. That way when VSCode updates, you can just reload the custom css file that you have specified (personally, I have a project where I hold configurations for my shell, Spacemacs, etc. and this custom CSS file goes there). Until it's officially supported, hacking the CSS is likely the best route. The suggested widths above were a bit much for me, so I settled on the following values for now:\nWhat is preventing the devs from providing a configuration option for this? This issue has been open for almost 2 years, and it bugs me on a daily basis. Would love to see it fixed.\n(since you seem like the most relevant person to ping) is anything likely to be done about this?\nI would love to hear an explanation from devs too. What are the difficulties of implementing this? I imagine it's settings a dynamic max-width and adding some more lines to add it in Settings. Are there other design blockers?\nWill you take a look at this? In 3 days it will be a 2 year anniversary for this simple feature request.\nAssigned to and as I remember we are going to have some UX improvements for editor tooltips and so on.\nmaybe now is the time to take this on? current iteration tries to solve parameter hints ux and this is not that much different\n! I employed CSS and put together full instructions: [Custom CSS and JS Loader extension][1] macOS VS Code: VS Code Insiders: Linux: : [1]: Restart VSCode Ignore \"VSCode is corrupt\" error You can choose to suppress this notice forever Run command \"Reload Custom CSS and JS\"\njust as a disclaimer, if anyone modifies the CSS/JS of the app, it comes up at \u201ccorrupted\u201d in diagnostic checks, and you\u2019ll typically get pushback if you report issues and include diagnostic information. Or, at least, I received pushback when I had custom CSS/JS enabled, and wouldn\u2019t receive help until I turned it off (even though it was harmless/not related to the issue I was having). While this is indeed an okay workaround, we should just keep making our voices heard so that this is natively supported.\n100% agree. This is just a workaround. It's hard enough to read TypeScript lint as it is! :)\nCurrenlty using VSCode 1.30.2, followed instructions step by step, but it's not working. I don't even get the VSCode corrupt error. I'm running Windows 10 (V.1803). Edit: It was my mistake. For anyone who's having trouble, make sure to run Enable Custom CSS and JS from the command palette. Simply restarting won't work.\nThis issue seems to be fixed in 1.32.0-insider (1.32.0-insider) . I hope this is an intended behavior. I want to thank the developers.\nThis change is related to . I confirmed that the max width of is still small as mentioned above. \"2019-02-22 /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { HoverWidget } from 'vs/base/browser/ui/hover/hoverWidget'; import { DisposableStore } from 'vs/base/common/lifecycle'; import { ContentWidgetPositionPreference, ICodeEditor, IContentWidgetPosition } from 'vs/editor/browser/editorBrowser'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { MultipleSizePersistingOptions, ResizableContentWidget, ResizableWidget } from 'vs/editor/contrib/hover/browser/resizableContentWidget'; import * as dom from 'vs/base/browser/dom'; import { ConfigurationChangedEvent, EditorOption } from 'vs/editor/common/config/editorOptions'; import { Position } from 'vs/editor/common/core/position'; import { HoverStartSource } from 'vs/editor/contrib/hover/browser/hoverOperation'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { PositionAffinity } from 'vs/editor/common/model'; import { IEditorHoverColorPickerWidget } from 'vs/editor/contrib/hover/browser/hoverTypes'; const SCROLLBAR_WIDTH = 10; // TODO: maybe don't need the resizable widget class export class ResizableHoverWidget extends ResizableWidget { public ID = 'editor.contrib.resizableContentHoverWidget'; private hoverDisposables = new DisposableStore(); // The ContentWidget is a child of the resizable widget private resizableContentWidget: ResizableContentHoverWidget; public readonly allowEditorOverflow = true; public readonly _hover: HoverWidget = this.hoverDisposables.add(new HoverWidget()); private readonly editor: ICodeEditor; private readonly _hoverVisibleKey = EditorContextKeys.hoverVisible.bindTo(this._contextKeyService); private readonly _hoverFocusedKey = EditorContextKeys.hoverFocused.bindTo(this._contextKeyService); private readonly _focusTracker = this.hoverDisposables.add(dom.trackFocus(this.getDomNode())); private readonly _horizontalScrollingBy: number = 30; private _visibleData: ContentHoverVisibleData | null = null; private _renderingAbove: ContentWidgetPositionPreference; constructor( editor: ICodeEditor, @IContextKeyService private readonly _contextKeyService: IContextKeyService ) { super(editor, new MultipleSizePersistingOptions()); this.editor = editor; // create here the dom node and all other logic should go here that was in the super abstract class this.resizableContentWidget = new ResizableContentHoverWidget(this, editor); this._renderingAbove = this.editor.getOption(EditorOption.hover).above ? ContentWidgetPositionPreference.ABOVE : ContentWidgetPositionPreference.BELOW; this.hoverDisposables.add(this.element.onDidResize((e) => { // When the resizable hover overlay changes, resize the widget // this._widget.resize(e.dimension); })); this.hoverDisposables.add(this.editor.onDidLayoutChange(() => this._layout())); this.hoverDisposables.add(this.editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => { if (e.hasChanged(EditorOption.fontInfo)) { this._updateFont(); } })); this._setVisibleData(null); this._layout(); this.hoverDisposables.add(this._focusTracker.onDidFocus(() => { this._hoverFocusedKey.set(true); })); this.hoverDisposables.add(this._focusTracker.onDidBlur(() => { this._hoverFocusedKey.set(false); })); dom.append(this.element.domNode, this._hover.containerDomNode); } public get position(): Position | null { return this._visibleData?.showAtPosition ?? null; } public get isColorPickerVisible(): boolean { return Boolean(this._visibleData?.colorPicker); } public get isVisibleFromKeyboard(): boolean { return (this._visibleData?.source === HoverStartSource.Keyboard); } public get isVisible(): boolean { return this._hoverVisibleKey.get() ?? false; } public get renderingAbove(): ContentWidgetPositionPreference { return this._renderingAbove; } public set renderingAbove(renderingAbove: ContentWidgetPositionPreference) { this._renderingAbove = renderingAbove; } // NEW public override resize(size: dom.Dimension) { console.log('Inside of resize'); // Removing the max height and max width here - the max size is controlled by the resizable overlay this._hover.contentsDomNode.style.maxHeight = 'none'; this._hover.contentsDomNode.style.maxWidth = 'none'; const width = size.width + 'px'; // const width = size.width - 2 * SASH_WIDTH + TOTAL_BORDER_WIDTH + 'px'; this._hover.containerDomNode.style.width = width; this._hover.contentsDomNode.style.width = width; // const height = size.height - 2 * SASH_WIDTH + TOTAL_BORDER_WIDTH + 'px'; const height = size.height + 'px'; this._hover.containerDomNode.style.height = height; this._hover.contentsDomNode.style.height = height; const scrollDimensions = this._hover.scrollbar.getScrollDimensions(); const hasHorizontalScrollbar = (scrollDimensions.scrollWidth > scrollDimensions.width); if (hasHorizontalScrollbar) { // When there is a horizontal scroll-bar use a different height to make the scroll-bar visible const extraBottomPadding = `${this._hover.scrollbar.options.horizontalScrollbarSize}px`; if (this._hover.contentsDomNode.style.paddingBottom !== extraBottomPadding) { this._hover.contentsDomNode.style.paddingBottom = extraBottomPadding; } this._hover.contentsDomNode.style.height = size.height - SCROLLBAR_WIDTH + 'px'; // - 2 * SASH_WIDTH + TOTAL_BORDER_WIDTH } this._hover.scrollbar.scanDomNode(); this.editor.layoutContentWidget(this.resizableContentWidget); this.editor.render(); } public override findMaximumRenderingHeight(): number | undefined { if (!this.editor || !this.editor.hasModel() || !this._visibleData?.showAtPosition) { return; } const editorBox = dom.getDomNodePagePosition(this.editor.getDomNode()); const mouseBox = this.editor.getScrolledVisiblePosition(this._visibleData.showAtPosition); const bodyBox = dom.getClientArea(document.body); let availableSpace: number; if (this._renderingAbove === ContentWidgetPositionPreference.ABOVE) { availableSpace = editorBox.top + mouseBox.top - 30; } else { const mouseBottom = editorBox.top + mouseBox!.top + mouseBox!.height; availableSpace = bodyBox.height - mouseBottom; } let divMaxHeight = 0; for (const childHtmlElement of this._hover.contentsDomNode.children) { divMaxHeight += childHtmlElement.clientHeight; } if (this._hover.contentsDomNode.clientWidth < this._hover.contentsDomNode.scrollWidth) { divMaxHeight += SCROLLBAR_WIDTH; } return Math.min(availableSpace, divMaxHeight); } public findMaxRenderingWidth(): number | undefined { if (!this.editor || !this.editor.hasModel()) { return; } const editorBox = dom.getDomNodePagePosition(this.editor.getDomNode()); const widthOfEditor = editorBox.width; const leftOfEditor = editorBox.left; const glyphMarginWidth = this.editor.getLayoutInfo().glyphMarginWidth; const leftOfContainer = this._hover.containerDomNode.offsetLeft; return widthOfEditor + leftOfEditor - leftOfContainer - glyphMarginWidth; } public override dispose(): void { this.editor.removeContentWidget(this.resizableContentWidget); if (this._visibleData) { this._visibleData.disposables.dispose(); } super.dispose(); } public getDomNode() { return this._hover.containerDomNode; } public getContentsDomNode() { return this._hover.contentsDomNode; } public isMouseGettingCloser(posx: number, posy: number): boolean { if (!this._visibleData) { return false; } if (typeof this._visibleData.initialMousePosX === 'undefined' || typeof this._visibleData.initialMousePosY === 'undefined') { this._visibleData.initialMousePosX = posx; this._visibleData.initialMousePosY = posy; return false; } const widgetRect = dom.getDomNodePagePosition(this.resizableContentWidget.getDomNode()); if (typeof this._visibleData.closestMouseDistance === 'undefined') { this._visibleData.closestMouseDistance = computeDistanceFromPointToRectangle(this._visibleData.initialMousePosX, this._visibleData.initialMousePosY, widgetRect.left, widgetRect.top, widgetRect.width, widgetRect.height); } const distance = computeDistanceFromPointToRectangle(posx, posy, widgetRect.left, widgetRect.top, widgetRect.width, widgetRect.height); if (!distance || !this._visibleData.closestMouseDistance || distance > this._visibleData.closestMouseDistance + 4 /* tolerance of 4 pixels */) { // The mouse is getting farther away return false; } this._visibleData.closestMouseDistance = Math.min(this._visibleData.closestMouseDistance, distance); return true; } private _setVisibleData(visibleData: ContentHoverVisibleData | null): void { if (this._visibleData) { this._visibleData.disposables.dispose(); } this._visibleData = visibleData; this._hoverVisibleKey.set(!!this._visibleData); this._hover.containerDomNode.classList.toggle('hidden', !this._visibleData); } private _layout(): void { const height = Math.max(this.editor.getLayoutInfo().height / 4, 250); const { fontSize, lineHeight } = this.editor.getOption(EditorOption.fontInfo); this._hover.contentsDomNode.style.fontSize = `${fontSize}px`; this._hover.contentsDomNode.style.lineHeight = `${lineHeight / fontSize}`; this._hover.contentsDomNode.style.maxHeight = `${height}px`; this._hover.contentsDomNode.style.maxWidth = `${Math.max(this.editor.getLayoutInfo().width * 0.66, 500)}px`; } private _updateFont(): void { const codeClasses: HTMLElement[] = Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName('code')); codeClasses.forEach(node => this.editor.applyFontInfo(node)); } public showAt(node: DocumentFragment, visibleData: ContentHoverVisibleData): void { this.editor.addContentWidget(this.resizableContentWidget); const persistedSize = this.findPersistedSize(); if (!this.editor || !this.editor.hasModel()) { return; } this._setVisibleData(visibleData); this._hover.contentsDomNode.textContent = ''; this._hover.contentsDomNode.appendChild(node); this._hover.contentsDomNode.style.paddingBottom = ''; this._updateFont(); const containerDomNode = this.resizableContentWidget.getDomNode(); let height; // If the persisted size has already been found then set a maximum height and width if (!persistedSize) { this._hover.contentsDomNode.style.maxHeight = `${Math.max(this.editor.getLayoutInfo().height / 4, 250)}px`; this._hover.contentsDomNode.style.maxWidth = `${Math.max(this.editor.getLayoutInfo().width * 0.66, 500)}px`; this.onContentsChanged(); // Simply force a synchronous render on the editor // such that the widget does not really render with left = '0px' this.editor.render(); height = containerDomNode.clientHeight; } // When there is a persisted size then do not use a maximum height or width else { this._hover.contentsDomNode.style.maxHeight = 'none'; this._hover.contentsDomNode.style.maxWidth = 'none'; height = persistedSize.height; } // The dimensions of the document in which we are displaying the hover const bodyBox = dom.getClientArea(document.body); // Hard-coded in the hover.css file as 1.5em or 24px const minHeight = 24; // The full height is already passed in as a parameter const fullHeight = height; const editorBox = dom.getDomNodePagePosition(this.editor.getDomNode()); const mouseBox = this.editor.getScrolledVisiblePosition(visibleData.showAtPosition); // Position where the editor box starts + the top of the mouse box relatve to the editor + mouse box height const mouseBottom = editorBox.top + mouseBox.top + mouseBox.height; // Total height of the box minus the position of the bottom of the mouse, this is the maximum height below the mouse position const availableSpaceBelow = bodyBox.height - mouseBottom; // Max height below is the minimum of the available space below and the full height of the widget const maxHeightBelow = Math.min(availableSpaceBelow, fullHeight); // The available space above the mouse position is the height of the top of the editor plus the top of the mouse box relative to the editor const availableSpaceAbove = editorBox.top + mouseBox.top - 30; const maxHeightAbove = Math.min(availableSpaceAbove, fullHeight); // We find the maximum height of the widget possible on the top or on the bottom const maxHeight = Math.min(Math.max(maxHeightAbove, maxHeightBelow), fullHeight); if (height < minHeight) { height = minHeight; } if (height > maxHeight) { height = maxHeight; } // Determining whether we should render above or not ideally if (this.editor.getOption(EditorOption.hover).above) { this._renderingAbove = height <= maxHeightAbove ? ContentWidgetPositionPreference.ABOVE : ContentWidgetPositionPreference.BELOW; } else { this._renderingAbove = height <= maxHeightBelow ? ContentWidgetPositionPreference.BELOW : ContentWidgetPositionPreference.ABOVE; } // See https://github.com/microsoft/vscode/issues/140339 // TODO: Doing a second layout of the hover after force rendering the editor if (!persistedSize) { this.onContentsChanged(); } if (visibleData.stoleFocus) { this._hover.containerDomNode.focus(); } visibleData.colorPicker?.layout(); if (!this._visibleData) { return; } const clientHeight = this._hover.containerDomNode.clientHeight; const clientWidth = this._hover.containerDomNode.clientWidth; this.element.layout(clientHeight, clientWidth); this.resizableContentWidget.position = this._visibleData.showAtPosition; this.resizableContentWidget.secondaryPosition = this._visibleData.showAtSecondaryPosition; this.resizableContentWidget.preference = [this._renderingAbove]; this.resizableContentWidget.positionAffinity = this._visibleData.isBeforeContent ? PositionAffinity.LeftOfInjectedText : undefined; this.editor.layoutContentWidget(this.resizableContentWidget); this.editor.render(); console.log('At the end of showAt'); } public override hide(): void { this.element.clearSashHoverState(); if (this._visibleData) { const stoleFocus = this._visibleData.stoleFocus; this._setVisibleData(null); this.editor.layoutContentWidget(this.resizableContentWidget); if (stoleFocus) { this.editor.focus(); } } } // NEW public onContentsChanged(persistedSize?: dom.Dimension | undefined): void { console.log('Inside of onContentsChanged'); const containerDomNode = this.getDomNode(); const contentsDomNode = this.getContentsDomNode(); // Suppose a persisted size is defined if (persistedSize) { const widthMinusSash = Math.min(this.findMaximumRenderingWidth() ?? Infinity, persistedSize.width); // - SASH_WIDTH // const heightMinusSash = Math.min(this.findMaxRenderingHeight(this._renderingAbove) ?? Infinity, persistedSize.height - SASH_WIDTH); const heightMinusSash = Math.min(this.findMaximumRenderingHeight() ?? Infinity, persistedSize.height); // SASH_WIDTH // Already setting directly the height and width parameters containerDomNode.style.width = widthMinusSash + 'px'; containerDomNode.style.height = heightMinusSash + 'px'; contentsDomNode.style.width = widthMinusSash + 'px'; contentsDomNode.style.height = heightMinusSash + 'px'; } else { // Otherwise the height and width are set to auto containerDomNode.style.width = 'auto'; containerDomNode.style.height = 'auto'; contentsDomNode.style.width = 'auto'; contentsDomNode.style.height = 'auto'; } this.editor.layoutContentWidget(this.resizableContentWidget); this._hover.onContentsChanged(); const scrollDimensions = this._hover.scrollbar.getScrollDimensions(); const hasHorizontalScrollbar = (scrollDimensions.scrollWidth > scrollDimensions.width); if (hasHorizontalScrollbar) { // There is just a horizontal scrollbar const extraBottomPadding = `${this._hover.scrollbar.options.horizontalScrollbarSize}px`; let reposition = false; if (this._hover.contentsDomNode.style.paddingBottom !== extraBottomPadding) { this._hover.contentsDomNode.style.paddingBottom = extraBottomPadding; reposition = true; } const maxRenderingHeight = this.findMaximumRenderingHeight(); // Need the following code since we are using an exact height when using the persisted size. If not used the horizontal scrollbar would just not be visible. if (persistedSize && maxRenderingHeight) { containerDomNode.style.height = Math.min(maxRenderingHeight, persistedSize.height) + 'px'; // - SASH_WIDTH contentsDomNode.style.height = Math.min(maxRenderingHeight, persistedSize.height - SCROLLBAR_WIDTH) + 'px'; // - SASH_WIDTH reposition = true; } if (reposition) { this.editor.layoutContentWidget(this.resizableContentWidget); this._hover.onContentsChanged(); } } } // OLD FUNCTION /* public onContentsChanged(): void { this.editor.layoutContentWidget(this.resizableContentWidget); this._hover.onContentsChanged(); const scrollDimensions = this._hover.scrollbar.getScrollDimensions(); const hasHorizontalScrollbar = (scrollDimensions.scrollWidth > scrollDimensions.width); if (hasHorizontalScrollbar) { // There is just a horizontal scrollbar const extraBottomPadding = `${this._hover.scrollbar.options.horizontalScrollbarSize}px`; if (this._hover.contentsDomNode.style.paddingBottom !== extraBottomPadding) { this._hover.contentsDomNode.style.paddingBottom = extraBottomPadding; this.editor.layoutContentWidget(this.resizableContentWidget); this._hover.onContentsChanged(); } } } */ public clear(): void { this._hover.contentsDomNode.textContent = ''; } public focus(): void { this._hover.containerDomNode.focus(); } public scrollUp(): void { const scrollTop = this._hover.scrollbar.getScrollPosition().scrollTop; const fontInfo = this.editor.getOption(EditorOption.fontInfo); this._hover.scrollbar.setScrollPosition({ scrollTop: scrollTop - fontInfo.lineHeight }); } public scrollDown(): void { const scrollTop = this._hover.scrollbar.getScrollPosition().scrollTop; const fontInfo = this.editor.getOption(EditorOption.fontInfo); this._hover.scrollbar.setScrollPosition({ scrollTop: scrollTop + fontInfo.lineHeight }); } public scrollLeft(): void { const scrollLeft = this._hover.scrollbar.getScrollPosition().scrollLeft; this._hover.scrollbar.setScrollPosition({ scrollLeft: scrollLeft - this._horizontalScrollingBy }); } public scrollRight(): void { const scrollLeft = this._hover.scrollbar.getScrollPosition().scrollLeft; this._hover.scrollbar.setScrollPosition({ scrollLeft: scrollLeft + this._horizontalScrollingBy }); } public pageUp(): void { const scrollTop = this._hover.scrollbar.getScrollPosition().scrollTop; const scrollHeight = this._hover.scrollbar.getScrollDimensions().height; this._hover.scrollbar.setScrollPosition({ scrollTop: scrollTop - scrollHeight }); } public pageDown(): void { const scrollTop = this._hover.scrollbar.getScrollPosition().scrollTop; const scrollHeight = this._hover.scrollbar.getScrollDimensions().height; this._hover.scrollbar.setScrollPosition({ scrollTop: scrollTop + scrollHeight }); } public goToTop(): void { this._hover.scrollbar.setScrollPosition({ scrollTop: 0 }); } public goToBottom(): void { this._hover.scrollbar.setScrollPosition({ scrollTop: this._hover.scrollbar.getScrollDimensions().scrollHeight }); } public escape(): void { this.editor.focus(); } } export class ResizableContentHoverWidget extends ResizableContentWidget { public ID = 'editor.contrib.resizableContentHoverWidget'; private hoverDisposables = new DisposableStore(); constructor(resizableHoverWidget: ResizableHoverWidget, editor: ICodeEditor) { super(resizableHoverWidget, editor); console.log('Inside of resizable content hover widget'); } } class ContentHoverVisibleData { public closestMouseDistance: number | undefined = undefined; constructor( public readonly colorPicker: IEditorHoverColorPickerWidget | null, public readonly showAtPosition: Position, public readonly showAtSecondaryPosition: Position, public readonly preferAbove: boolean, public readonly stoleFocus: boolean, public readonly source: HoverStartSource, public readonly isBeforeContent: boolean, public initialMousePosX: number | undefined, public initialMousePosY: number | undefined, public readonly disposables: DisposableStore ) { } } function computeDistanceFromPointToRectangle(pointX: number, pointY: number, left: number, top: number, width: number, height: number): number { const x = (left + width / 2); // x center of rectangle const y = (top + height / 2); // y center of rectangle const dx = Math.max(Math.abs(pointX - x) - width / 2, 0); const dy = Math.max(Math.abs(pointY - y) - height / 2, 0); return Math.sqrt(dx * dx + dy * dy); } ", "commid": "vscode_pr_185540"}], "negative_passages": []} {"query_id": "q-en-vscode-6ce764baec8ad743ebb780126df5ac7570542fdcd4cafc1243929529f79fb34f", "query": "VSCode Version: 1.7.2 () OS Version: Windows 10.0. Steps to Reproduce: a file a sentence of text such as Lorem ipsum sit dolar amet. your keyboard cursor after 'default': [], 'default': ['markdown'], 'description': nls.localize('emmetExclude', \"An array of languages where emmet abbreviations should not be expanded.\") }, }", "commid": "vscode_pr_17094"}], "negative_passages": []} {"query_id": "q-en-vscode-5e7e08a14faa525f594b7bc37537a21ab55d1ee07eff706c4f24e1bd30d78b8f", "query": "VSCode Version: Code - Insiders 1.8.0-insider (, 2016-12-06T16:53:46.634Z) OS Version: Darwin x64 15.6.0 Testing The current message seems to general: \"For better performance exclude folders with many files.\" \"better performance\" is to weak because the typescript server basically shutdown and won't provide any of the advanced features. \"folders with many files\" is vague, it should mention JavaScript/TypeScript files that the user does not work on (like packages/libraries). could also mention that this happens in the js-, that would set the right expectation for the 'Configure Excludes' button and also inform the user how this can be done manually. Needs more thought: \"Too many JavaScript/TypeScript files: To enable advanced editor features in JavaScript/TypeScript files exclude large folders with source files you do not work on.\" /cc\nAlso, the status bar button might benefit from being specific about the language it refers to.", "positive_passages": [{"docid": "doc-en-vscode-2f12b1a741b8f136aaeac337f5faae93fe34fa3b07227c7d8b45017e129d8459", "text": "public show(configFileName: string, largeRoots: string, onExecute: () => void) { this._currentHint = { message: largeRoots.length > 0 ? localize('hintExclude', \"For better performance exclude folders with many files, like: {0}\", largeRoots) : localize('hintExclude.generic', \"For better performance exclude folders with many files.\"), ? localize('hintExclude', \"To enable JavaScript/TypeScript IntelliSense, exclude folders with many files, like: {0}\", largeRoots) : localize('hintExclude.generic', \"To enable JavaScript/TypeScript IntelliSense, exclude large folders with source files that you do not work on.\"), options: [{ title: localize('open', \"Configure Excludes\"), execute: () => {", "commid": "vscode_pr_16774"}], "negative_passages": []} {"query_id": "q-en-vscode-5e7e08a14faa525f594b7bc37537a21ab55d1ee07eff706c4f24e1bd30d78b8f", "query": "VSCode Version: Code - Insiders 1.8.0-insider (, 2016-12-06T16:53:46.634Z) OS Version: Darwin x64 15.6.0 Testing The current message seems to general: \"For better performance exclude folders with many files.\" \"better performance\" is to weak because the typescript server basically shutdown and won't provide any of the advanced features. \"folders with many files\" is vague, it should mention JavaScript/TypeScript files that the user does not work on (like packages/libraries). could also mention that this happens in the js-, that would set the right expectation for the 'Configure Excludes' button and also inform the user how this can be done manually. Needs more thought: \"Too many JavaScript/TypeScript files: To enable advanced editor features in JavaScript/TypeScript files exclude large folders with source files you do not work on.\" /cc\nAlso, the status bar button might benefit from being specific about the language it refers to.", "positive_passages": [{"docid": "doc-en-vscode-6850b82036d9888886a0c8392020993c0cd0d8d941eeb06fb6bf482ff65a540d", "text": "}; this._item.tooltip = this._currentHint.message; this._item.text = localize('large.label', \"Configure Excludes\"); this._item.tooltip = localize('hintExclude.tooltip', \"For better performance exclude folders with many files.\"); this._item.tooltip = localize('hintExclude.tooltip', \"To enable JavaScript/TypeScript IntelliSense, exclude large folders with source files that you do not work on.\"); this._item.color = '#A5DF3B'; this._item.show(); this._client.logTelemetry('js.hintProjectExcludes');", "commid": "vscode_pr_16774"}], "negative_passages": []} {"query_id": "q-en-vscode-24da38d9a5adcb48f948a10cfbaa6444c16c1762e26d2ed6a76470769b1bdcfd", "query": "VSCode Version: Code - Insiders 1.9.0-insider (, 2017-01-20T14:58:38.006Z) OS Version: Linux x64 4.8.0-34-generic Extensions: TypeScript file: ! Press enter: !\nverified.", "positive_passages": [{"docid": "doc-en-vscode-abbfc7b2bf93e8b05889dbfdd2ad1a2f666295453062bb81ee6af0ca3615eb1b", "text": "} else if (enterAction.indentAction === IndentAction.Indent) { // Indent once executeCommand = TypeOperations.typeCommand(range, beforeText + 'n' + config.normalizeIndentation(indentation + 't' + enterAction.appendText), keepPosition); executeCommand = TypeOperations.typeCommand(range, beforeText + 'n' + config.normalizeIndentation(indentation + enterAction.appendText), keepPosition); } else if (enterAction.indentAction === IndentAction.IndentOutdent) { // Ultra special let normalIndent = config.normalizeIndentation(indentation); let increasedIndent = config.normalizeIndentation(indentation + 't' + enterAction.appendText); let increasedIndent = config.normalizeIndentation(indentation + enterAction.appendText); let typeText = beforeText + 'n' + increasedIndent + 'n' + normalIndent;", "commid": "vscode_pr_18993"}], "negative_passages": []} {"query_id": "q-en-vscode-24da38d9a5adcb48f948a10cfbaa6444c16c1762e26d2ed6a76470769b1bdcfd", "query": "VSCode Version: Code - Insiders 1.9.0-insider (, 2017-01-20T14:58:38.006Z) OS Version: Linux x64 4.8.0-34-generic Extensions: TypeScript file: ! Press enter: !\nverified.", "positive_passages": [{"docid": "doc-en-vscode-57a545c79e9c12fef8dfa56252731d538d26c5bef0c46f413cb4e7e99c5716d9", "text": "if (!enterResult) { enterResult = { indentAction: IndentAction.None, appendText: '' }; } else { // Here we add `t` to appendText first because enterAction is leveraging appendText and removeText to change indentation. if (!enterResult.appendText) { enterResult.appendText = ''; if ( (enterResult.indentAction === IndentAction.Indent) || (enterResult.indentAction === IndentAction.IndentOutdent) ) { enterResult.appendText = 't'; } else { enterResult.appendText = ''; } } }", "commid": "vscode_pr_18993"}], "negative_passages": []} {"query_id": "q-en-vscode-baa33a969db93309ad24ace857b60cb24d4e2707f2969450e49218068e53549e", "query": "Particularly on Windows, should be called to terminate the process. This will ensure the sockets are closed and the pty agent is shutdown.\nClosing in favor of", "positive_passages": [{"docid": "doc-en-vscode-0fc04f62d8d00e404247744c83ce4b062884902b6238bbc51971ffa47d506c10", "text": "}); ptyProcess.on('exit', function (exitCode) { ptyProcess.kill(); process.exit(exitCode); });", "commid": "vscode_pr_22844"}], "negative_passages": []} {"query_id": "q-en-vscode-83fe556b46d99a255f5e92d534ca95c090415bf928d61e22a548f1eba17c4596", "query": " font-family: var(--monaco-monospace-font); color: var(--vscode-textPreformat-foreground); font-size: 12px; background-color: var(--vscode-textPreformat-background); padding: 1px 3px; border-radius: 4px; } blockquote {", "commid": "vscode_pr_197153"}], "negative_passages": []} {"query_id": "q-en-vscode-edf042f76eac2a42137494a9c681e29b6a34b9c213e62aa062d718bef0efbfce", "query": "Type: // Only show the hover hint if the content is of a decent size const showHoverHint = ( options.content instanceof HTMLElement ? options.content.textContent ?? '' : typeof options.content === 'string' ? options.content : options.content.value ).length > 20; return this.hoverService.showHover({ ...options, persistence: { hideOnKeyDown: false, }, appearance: { showHoverHint: true, showHoverHint, skipFadeInAnimation: true, }, }, focus);", "commid": "vscode_pr_197365"}], "negative_passages": []} {"query_id": "q-en-vscode-74f591f463fb6cb4fe16fc49486bb34ce2698d4420f81d1e0c1d4d8472c5b71f", "query": "