-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add Splunk Query Language highlighting #1280
Conversation
Hi, thanks for your contribution. I have a couple of questions. Is this syntax definition your own work? The advice in the documentation is generally to link to a submodule where possible. Also, I don't see a syntax request issue for this, so I was wondering whether you are aware you can customize bat to use this syntax definition without it needing to be included by default? |
Additionally, does Splunk meet the requirements for adding new built-in syntaxes to bat? The combined total of Atom and Packagecontrol is roughly 5k installs: |
Hello @keith-hall and @eth-p, please see my answers below.
No, right now, the After going through other projects, I'd like to use the Splunk syntax highlighting from the VS Code extension arcsector/vscode-splunk-search-syntax instead, as it is more complete than the previous project. The project has VS Code specific files too, so I'm not sure how loading it as a submodule could work.
Yes, I am aware (see the screenshot).
There are multiple packages for various editors (vim, Sublime, VS Code, and so one) that add support for syntax highlighting Splunk Queries. I'm not sure whether the sum of total installs is a valid metric. I am not aware of any written minimum requirements for adding new syntaxes to bat, if there are any, I'd be glad if you linked me to them. Thanks. I think supporting SPL would be a nice addition for teams who deal with Splunk, as using syntax highlighting in bat makes the Splunk queries way more readable. Especially the long ones with field manipulations and sub-searches. Thanks. |
It's something we're discussing in #1262, but the the current criteria is actually 10k PackageControl downloads. When I link to metrics in my comments, it's mostly to give a better picture of how popular the language is. We're open to discussing languages that don't strictly meet the criteria, but having extra numbers to back things up helps :)
Sorry about that. They're a bit hard to find and only exist as comments inside the syntax request issue template right now, but I'll probably be adding them to a CONTRIBUTING.MD file after #1262 is closed.
For sure. I'm not saying we shouldn't add it, but we have the requirements in place to help balance adding new syntaxes with the maintenance and performance overhead that comes with them. |
This PR adds support for Splunk Query Language highlighting for
.spl
and.splunk
filesExample:
It's still missing the test files, but I'm not sure whether that's required.