Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Add LIMIT to sql keywords #24

Merged
merged 1 commit into from
Aug 10, 2017
Merged

Add LIMIT to sql keywords #24

merged 1 commit into from
Aug 10, 2017

Conversation

bjacobso
Copy link
Contributor

@bjacobso bjacobso commented Aug 5, 2017

I think LIMIT should be an included keyword for SQL, considering OFFSET is already included in the list

@msftclas
Copy link

msftclas commented Aug 5, 2017

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@bjacobso
Copy link
Contributor Author

bjacobso commented Aug 5, 2017

Or a supported way to decorate default languages would also work? Here is my hacky workaround:

var _setMonarchTokensProvider = window.monaco.languages.setMonarchTokensProvider;
window.monaco.languages.setMonarchTokensProvider = (languageId, lang) => {
  lang.keywords.push('LIMIT', 'AND', 'OR');
  _setMonarchTokensProvider(languageId, lang)
};

@rebornix
Copy link
Member

@bjacobso LGTM, thanks!

@rebornix rebornix merged commit 1e7815d into microsoft:master Aug 10, 2017
@bjacobso bjacobso deleted the patch-1 branch August 11, 2017 15:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants