Error on Paste - Range Formatting
See original GitHub issueHello:
I have Visual Studio Code 1.38.0-insider and YAML 0.5.1. Every time I paste code I receive a range formatting error in the Outputs window of the console.
I’ve tried opening a workspace, a folder, and an individual file - all with the same results. I enabled YAML Server Trace and this is the output that I’m seeing right around the error message. It does not seem to matter if I’m pasting real YAML - or any other text - the error message is always the same:
[Trace - 9:14:58 AM] Sending request 'textDocument/rangeFormatting - (16)'.
Params: {
"textDocument": {
"uri": "file:///d%3A/GitRepos/CFInfra/dns-zone.yaml"
},
"range": {
"start": {
"line": 151,
"character": 0
},
"end": {
"line": 151,
"character": 17
}
},
"options": {
"tabSize": 2,
"insertSpaces": true
}
}
[Trace - 9:14:58 AM] Received response 'textDocument/rangeFormatting - (16)' in 1ms. Request failed: Unhandled method textDocument/rangeFormatting (-32601).
[Error - 9:14:58 AM] Request textDocument/rangeFormatting failed.
Message: Unhandled method textDocument/rangeFormatting
Code: -32601
[Trace - 9:14:58 AM] Received notification 'textDocument/publishDiagnostics'.
Params: {
"uri": "file:///d%3A/GitRepos/CFInfra/dns-zone.yaml",
"diagnostics": [
{
"message": "can not read a block mapping entry; a multiline key may not be an implicit key",
"range": {
"start": {
"line": 151,
"character": 5102
},
"end": {
"line": 151,
"character": 5102
}
},
"severity": 1
},
{
"message": "bad indentation of a mapping entry",
"range": {
"start": {
"line": 151,
"character": 5102
},
"end": {
"line": 151,
"character": 5102
}
},
"severity": 1
},
{
"message": "incomplete explicit mapping pair; a key node is missed",
"range": {
"start": {
"line": 151,
"character": 5104
},
"end": {
"line": 151,
"character": 5104
}
},
"severity": 1
},
{
"message": "bad indentation of a mapping entry",
"range": {
"start": {
"line": 165,
"character": 5539
},
"end": {
"line": 165,
"character": 5539
}
},
"severity": 1
},
{
"message": "bad indentation of a mapping entry",
"range": {
"start": {
"line": 179,
"character": 5957
},
"end": {
"line": 179,
"character": 5957
}
},
"severity": 1
},
{
"message": "bad indentation of a mapping entry",
"range": {
"start": {
"line": 190,
"character": 6218
},
"end": {
"line": 190,
"character": 6218
}
},
"severity": 1
},
{
"message": "bad indentation of a mapping entry",
"range": {
"start": {
"line": 202,
"character": 6577
},
"end": {
"line": 202,
"character": 6577
}
},
"severity": 1
},
{
"message": "bad indentation of a mapping entry",
"range": {
"start": {
"line": 213,
"character": 6919
},
"end": {
"line": 213,
"character": 6919
}
},
"severity": 1
},
{
"message": "bad indentation of a mapping entry",
"range": {
"start": {
"line": 224,
"character": 7261
},
"end": {
"line": 224,
"character": 7261
}
},
"severity": 1
},
{
"message": "bad indentation of a mapping entry",
"range": {
"start": {
"line": 235,
"character": 7564
},
"end": {
"line": 235,
"character": 7564
}
},
"severity": 1
},
{
"message": "bad indentation of a mapping entry",
"range": {
"start": {
"line": 246,
"character": 7874
},
"end": {
"line": 246,
"character": 7874
}
},
"severity": 1
},
{
"message": "bad indentation of a mapping entry",
"range": {
"start": {
"line": 257,
"character": 8197
},
"end": {
"line": 257,
"character": 8197
}
},
"severity": 1
},
{
"message": "bad indentation of a mapping entry",
"range": {
"start": {
"line": 268,
"character": 8512
},
"end": {
"line": 268,
"character": 8512
}
},
"severity": 1
},
{
"message": "bad indentation of a mapping entry",
"range": {
"start": {
"line": 279,
"character": 8804
},
"end": {
"line": 279,
"character": 8804
}
},
"severity": 1
},
{
"message": "bad indentation of a mapping entry",
"range": {
"start": {
"line": 290,
"character": 9103
},
"end": {
"line": 290,
"character": 9103
}
},
"severity": 1
},
{
"message": "bad indentation of a mapping entry",
"range": {
"start": {
"line": 301,
"character": 9386
},
"end": {
"line": 301,
"character": 9386
}
},
"severity": 1
},
{
"message": "bad indentation of a mapping entry",
"range": {
"start": {
"line": 312,
"character": 9700
},
"end": {
"line": 312,
"character": 9700
}
},
"severity": 1
}
]
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:10
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Bug in Excel: Paste Values & Source formatting pastes formulas
The prompt when Pasting Values & Formatting is normal behavior in Excel. It's just letting the user know to be cautious when pasting...
Read more >copying and pasting multiple ranges with formatting issue in ...
I got two errors. 1. It should be End Select instead of End if 2. Its throwing me error that the copy action...
Read more >Paste with destination formatting error - Excel Help Forum
Hi, I tried using the below VBA to enable paste with destination formatting and infact it works. Sub PasteAsValue() ActiveSheet.
Read more >Excel Fix Copy Paste Problems Work on Multiple Selections
Why You See Copy Error. Excel will show that copy error message if you selected multiple ranges, and those ranges don't “match up”....
Read more >How to Fix the 'Too Many Cell Formats' Error in Excel - Causal
If you're getting the "too many cell formats" error in Excel, it means that you're trying to apply too many different formatting options...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@JPinkney I still see the bug, although the solution provided by @subzerochi works temporarily.
I’m running the latest version of VS Code on Mac and version 0.5.2 of this plugin.
VS Code:
Steps to reproduce:
createOrders:
, hit enter and then Cmd+V.Hope it helps!
@danielroe No worries! I just wanted to make sure the fix wasn’t a ‘works on my machine’. I’ll probably release this fix this friday