Can you do syntax highlight for Firebase security rules in a markdown file? - google-cloud-firestore

This is a very superficial question, but I'd like to get some docs I'm working on as clean as possible. Is there a way to highlight Firebase security rule syntax in a markdown file? What I'm looking for is something like this:
```firebase-security-rules
service cloud.firestore {
match /databases/{database}/documents {
}
}
```
I've found examples such as this repo (they specify text after the backticks) and this repo (they specify javascript after the backticks). I've also found a plug-in to do syntax highlights for security rules in the IntelliJ IDE, but this is not what I'm looking for either.
I only want to know if there is a way to add specific color highlighting for the Firebase security rule language.
PS: not sure if this is the right community to ask this, if you have any objections let me know.

Related

Delete a specific Intellisense suggestion in VS Code

Intellisense sometimes comes up with irrelevant suggestions that I will never use in my project. Those can get in the way of the valuable other suggestions.
They also prevent VS Code features like "Add all missing imports" from working.
For example:
The first DocumentType is a low-level module that I will never use.
The second is one that I need in most of my files.
So how can I get rid of the first one?
Related (obsolete and unanswered) questions:
VS Code intellisense remove some suggestions
Disable specific autocomplete suggestion in Visual Studio 2013
You cannot disable specific IntelliSense completion options, however, there are a few other relevant caveats.
Answer to not your question: You can filter whole classes of keywords with the editor setting editor.suggest.filteredTypes. See more about this here.
IntelliSense does not allow you to configure or filter specific keywords. The list of all IntelliSense options is here. It also appears this is impossible with other major options. For example, the language server protocol does not support this(GitHub thread abt this). That being said, there is a plethora of autocomplete extensions and I'm certain this feature exists for some.
Something like intellicode might also be an answer, as it will look through other files you've edited to try to learn your practices.
If you're 100% sold on IntelliSense, and you're willing to sink several hours into this, you could set up a discrete language server, and then use something like this to filter completions as they are sent to the editor. While this would work, I think it's a terrible idea.
After spending several hours with no satisfying result, I created my own IntelliSense snippets. I used another keyword to make sure, it will show on top.
I used the Easy Snippet plugin for this.

Full text search in gerrit?

With github you can search class name and it'll find any usages of it in your repo. Or basically any word and github will find usages of it.
Is there a way to do the same thing at gerrit?
Maybe there's a plugin or something?
Gerrit does not have any support to code search and AFAIK there isn't a plugin with such feature.
We use OpenGrok to accomplish this. It's a very nice tool.

Can the Github syntax highlighting scheme be changed?

Is there a way to change the color scheme on Github for syntax highlighting? I have done a basic search and could not find an answer.
There is currently no way to change the color scheme server-side.
Several users of github.com have already asked for custom grammars (#2627 and #2598), which, depending on the solution proposed, may also mean being able to change the color scheme. There are, however, some technical and legal concerns to address before this could be implemented (see #2627 in particular).
If you wanted to do this client-side, you could use a browser extension to change the color scheme. Of course, this would require all users to download an install that extension.

Goto definition like feature in custom (user-defined) language in notepad++

Is there any way (by means of plugins or settings) to create (by that I mean modifying, adding & deleting) custom tags in notepad++?
By tags I mean, to jump to the definition of an instance used anywhere in project (some kind of like 'goto definition' function like we have in other popular languages like C, C++, C#).
I searched for this topic but could not find satisfactory result.
My requirement:
I have created a custom language in Notepad++ (by adding keywords, coloring patterns and other rules). Now I need the way to add custom tags for this language. How can I achieve this?
With the help of tags I should be able to navigate to definition (just like goto definition in other popular languages) in the particular project (all files in project or at least opened files).
Now I need the way to add custom tags for this language. How can I achieve this?
If you're using Exuberant Ctags you can configure a new language definition using just a handful of regular expressions.
For example this link shows how to configure ctags for the Clipper language using this regexp approach:
I have just had to deal with essentially the same issue. I am using Notepad++ with a legacy codebase written in a custom markup language. Each file can contain cross references to definitions in other files, so a way of jumping to the definition would be very useful.
It has not been easy to find a solution that meets all four requirements: a goto definiton feature that works across multiple files and for a custom language in Notepad++. I found this question while searching for a solution; the answer jussij provided is good but it does not really provide a complete solution.
I ended up using the SourceCookifier plugin with a custom language definition. There is not a huge amount of guidance online about how to use it, but once installed you can use it to manually create a language definition using regex rules.
SourceCookifier will work for your language if you can configure the following:
A set of file extensions used by the language
A set of tag types (i.e. a function, class, variable)
A set of POSIX Basic Regular Expressions for locating each tag type, see this post
Once a language has been defined, you can highlight any instance of a found tag and use the shortcut Ctrl+Shift+Enter to jump to the definition of that tag. This can work across a whole codebase of files if you provide it with a list of files to inspect, it calls this a 'session'. All you need to do is drag and drop your codebase folder into the SourceCookifier sidebar window. The codebase I was working with is very large, so I am only using basic functionality, see this post for a good explination of that. The goto definition shortcut can also be added to a right-click context menu, see this post.

Tagging "to-do"s and colouring text in Markdown

I'm using the GitHub flavoured Markdown on the GitHub wiki, and would like to somehow "tag" paragraphs in need of rewriting or elaboration.
My first thought was to write some kind of note above the paragraph and colour that note red (or any colour besides black, really) for quick recognition, but it appears that Markdown does not support colouring text. I'm already using bold to emphasise other things, so I would like to avoid using that.
I realise a similar question (Semantic tagging in Markdown) has been asked previously, but that did not deal with to-do tags. I guess what I'm really looking for is a way of doing this based on someone else's experience as there is no specific syntax for accomplishing what I'm trying to do.
Two questions, then:
1) Why doesn't Markdown support colouring text?
2) Is there any semantically correct way of "tagging" a to-do in a Markdown wiki? If not: any suggestions?
As-is, Markdown is meant to be more of a replacement syntax for a language such as HTML and, for the most part, doesn't determine any styling for content.
If you want to "tag" something as a to-do item, you could make a line linking to an itemized task list on its own separate to-do page.
'pure' markdown is supposed to be at least fairly style-independent (as with most markup languages). It does provide the pragmatism of inline raw html/latex which if you are only targetting one of them (I'm assuming html given the github tag) are probably the easiest way to do it.
Not within markdown markdown. The closest is the class support that various flavours of markdown have added as extensions to the language (personally I use pandocs, although the link you provided offers a couple of extra options). These are obviously harder to use if you are targeting github since you can't control the variant in use.