Comments (14)
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.
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.
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.
@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.
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.
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.
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.
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.
@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.
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.
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.
Can't find any extensions that provides PHP or less though.
from vscode-counter.
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.
:) Working perfectly for me now in remote mode. 53 languages detected instead of 13. :)
from vscode-counter.
Thanks for your effort
from vscode-counter.
Related Issues (20)
- Path is rendered incorrectly HOT 1
- How to block Comments? HOT 4
- Open VSX?
- Support storing collected language elsewhere HOT 5
- Error Loading Webview HOT 1
- Count the files in the top-level as a separate item HOT 2
- Counts documentation comments as code in Julia HOT 1
- New lines in string
- Not exclude dirs HOT 1
- How do I convert to Chinese HOT 1
- Bug : blockComments character in a line of code falsifies the counts HOT 1
- BUG: Unable to correctly count the number of comment lines in the .vue file HOT 2
- Doesn't appear to work when used in a tunnel HOT 2
- Doesn't recognize javascript HOT 1
- Support for `ifdef Compiler Directives HOT 2
- Does not count comments in batch HOT 1
- It seems does not work with remote ssh in ubuntu22.04? Just show there was no target file. HOT 2
- Trailing newline ('\n') character in source code is treated as an extra blank line HOT 6
- 1
- Maximum call stack exceeded when counting very large repo HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-counter.