uctakeoff / vscode-counter

VS Code extension: counts blank lines, comment lines, and physical lines of source code in many programming languages.
MIT License
152 stars 20 forks source link

Does not work on WSL 2.0 remote (Ubuntu) #73

Open NemoTR opened 2 years ago

NemoTR commented 2 years ago

image

image

Have to use this plug-in locally.

GenericallyNamed commented 2 years ago

I'm experiencing this issue as well. When you run "Toggle Real-time Counter Visibility", do you also see a message at the bottom of the window saying "VSCodeCounter:Unsupported"?

NemoTR commented 2 years ago

I'm experiencing this issue as well. When you run "Toggle Real-time Counter Visibility", do you also see a message at the bottom of the window saying "VSCodeCounter:Unsupported"?

No, I don't. I just see ‘VScodeCounter preparing...’

uctakeoff commented 2 years ago

see #43 #26

adiazmendez commented 9 months ago

Hello, I have made several things in order to solve the issue:

My VSCodeCounter config in settings.json for using Javascript files is:

"javascript": {
      "aliases": [],
      "filenames": [],
      "extensions": [],
      "lineComments": [],
      "blockComments": [
        [
          "{/*",
          "*/}"
        ]
      ],
      "blockStrings": [
        [
          "`",
          "`"
        ]
      ],
      "lineStrings": []
    },

It is not still working for Javascript files and I do not know what I am doing wrong with my configuration.

uctakeoff commented 9 months ago

VSCodeCounter analyzes code based on information from other language extensions installed in the environment. If you run it on a WSL, it will only respond to those language extensions that are installed on the WSL.

If you want to use a language extension that is installed locally but not on WSL, you need to extract the necessary information from the local language extension and bring it to the WSL environment. The mechanism for this is "Save the collected language configurations."

You can run this in your local environment and bring the information you have created to the WSL environment to support it. Again, look at the following instructions and try different ways to make it work. https://github.com/uctakeoff/vscode-counter?tab=readme-ov-file#save-language-configurations