gutter-preview
gutter-preview copied to clipboard
mapping the gutterpreview paths failed
About mapping to be computed relative to project root .
I put settings like "gutterpreview.paths":{"~/":"${workspaceRoot}/MyPersonalWeb/wwwroot" }
however it didn`t work. still default display instead of which being set
could you take an example for me?
Iit doesn't work becaise variable resolution is not done for settings (there is no API for it right now, see https://github.com/microsoft/vscode/issues/46471).
I suggest to simply use gutterpreview.paths":{"~/":"MyPersonalWeb/wwwroot/" }
, as workspace root based resolution is done on top of the alias resolution, this should resolve the issue.
Iit doesn't work becaise variable resolution is not done for settings (there is no API for it right now, see microsoft/vscode#46471).
I suggest to simply use
gutterpreview.paths":{"~/":"MyPersonalWeb/wwwroot/" }
, as workspace root based resolution is done on top of the alias resolution, this should resolve the issue.
Thanks for your answer .I try this ,but it still didn`t function.
My bad it should have been
gutterpreview.paths":{"~":"MyPersonalWeb/wwwroot/" }
Let me know if this worked, I've just tested the setup locally, and it seems to be working fine. If the issue still persist, I'll reopen the ticket again :+1:
nope it is still not working
Ok so it seems to work :sweat_smile: , I've got confused because I had a path mapping to the src folder (which is the default additonal source folder).
TLDR; Should work with gutterpreview.paths":{"~":"MyPersonalWeb/wwwroot/" }
Ok so it seems to work 😅 , I've got confused because I had a path mapping to the src folder (which is the default additonal source folder).
TLDR; Should work with
gutterpreview.paths":{"~":"MyPersonalWeb/wwwroot/" }
I am in the puzzled about this,it didn`t work even after reopened ,still!😣 Could you show your strcut of folder tree or seek the mistake which I made. Big thanks to you.
The following is the sreenshot of my folder .
I have to check this in more detail. Sorry, I've totally forgot about this :(
So, today I've checked it with https://github.com/TreeMoons/Moons and the mentioned configuration option "gutterpreview.paths": { "~": "MyPersonalWeb/wwwroot/" }
.
I'm not sure why it doesn't work for you, but it worked for me for the first try...
I've also updated all dependencies in the meanwhile, perhaps that helped too...
I'm wondering if there is something else causing some issues... Are there any specialties in your workspace / system configuration?
Please give it another try with the new version ([email protected])
Thank you,although this isue isn’t solved for me.
updated new version, aslo failed.
I use some configuration like:
"path-autocomplete.triggerOutsideStrings":true,
"path-autocomplete.pathMappings": {
"~": "${folder}/MyPersonalWeb/wwwroot",
"/": "${folder}",
"$root": "${folder}/MyPersonalWeb/wwwroot",
},
yes ,I try to delete my configuration above,and restart ,however,it' s failed as well.
configration:
"gutterpreview.paths": {
"~": "MyPersonalWeb/wwwroot/"
}
my project file at “MyPersonalWeb/Views/Home/Index.cshtml”
<img src="~/src/img/logo.png" alt=""> @* unworked*@
<img src="../../../MyPersonalWeb/wwwroot/src/img/big.jpg" alt=""> @* worked*@
It is a big problem that I don't kown where the problem happened.
Thank you,although this isue isn’t solved for me.
updated new version, aslo failed.
I use some configuration like:
"path-autocomplete.triggerOutsideStrings":true, "path-autocomplete.pathMappings": { "~": "${folder}/MyPersonalWeb/wwwroot", "/": "${folder}", "$root": "${folder}/MyPersonalWeb/wwwroot", },
yes ,I try to delete my configuration above,and restart ,however,it' s failed as well.
configration:
"gutterpreview.paths": { "~": "MyPersonalWeb/wwwroot/" }
my project file at “MyPersonalWeb/Views/Home/Index.cshtml”
<img src="~/src/img/logo.png" alt=""> @* unworked*@ <img src="../../../MyPersonalWeb/wwwroot/src/img/big.jpg" alt=""> @* worked*@
It is a big problem that I don't kown where the problem happened.
hi,did you resolve the problem?
Thank you,although this isue isn’t solved for me.
updated new version, aslo failed.
I use some configuration like:
"path-autocomplete.triggerOutsideStrings":true, "path-autocomplete.pathMappings": { "~": "${folder}/MyPersonalWeb/wwwroot", "/": "${folder}", "$root": "${folder}/MyPersonalWeb/wwwroot", },
yes ,I try to delete my configuration above,and restart ,however,it' s failed as well.
configration:
"gutterpreview.paths": { "~": "MyPersonalWeb/wwwroot/" }
my project file at “MyPersonalWeb/Views/Home/Index.cshtml”
<img src="~/src/img/logo.png" alt=""> @* unworked*@ <img src="../../../MyPersonalWeb/wwwroot/src/img/big.jpg" alt=""> @* worked*@
It is a big problem that I don't kown where the problem happened.
hi,did you resolve the problem?
No,I abandoned it ! :(
I solved this problem by replacing "@" with "$". Something like this:
"path-autocomplete.pathMappings": {
"$img": "${folder}/src/img"
},
"gutterpreview.paths": {
"$img": "img"
},
"gutterpreview.enableReferenceLookup": true
I solved this problem by replacing "@" with "$". Something like this:
"path-autocomplete.pathMappings": { "$img": "${folder}/src/img" }, "gutterpreview.paths": { "$img": "img" }, "gutterpreview.enableReferenceLookup": true
it don't work :(