Giter Site home page Giter Site logo

Comments (14)

uctakeoff avatar uctakeoff commented on July 28, 2024 15

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;

  • First, launch VSCode on your local.
  • Then, open the command palette and select VSCodeCounter: Save the collected language configurations.
  • Then settings.json will store the configuration information collected from the current language extensions .
  • Connect to the remote (after updating the remote's VSCodecounter) and use it as usual.

from vscode-counter.

uctakeoff avatar uctakeoff commented on July 28, 2024 2

Sorry for the delay in replying.
If you haven't solved the problem yet try the following

Check to see if the failed code is not in .gitignore.

Check the languages currently available

  • Execute VSCodeCounter: Check Available Language on the command palette.
  • Check whether the language is available in the language.

Look at the debug log.

  • Open the debug window from [Help]-[Toggle Developper Tools].
  • Run the action of the problem and check the log.

from vscode-counter.

uctakeoff avatar uctakeoff commented on July 28, 2024 2

I recently noticed that the VSCodeCounter doesn't work properly with "VScode Remote Development".

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

from vscode-counter.

javmah avatar javmah commented on July 28, 2024 1

@im-richard, Thank you so much for your reply. It is working now on Vscode version 1.44.0. I update my Vscode from version 1.43.2.

from vscode-counter.

im-richard avatar im-richard commented on July 28, 2024 1

Nice. Yeah I noticed you were outdated, and figured you may have thought of that if you saw my print of what I was running.

At least we can use it for now. Glad you got it working. 👍

from vscode-counter.

im-richard avatar im-richard commented on July 28, 2024

I receive the same issue. Tried a multitude of folders, different languages (lua, php, js)
Appears to work fine if you count what is currently open in your Workspace; however, does not work if right-clicking on a folder in Explorer and selecting the Counter menu item.

Also works if you toggle live counting in an open file, would like to use this primarily with php, lua.

Tried after numerous restarts, as well as toggling ignoreUnsupportedFile on and off.
Also have linters installed for php, lua, as well as syntax highlighting plugins for both.

Version: 1.44.0 (system setup)
Date: 2020-04-07T23:31:18.860Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.17763

from vscode-counter.

Poooopie avatar Poooopie commented on July 28, 2024

I aswell got this issue with version 1.44.0. This extension has been quite useful and it is very unfortunate it stopped working in the latest version of VSCode. Hopefully this could be fixed.

from vscode-counter.

im-richard avatar im-richard commented on July 28, 2024

Just an update. I got it to work finally.

I had to remove my workspace completely, create a brand new one, and re-add the desired folder to that workspace , then it allowed me to get a report.

If I re-open my original saved workspace and try to count that again, the error pops up.

So it appears to only function properly if you make a brand new workspace and add the folders you need to it.

from vscode-counter.

javmah avatar javmah commented on July 28, 2024

@im-richard, I tried on your way but not working and the programming language is PHP and Ruby. I remove and reinstall the plugin then add a new workspace still Not Working.

from vscode-counter.

im-richard avatar im-richard commented on July 28, 2024

Odd.

Yeah I tried it about 5 different ways, and the only way that seemed to work was to start with a brand new workspace with nothing added.

Then add the project folder you're going to be working with, then I right clicked on the root folder or sub-root (don't remember) and had it calculate the line count and it came right up unexpectedly.

Try setting ignoreUnsupportedFile false, and maybe uninstall / reinstall the PHP syntax highlighter.

I tried a bunch of different ways and that's the only one that worked. If I opened up my old workspace and tried to count again; it fails with that error.

Developer will maybe have to take a look at the code, or possibly has a fix or something we're missing.

Also when you create a new workspace; try restarting vscode before adding the folder / and after adding the folder. I don't remember if I did or not. I tried a "reload" and that didn't seem to have any effect.

I spent over an hour debugging before writing my post here, and then another 30 minutes afterward before I got it to function.

from vscode-counter.

gwharton avatar gwharton commented on July 28, 2024

VSCode 1.46.1
Extension 1.3.5
Remote WSL mode.

Check available languages for me gives

jsonc : aliases[], extensions[.code-workspace,language-configuration.json,icon-theme.json,color-theme.json,.code-snippets], filenames:[settings.json,launch.json,tasks.json,keybindings.json,extensions.json,argv.json,profiles.json]
ignore : aliases[], extensions[], filenames:[.vscodeignore]
git-commit : aliases[Git Commit Message,git-commit], extensions[], filenames:[COMMIT_EDITMSG,MERGE_MSG]
git-rebase : aliases[Git Rebase Message,git-rebase], extensions[], filenames:[git-rebase-todo]
diff : aliases[Diff,diff], extensions[.patch,.diff,.rej], filenames:[]
ignore : aliases[Ignore,ignore], extensions[], filenames:[.gitignore_global,.gitignore]
ignore : aliases[], extensions[], filenames:[.npmignore]
properties : aliases[], extensions[], filenames:[.npmrc]
search-result : aliases[Search Result], extensions[.code-search], filenames:[]
ignore : aliases[], extensions[], filenames:[.eslintignore]
jsonc : aliases[], extensions[], filenames:[.eslintrc.json]
xml : aliases[], extensions[.ent,.mod], filenames:[]
es : aliases[ElasticSearch,es,elasticsearch], extensions[es], filenames:[]
VS Code Counter : available all 13 languages.

in the report I get 0 lines of code and it tells me that all my xml, php, json, css, less and js files are unsupported. e.g

"/home/ubuntu/dev/app/code/Gw/AdminHighlighter/Block/Adminhtml/System/Config/Form/Field/StatusColor.php", "(Unsupported)", , 0, 0, -1
"/home/ubuntu/dev/app/code/Gw/AdminHighlighter/Helper/ConfigHelper.php", "(Unsupported)", , 0, 0, -1
"/home/ubuntu/dev/app/code/Gw/AdminHighlighter/Model/Adminhtml/System/Config/StatusColor.php", "(Unsupported)", , 0, 0, -1
"/home/ubuntu/dev/app/code/Gw/AdminHighlighter/Ui/Component/Listing/Columns/StatusCode.php", "(Unsupported)", , 0, 0, -1
"/home/ubuntu/dev/app/code/Gw/AdminHighlighter/composer.json", "(Unsupported)", , 0, 0, -1
"/home/ubuntu/dev/app/code/Gw/AdminHighlighter/etc/adminhtml/system.xml", "(Unsupported)", , 0, 0, -1
"/home/ubuntu/dev/app/code/Gw/AdminHighlighter/etc/config.xml", "(Unsupported)", , 0, 0, -1
"/home/ubuntu/dev/app/code/Gw/AdminHighlighter/etc/module.xml", "(Unsupported)", , 0, 0, -1
"/home/ubuntu/dev/app/code/Gw/AdminHighlighter/registration.php", "(Unsupported)", , 0, 0, -1

OK, theres my clue. Check your extensions in the section "Feature Contributions". You need to have an extension that provides the relevant Languages section and it needs installing on the remote end of you are using remote mode. e.g to support xml counting I needed the following installed to WSL.

image

Can't find any extensions that provides PHP or less though.

from vscode-counter.

gwharton avatar gwharton commented on July 28, 2024

Yeah. It seems the list of languages when in remote mode is small by default. Installing some extensions into the remote helps but no where near the 50ish languages in the screenshot in the help for the extension.

from vscode-counter.

gwharton avatar gwharton commented on July 28, 2024

:) Working perfectly for me now in remote mode. 53 languages detected instead of 13. :)

from vscode-counter.

grayguest avatar grayguest commented on July 28, 2024

Thanks for your effort

from vscode-counter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.