Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotenv (.env) not supported correctly #201

Closed
aschmois opened this issue May 29, 2020 · 9 comments
Closed

dotenv (.env) not supported correctly #201

aschmois opened this issue May 29, 2020 · 9 comments

Comments

@aschmois
Copy link

Comments inside of a dotenv file don't wrap correctly. When wrapping a line the # is not added automatically. And sometimes will try to wrap non commented lines as well.

@stkb
Copy link
Owner

stkb commented May 31, 2020

Hi, this should now work correctly if you have a dotenv language extension installed in VSCode, eg mikestead.dotenv (I just tried it myself)

@stkb stkb added the fixed? Waiting for user feedback as to whether it's fixed label May 31, 2020
@aschmois
Copy link
Author

On newest version 1.11.1

image
Running rewrap on the long line produces:
image
Running rewrap on the short line produces:
image

@stkb
Copy link
Owner

stkb commented May 31, 2020

Do you have the mikestead.dotenv extension installed?
Please otherwise go to Help -> Toggle Developer Tools and then the Console, and see if there are any related errors.

@aschmois
Copy link
Author

aschmois commented May 31, 2020

Do you have the mikestead.dotenv extension installed?

Yep

Please otherwise go to Help -> Toggle Developer Tools and then the Console, and see if there are any related errors.

No errors appear when rewrapping.

One note: I am running this through ssh remote workspace. However everything else seems to work fine.

@stkb
Copy link
Owner

stkb commented Jun 1, 2020

One note: I am running this through ssh remote workspace. However everything else seems to work fine.

Ok I think that's why it's not finding the extension. Any chance you can test it just locally?

@aschmois
Copy link
Author

aschmois commented Jun 2, 2020

It does work locally, I guess the issue really is on DotENV since it should be an ssh compatible extension like rewrap is. My only concern is that maybe rewrap shouldn't solely rely on other extensions for comment support? Something like DotENV is nice to have for syntax highlighting but I can see a lot of users not installing this extension often since it's not a common ocurrence to edit DotENV files.

Saying that though I haven't looked into the source for rewrap so I can't make assumptions on how it structures what is and what isn't a comment. Any workarounds that you know of or just kind of stuck waiting for DotEnv to support installing into ssh?

@aschmois
Copy link
Author

aschmois commented Jun 2, 2020

On the note of installed extensions, does vscode not abstract away a list of installed extensions regardless if they're loaded on the client or the server it's connected to? I would have thought they merged at one point.

stkb added a commit that referenced this issue Aug 20, 2020
Wasn't being detected as a UI extension by VSCode, so when working with
remote workspaces, it would have to be installed into the remote
workspace.

This also meant that other locally-installed language extensions weren't
being found (vscode.extensions.all didn't contain them?) causing
issue #201, which should be fixed by this.

The option for it to be installed as a workspace extension is still
available but not sure if it should be, and where this would be
necessary.
@stkb stkb added the in pre-release version Is in pre-release version but not in stable yet label Aug 21, 2020
@stkb
Copy link
Owner

stkb commented Aug 21, 2020

@aschmois VSCode provides a list of installed extensions; and while I'm not certain, I think that for extensions installed on the server the list would be only the other extensions installed on the server.

Even if it were for all extensions, Rewrap needs access to the Dotenv extension's files, which it won't have if it's installed on the server and the Dotenv extension on the client.

However thankfully I think the problem has been easily solved by declaring Rewrap as a UI extension (#231), so it shouldn't be installed on the server in the first place. This change is in the next version (and the current beta version).

@stkb
Copy link
Owner

stkb commented Feb 15, 2021

Fixed in v1.14.0

@stkb stkb closed this as completed Feb 15, 2021
@stkb stkb removed in pre-release version Is in pre-release version but not in stable yet fixed? Waiting for user feedback as to whether it's fixed labels Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants