nvim-neorg / norg-specs

A collection of specifications and grammars for Neorg's file format, `norg`.
90 stars 17 forks source link

inline code syntax highlighting #45

Closed aabbccddeeffggj closed 2 months ago

aabbccddeeffggj commented 2 months ago

1 - On a .norg file:

- example of initializing a variable:
@inline(cpp) int two{2};

concealing...

• example of initializing a variable
int two{2};

2 - Being able to define aliases for these statements would be interesting:

/alias("@inline(cpp)", "cpp")
- example of initializing a variable
cpp int two{2};

concealing...

• example of initializing a variable
int two{2};
boltlessengineer commented 2 months ago

We already have this feature with attached modifier extension:

`int two{2};`(lang:cpp)

https://github.com/nvim-neorg/norg-specs/blob/82d7f7fa066066b997056bfdb1ab30ca336307e8/1.0-specification.norg#L1244-L1250

aabbccddeeffggj commented 2 months ago

It has yet to be implemented in the future? I tested it and doesn't seem to work.

boltlessengineer commented 2 months ago

It is working as a spec since you can see it from syntax tree. If you mean you can’t see highlights from neorg, then that’s neorg’s problem. Its been a while since I really used neorg, but I remember it is not supported due to performance issue, at least it is disabled by default.

aabbccddeeffggj commented 2 months ago

I see, thanks for the information.