-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass ignore patterns obtained from ST to the file watcher #1823
Conversation
sublime_pattern_to_glob(pattern, is_directory_pattern=False, root_path=root_path) | ||
for pattern in globalprefs().get('file_exclude_patterns') | ||
] | ||
return folder_excludes + file_excludes + ['**/node_modules/**'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's kinda weird that I'm forcing node_modules
to be ignored but it's kinda the "right" thing to do as nothing should need to watch it and there would be a ton of events triggered on running "npm i" or similar otherwise.
for folder in self.get_workspace_folders(): | ||
ignores = config.get('ignores') or self._get_global_ignore_globs(folder.path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to exactly handle the situation when the ignores
is specified in the config. Whether all of those should be combined or not. If we combine then there will be no way to opt-out of the excluded patterns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would leave as is. (I would just add a comment above with the explanation why they are not combined)
""" | ||
Convert a Sublime Text pattern (http://www.sublimetext.com/docs/file_patterns.html) | ||
to a glob pattern that utilizes globstar extension. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be used in windows.py as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would you use it there? Convert to glob and then how match the glob to file path?
No description provided.