Skip to content
Install Plugin >

The Noir JetBrains Plugin provides native syntax highlighting for .nr files. Highlighting works immediately without requiring LSP connection, making it reliable and fast.

Control flow and declaration keywords are highlighted:

fn main() {
let x = 5;
if x > 0 {
for i in 0..10 {
// loop body
}
} else {
while true {
break;
}
}
}
struct Point { x: Field, y: Field }
mod utils;
use std::hash;
pub fn public_func() {}

Keywords include: fn, let, mut, if, else, for, in, while, loop, match, return, break, continue, struct, impl, trait, mod, use, pub, crate, self, super, as, where, type, const, static, unsafe, async, await, dyn, move, ref, box

Built-in types are highlighted with a distinct color:

fn types_example(
a: Field,
b: bool,
c: u8,
d: u16,
e: u32,
f: u64,
g: i8,
h: i32,
i: str<32>,
) {}

Types include: Field, bool, u8, u16, u32, u64, u128, i8, i16, i32, i64, i128, str, Self

Multiple string types are supported:

fn string_examples() {
// Regular strings
let s1 = "Hello, world!";
// Raw strings (no escape processing)
let s2 = r#"Raw string with "quotes""#;
let s3 = r##"Even more # symbols"##;
// Format strings
let name = "Alice";
let s4 = f"Hello, {name}!";
}

Both line and block comments are highlighted:

// This is a line comment
/*
* This is a block comment
* It can span multiple lines
*/
fn example() {
// Comments can appear anywhere
let x = 5; // Including at end of lines
/* Block comments /* can nest */ properly */
}

Decimal and hexadecimal numbers are highlighted:

fn numbers() {
let decimal = 42;
let hex = 0xDEADBEEF;
let binary = 0b1010;
let with_underscores = 1_000_000;
}

Attributes (including test markers) are highlighted:

#[test]
fn test_something() {
assert(true);
}
#[allow(unused)]
fn unused_function() {}
#[oracle(get_random)]
unconstrained fn get_random() -> Field {}

True and false are highlighted:

fn booleans() {
let yes = true;
let no = false;
}

Use keyboard shortcuts to quickly toggle comments:

  • Line comment: Cmd+/ (macOS) or Ctrl+/ (Windows/Linux)
  • Block comment: Cmd+Shift+/ (macOS) or Ctrl+Shift+/ (Windows/Linux)

The plugin provides bracket matching for:

  • Curly braces: { }
  • Square brackets: [ ]
  • Parentheses: ( )

Click next to a bracket to highlight its matching pair. Double-click to select the content between brackets.

The plugin uses standard JetBrains color scheme keys, so your theme’s colors will apply automatically:

ElementColor Scheme Key
KeywordsKEYWORD
TypesCLASS_NAME
StringsSTRING
NumbersNUMBER
CommentsLINE_COMMENT, BLOCK_COMMENT
AttributesMETADATA
BooleansKEYWORD

To customize colors, go to Settings → Editor → Color Scheme → General and modify the relevant keys.