markdown-links icon indicating copy to clipboard operation
markdown-links copied to clipboard

Introduce findFilesGlob configuration. Allows to define where to look for the files.

Open viktomas opened this issue 4 years ago • 3 comments

Closes #63

This PR introduces a new configuration option, searchGlob. The configuration option is null by default and doesn't interfere with the current logic.

If set, the option overrides the expression generated from fileTypes configuration. If the fileTypes configuration has been set, we'll warn the user:

Screenshot 2020-10-25 at 11 49 19 AM

This PR contains 3 commits:

  1. the first commit only refactors the code in preparation for a change. There's no functionality change
  2. the second commit implements the change
  3. the third commit adds README entry

I tried to write tests, but I wasn't able to run them since this extension uses webpack rather than plain tsc.

viktomas avatar Oct 25 '20 10:10 viktomas

Will this allow sub-directories to be excluded from the search?

Craskermasker avatar Oct 26 '20 09:10 Craskermasker

@Craskermasker in some limited cases. This feature is more for defining where your notes are than where they aren't.

You can see more details in the VS Code API documentation for workspace.findFiles

There is an exclude parameter for that function that is probably more what you are after.

viktomas avatar Oct 26 '20 10:10 viktomas

@tchayen I addressed your feedback and tested the change locally (it still works). Please let me know if there's anything else I can do :+1:

viktomas avatar Jan 10 '21 08:01 viktomas