antfu / vscode-file-nesting-config Goto Github PK
View Code? Open in Web Editor NEWConfig of File Nesting for VS Code
License: MIT License
Config of File Nesting for VS Code
License: MIT License
I don't know if this is a system-specific bug, but unless I exactly follow the case of the files, they are not activated.
I think it would be a good idea to group gitlab-ci.yml
as it's own group instead of below package.json
Do you have improved ideas about that?
When using Maven
in a Spring Boot
or Java
project, it generates mvnw and mvnw.cmd files near the pom.xml file.
The application.properties file and other .properties files in Spring Boot
projects are in the same folder.
'pom.xml': 'mvnw*',
'application.properties': '*.properties',
Manually add these rules to VSCode settings
.nuxtignore
is rarely needed and for this reason adding it under nuxt.config.ts
will be nice to have.
Can we add .nuxtignore
under nuxt.config.ts
? :)
No response
No response
Explorer file nesting is useless
Add nested filetypes for .tsx when using SharePoint Framework (SPFx)
Change following line (307) in update.mjs:
'*.tsx': '$(capture).ts, $(capture).*.tsx, $(capture)_*.ts, $(capture)_*.tsx',
To
'*.tsx': '$(capture).ts, $(capture).*.tsx, $(capture)_*.ts, $(capture)_*.tsx, $(capture).module.scss, $(capture).module.scss.ts',
No response
No response
Every time I open a new window or reload the current window, the update prompt appears. Is it just diffing the config block?
I just reload the window
System:
OS: macOS 12.5
CPU: (10) arm64 Apple M1 Max
Memory: 22.19 GB / 64.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 8.10.0 - ~/.nvm/versions/node/v16.15.0/bin/npm
Browsers:
Chrome: 97.0.4692.99
Safari: 15.6
npm
see the screenshot
System:
OS: macOS 13.0.1
CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
Memory: 238.95 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.18.1 - ~/Library/Caches/fnm_multishells/17118_1670566542068/bin/node
Yarn: 1.22.19 - ~/Library/Caches/fnm_multishells/17118_1670566542068/bin/yarn
npm: 8.19.2 - ~/Library/Caches/fnm_multishells/17118_1670566542068/bin/npm
Browsers:
Chrome: 108.0.5359.98
Firefox Developer Edition: 104.0
Safari: 16.1
pnpm
{
"fileNestingUpdater.upstreamRepo": "tjx666/vscode-file-nesting-config",
"fileNestingUpdater.upstreamBranch": "main",
}
看了一下源码是使用 cdn 获取 readme,但是由于 cdn 缓存,每次手动更新都是拉取旧的内容。
Need not
System:
OS: macOS 13.1
CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
Memory: 1.35 GB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.1 - ~/Library/Caches/fnm_multishells/74893_1671161701687/bin/node
npm: 9.2.0 - ~/Library/Caches/fnm_multishells/74893_1671161701687/bin/npm
Browsers:
Chrome: 108.0.5359.124
Firefox Developer Edition: 104.0
Safari: 16.2
npm
--------------VSCode--------------
Version: 1.65.2
Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
Date: 2022-03-10T14:42:05.236Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin arm64 21.2.0
--------------PluginExtension--------------
Version: 0.1.1
--------------Issue--------------
When in workspace mode, when the configuration file of workspace 1 is moved to workspace 2, it will not be synchronized in real time.
when I delete a nesting file ,like 'eslintrc.json', vscode's explorer can't update immediately
中文: 我在vscode用右键删除折叠的文件时, 文件树不能及时更新
vanilla-extract is a CSS-in-TS library, and files end with .css.ts
. I hope it can be nested under the TSX component.
Maybe I can add $(capture).css.ts
in this line.
vscode-file-nesting-config/update.mjs
Line 441 in 9bb2e2e
No response
No response
如上图片,很多文件夹和文件,自动被生成了多个,很奇怪。且卸载插件依然存在这个问题。我也在想是不是该插件的问题。
null
macos:最新款系统
yarn
please review my screenshot
System:
OS: macOS 14.4.1
CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
Memory: 81.90 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.12.2 - ~/.volta/tools/image/node/20.12.2/bin/node
Yarn: 1.22.21 - ~/.volta/tools/image/yarn/1.22.21/bin/yarn
npm: 10.5.0 - ~/.volta/tools/image/node/20.12.2/bin/npm
pnpm: 9.0.6 - ~/.volta/bin/pnpm
bun: 1.1.4 - ~/.bun/bin/bun
Browsers:
Chrome: 124.0.6367.203
Safari: 17.4.1
pnpm
{
"*.css": "*css.d.ts",
"*.less": "*less.d.ts",
"*.scss": "*scss.d.ts",
"*.sass": "*sass.d.ts"
}
I have a TypeScript React component. Using JSX force me to end the file with .tsx
.
The style for this component is written in Less, a preprocessor for CSS, and I think it should be nested under the component.
WDYT?
We can add it here, I think:
vscode-file-nesting-config/update.mjs
Line 304 in 8cc878e
But I see that you ask for *.component.ts
for components and CSS dependencies.
No response
No response
Actually, this rule is'nt working :
".env": "*.env, .env*, env.d.ts",
I suppose it's about the *.env
pattern, because if I retire it, it seems to work.
Since I don't think that we can have a prod.env
or local.env
file, may this line be updated?
N.B.: with a nuxt/next/framework repo, all files are well included under the *.config.js
file.
Installed plugins
The associated file
Select and press Enter
Error message
This is an application problem, while installing antfu.file-nesting and vscodevim.vim two plug-ins, and select the folded file and press the Enter key to reproduce.
System:
OS: Windows 10 10.0.19043
CPU: (16) x64 Intel(R) Core(TM) i7-10700T CPU @ 2.00GHz
Memory: 16.33 GB / 31.72 GB
Binaries:
Node: 16.15.1 - D:\Software\nvm\v16.15.1\node.EXE
Yarn: 1.22.19 - D:\Software\nvm\v16.15.1\yarn.CMD
npm: 8.14.0 - D:\Software\nvm\v16.15.1\npm.CMD
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (112.0.1722.48)
pnpm
When using NuGet RestorePackagesWithLockFile
it will generates packages.lock.json
near the .csproj
or .fsproj
file.
"*.csproj": "*.config, *proj.user, appsettings.*, bundleconfig.json, packages.lock.json",
"*.fsproj": "packages.lock.json"
Manually add these rules to VSCode settings
No response
*.cshtml : $(capture).cshtml.cs
Visual Studio's JS SDK is probably going to be the norm for ASP.NET developers.
In my opinion it would make sense to inherit from the other JS projects and also include them under the *.esproj
:
{
"*.esproj": "*proj.user, svelte.config.*, vite.config.*, vue.config.*, remix.config.*, quasar.conf.js, nuxt.config.*, next.config.*, angular.json, *.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, i18n.config.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, playwright.config.*, postcss.config.*, puppeteer.config.*, rspack.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, uno.config.*, unocss.config.*, vitest.config.*, vuetify.config.*, webpack.config.*, windi.config.*",
}
No response
No response
Usage of Microsoft marketplace-distributed extensions in non-MS products is theoretically prohibited.
Publishing it to Open VSX, to be able to use it on other VSCode-likes (VSCodium for example).
No response
The docs to publish an extension can be found here (even if I assume that you are already aware of it, given that some of your extensions appears there). This process is straightforward and shouldn't take too long. Essentially, you need an authentication token and to execute the ovsx publish
command to publish your extension. There's also a doc explaining the whole process with an example GitHub Action workflow.
I was required to move from VSCode to WebStorm, and I don't have the updated nesting configurations there.
The file-nesting feature is available on JetBrains too: https://www.jetbrains.com/help/idea/file-nesting-dialog.html
Can we publish this project as a JetBrains plugin?
No response
No response
I have some custom rules in %AppData%\Code\User\settings.json
-explorer.fileNesting.patterns
after update config by this extension, the custom rules are gone.
%AppData%\Code\User\settings.json
, under explorer.fileNesting.patterns
File Nesting Updater: Update config now
System:
OS: Windows 10 10.0.19045
n/a
Hi, I am posting this issue for discussion.
The file naming conventions of some languages are written with an underscore to separate instead of a dot. It would be nice to support this.
Example:
"*.ts": "$(capture)_test.ts", // for Deno: https://deno.land/manual/contributing/style_guide#use-underscores-not-dashes-in-filenames
"*.py": "test_$(capture).py",
"*.rs": "$(capture)_test.rs"
I wonder if we should add only the test files as above or nest all files with an underscore.
First of all, thank you very much for the extension, the idea, and all of your work generally in the JS ecosystem!
In 11f3dc5 the code which checked for the presence of an existing settings for explorer.experimental.fileNesting.expand
was removed in favor of always setting it to false
.
I may be in the minority given the reason this extension exists in the first place, but I actually prefer to see all of the files by default (i.e. explorer.experimental.fileNesting.expand=true
) with the ability to collapse the nesting trees down if I feel overwhelmed.
An ideal outcome to me would be to make "respect existing explorer.experimental.fileNesting.expand
selection" an extension setting for File Nesting Updater
so that the extension does not override how I have this nesting setting set (also, personally fine if my preference here is not the default, because as I said, I suspect I'm in the minority here).
Alternatively, one could argue that the extension just shouldn't touch this user setting - if a user has it set, or not, it's up to them. This leads to a solution which deletes code and introduces no added maintenance burden. Could also just note that this is a setting users might want to check on in the README and call that good?
For reference, here is a video demonstration of how invocation of the File Nesting Updater
update command changes the value of explorer.experimental.fileNesting.expand
:
In the VSCode 1.85.0 version, the explorer does not display any files and directories when "explorer.fileNesting.enabled": true is set.
However, when this setting is changed to "explorer.fileNesting.enabled": false, the files and directories are shown.
Is there any rule that affects this behavior?
vscode version info
Version: 1.85.0 (system setup)
Commit: af28b32d7e553898b2a91af498b1fb666fdebe0c
Date: 2023-12-06T20:48:09.019Z
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.18363
In window10 and then download vscode 1.85.0
System:
OS: Windows 10 10.0.18363
CPU: (8) x64 Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
Memory: 7.67 GB / 15.74 GB
Binaries:
Node: 18.16.0 - ~\AppData\Local\fnm_multishells\16564_1702006014106\node.EXE
npm: 9.5.1 - ~\AppData\Local\fnm_multishells\16564_1702006014106\npm.CMD
Browsers:
Chrome: 120.0.6099.71
Edge: Spartan (44.18362.449.0)
Internet Explorer: 11.0.18362.1
pnpm
atm the pkg keeps changing other unrelated configs value like explorer.experimental.fileNesting.expand
on each update.
I have several project that uses Makefile
and associated *.mk
files. I'd like to make a permanent change so the config updater has those settings.
"explorer.fileNesting.patterns": {
"Makefile": "*.mk",
}
Add the following to the update.mjs
file:
const base = {
...
'Makefile': '*.mk',
...
}
Re-adding the pattern matching on every config update.
No response
first many thanks for this amazing tool, however atm on each update the ext will enable explorer.fileNesting.enabled
, which is annoying.
leave the user settings untouched and only update the config
No response
No response
*.knip.*
causing the VSCode Explorer does not display files.
String does not match the pattern of "^([^,*]*?[^,*])(, ?[^,*]*?[^,*])*$".
Each key pattern may contain a single * character which will match any string.
Delete *.knip.*
and it will return to normal.
Open the folder containing package.json using VSCode.
Visual Studio Code
Version: 1.85.0 (Universal)
Commit: af28b32d7e553898b2a91af498b1fb666fdebe0c
Date: 2023-12-06T18:18:04.614Z (1 day ago)
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin x64 22.6.0
System:
OS: macOS 13.6
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 282.61 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.10.0 - ~/Library/Caches/fnm_multishells/42942_1702000371659/bin/node
npm: 10.2.3 - ~/Library/Caches/fnm_multishells/42942_1702000371659/bin/npm
pnpm: 8.5.0 - ~/Library/pnpm/pnpm
bun: 1.0.14 - /usr/local/bin/bun
Browsers:
Chrome: 120.0.6099.62
Safari: 17.1
npm
Hi!
I love your config, but I was wondering if it was intentional to ignore $(capture).*.tsx
in the *.tsx
rule ?
Because, with this config, spec files like MyFile.test.tsx
would become a child of MyFile.tsx
.
I'm asking because this rule is present for ts
files.
"*.ts": "$(capture).js, $(capture).*.ts",
"*.tsx": "$(capture).ts",
VS
"*.ts": "$(capture).js, $(capture).*.ts",
"*.tsx": "$(capture).ts, $(capture).*.tsx",
Thanks
.gitignore
可以划分到 package.json
下吗
I have a webpack.mix.js
file in a php project that gets nested under both artisan
and package.json
files. Clicking on any of the nested files opens the same file.
I'm using the latest version of the extension with no custom config applied.
Provided a screenshot
System:
OS: Windows 10 10.0.22621
CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
Memory: 8.76 GB / 15.93 GB
Binaries:
Node: 18.18.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
npm: 10.1.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 8.7.6 - C:\Program Files\nodejs\pnpm.CMD
Browsers:
Edge: Spartan (44.22621.2283.0), Chromium (117.0.2045.43)
Internet Explorer: 11.0.22621.1
npm
I was using a Remix app and noticed that the tsconfig.json
file repeats twice, it is under package.json
as well as remix.config.js
npx create-remix@latest
System:
OS: Windows 10 10.0.22000
CPU: (8) x64 Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz
Memory: 542.18 MB / 7.79 GB
Binaries:
Node: 16.14.2 - ~\scoop\apps\nvm\current\nodejs\nodejs\node.EXE
Yarn: 1.22.19 - ~\scoop\apps\nvm\current\nodejs\nodejs\yarn.CMD
npm: 8.5.0 - ~\scoop\apps\nvm\current\nodejs\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.22000.120.0), Chromium (105.0.1343.53)
Internet Explorer: 11.0.22000.120
pnpm
Thank you for the extension, it's really useful. But as you say, the snippet is opinionated. If the variable URL can be configured in VS Code configurations, users can then update from any favorite repo. I think it will be more shareable. 😀
After the version is updated, it is found that your plugin is invalid. Check the updated documentation and find that VSCode does the same thing Explorer file nesting
, copying your configuration to its settings can achieve the same effect as your plugin.
So I uninstalled your plugin, but thank you very much for making this plugin, it has brought me a good development experience for two months.
👍
Cool project!
I wonder if support for autogenerated LICENSE files should be added.
These are typically created by Webpack, and sit alongside individual .js files.
I was able to add it by adding $(capture).js.LICENSE.txt
to the *.js
group.
Happy to send a PR if you'd like to add this as a feature?
create a a.js file and a a.LICENSE.js.txt file
N/A
n/a
The extension is still works when I disabled it
see document Activation Events | Visual Studio Code Extension API
onStartupFinished
This activation event is emitted and interested extensions will be activated some time after VS Code starts up. This is similar to the
*
activation event, but it will not slow down VS Code startup. Currently, this event is emitted after all the*
activated extensions have finished activating.... "activationEvents": [ "onStartupFinished" ] ...
vscode-file-nesting-config/extension/package.json
Lines 59 to 61 in 93659d4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.