-
Notifications
You must be signed in to change notification settings - Fork 2
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
Multiple tags files (and other improvements) #48
Conversation
Just as an option to consider if you haven't, it seems like it might be possible to just not use PCRE syntax in the regex? I think Just a thought, not well researched. |
Thanks, @michaelkitson! I'll try that. |
src/config.ts
Outdated
function languageMerge(mask: LanguageConfig, base: LanguageConfig): LanguageConfig { | ||
return { | ||
languageId: mask.languageId, | ||
serverCommand: mask.serverCommand || base.serverCommand, | ||
formatCommand: mask.formatCommand || base.formatCommand, | ||
apiSearchUrl: mask.apiSearchUrl || base.apiSearchUrl, | ||
tags: arrayMerge(mask.tags || [], base.tags || [], tag => tag.file, tagMerge), | ||
annotations: arrayMerge(mask.annotations || [], base.annotations || [], ann => ann.file, (mask, base) => mask) | ||
} | ||
} | ||
|
||
function tagMerge(mask: TagsConfig, base: TagsConfig): TagsConfig { | ||
return { | ||
file: mask.file, | ||
grepPath: mask.grepPath, | ||
initTagsCommand: mask.initTagsCommand || base.initTagsCommand, | ||
refreshTagsCommand: mask.refreshTagsCommand || base.refreshTagsCommand, | ||
completionsProvider: mask.completionsProvider || base.completionsProvider, | ||
definitionsProvider: mask.definitionsProvider || base.definitionsProvider, | ||
importsProvider: mask.importsProvider || base.importsProvider | ||
} | ||
} |
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.
Nice.
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.
Looks awesome. Let me know when it's ready for review and I'll stamp.
@michaelkitson I'm going to go with requiring GNU Grep, because I spent too much time pulling my hair out trying to figure out a CLI invocation that worked for both GNU Grep and BSD Grep -_- |
A PR to release these changes has been created, bumping the version from 2.6.0 to 3.0.0. |
Co-requisite with https://github.com/MercuryTechnologies/mercury-web-backend/pull/26568
grep
path.