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

Javascript and Typescript not working with Remote-SSH #20

Closed Sociopacific closed 4 years ago

Sociopacific commented 4 years ago

My whole project is written in typescript and VSCodeCounter ignores all .ts files.This is relevant only when I connect to a remote directory using Remote-SSH.

uctakeoff commented 4 years ago

You can see a detailed log of this extension in the developer tools.

Help> Toggle Developer Tools

Please tell me what was output.

uctakeoff commented 4 years ago

I replaced the file API used with one provided by vscode. Ver.1.3.2. Perhaps this does not help?

Sociopacific commented 4 years ago

Screenshot_115

uctakeoff commented 4 years ago

Could you try the following:

Sociopacific commented 4 years ago

Screenshot_116 Screenshot_118 Screenshot_117

uctakeoff commented 4 years ago

Looks like the TypeScript language extension is missing. If found, you should see something like: 2020-02-08

It seems to be because Remote-SSH is used, but I do not know the exact cause. Usually it should be installed from the beginning.

I'm not sure because I've never used Remote-SSH, but have you noticed anything from this story?

luckyray-fan commented 4 years ago

Oh, i have the same issue, in remote-ssh. file cannot be found except EditorConfig and json (my project is base on react and typescript)

uctakeoff commented 4 years ago

As I mentioned elsewhere, I have found that VSCodeCounter does not work properly with "VSCode Remote Development".

VSCodeCounter can also count for unknown languages by referring to information in your installed language extensions. However, this information is not available in "Remote Development".

We are currently working through a trial and error process to find a solution. Please wait for a while.

uctakeoff commented 4 years ago

@RDMStreet @luckyray-fan

Ver. 2.0.0 released.

I modified VSCode Counter's ability to collecting VSCode language extensions so that it can be called as an independent function. The idea is to collect the information once in the local environment and store it so that it can be used remotely.

Please try the following;

luckyray-fan commented 4 years ago

success, thanks for your work image

Sociopacific commented 4 years ago

I still have problems with this. image

Yonglin5170 commented 4 years ago

I found a problem that it only works for my home folder /home/XXX. In fact, I use the /data/XXX folder more frequently, is there any solutions?

uctakeoff commented 4 years ago

@plus5170 I'm sorry. I'm not sure what's going on. My English is not very good, so it would be helpful if you could explain it to me.

Translated with www.DeepL.com/Translator (free version)

Yonglin5170 commented 4 years ago

@plus5170 I'm sorry. I'm not sure what's going on. My English is not very good, so it would be helpful if you could explain it to me.

  • Is that what happened with Remote-SSH?
  • Is "/home/" the Unix filesystem's home directory?
  • What kind of files are in "/data/"?
  • What kind of output do you expect to get when you run VSCodeCounter: Count lines in workspace with this setting VSCode Counter: Ignore Unsupported File enabled?
  • What kind of output do I get when I run a VSCodeCounter: Check available languages with the setting enabled?

Translated with www.DeepL.com/Translator (free version)

I'm sorry I wasn't clear. I use Remote-SSH to open folders on my linux sever and "/home/w5yl" is my remote home folder. I have some codes in my home folder, but most of my code is in "/data/w5yl". The problem is the command VSCodeCounter: Count lines in workspace only worked on "/home/w5yl" but didn't work on "/data/w5yl". Then I found that the count failed because there were too many files in the "/data/w5yl" directory. After setting the VSCodeCounter: Include option, I got the count results. It turns out the new version of the extension works well with Remote-SSH. Thanks for your reply!! Useful extension!