Closed fishshi closed 6 days ago
this can also fix #350.
Yes, perhaps the best solution is to use a combination of strict matching and wildcard support. This approach would improve the flexibility of the ignore rules and prevent incorrect ignores caused by the current partial matching. Additionally, it might be beneficial to add some configuration options based on project requirements, giving users more control.
Hey thanks for the report. I removed this concept of FILE_IGNORE_LIST
instead now it reads the .gitignore
file and also use a custom option for globing rules in the extension settings if required.
Is your feature request related to a problem? Please describe. When I work on a document project based on markdown, Embedding the workspace has a catastrophic result, as all the
.md
files are ignored, while image files like.png
are included instead. Therefore, I found that there are some issues with the current embedding system.Describe the solution you'd like At this stage, Twinny uses include to match the FILE_IGNORE_LIST. If the file name contains any item from the list, the file will be ignored. This imposes unnecessary restrictions on file naming. https://github.com/twinnydotdev/twinny/blob/57cc2aeca4aae06c5efb9b686d370a346baf79fa/src/extension/utils.ts#L689-L693 I was wondering if we could replace include with strict equality. Since most of the directories or file names that need to be ignored are fixed, we could introduce wildcards like
*
for the non-fixed parts. For example,*.log
would ignore all.log
files like git.Additional context If you have any suggestions or concerns, please let me know. And if you think this is feasible, I can quickly make a PR Draft.