Open FelipeRearden opened 2 years ago
In many cases we need to present the argument of an EXCEL formula instead of the cell.
=FORMULA(argument_1,argument_2)
=VLOOKUP(lookup_value,table_array,col_index_num, [range_lookup])
We only get syntax highlight when inserting cells
=FORMULA(A1,A2)
=VLOOKUP(A1,A2,A3,A4)
Please clarify what you mean. Functions take arguments, so any arbitrary expression (variables, cells, functions calls, etc.) can be an argument. Why exactly do you want highlighted?
Hello @RunDevelopment !!!!
Thank you very much for your reply :)
Please clarify what you mean.
Sorry for my bad explanation. Let me be more clear about my FR.
Functions take arguments, so any arbitrary expression (variables, cells, functions calls, etc.) can be an argument.
AN EXCEL formula is designed is with elements
For example the EXCEL formula VLOOKUP
has these structure:
Formula_Name -> VLOOKUP
Arguments
The EXCEL formula syntax is this :
=formula_name(argument_1, argument_2, argument_3)
💡 each argument is separated by comma
For Example with the VLOOUP formula.
=VLOOKUP(lookup_value,table_array,col_index_num, [range_lookup])
Why exactly do you want highlighted?
MY FR is to highlight the arguments
When I use the codeblock above, this what we get:
This is my FR 🙏 :
Let me know if something is not clear know !
Thanks for reading this!
Have a great day
Hello @RunDevelopment
Sorry to bother you :)
Just to know if my FR is now clear (from my previous comment)
Thanks.
Sorry for the delay!
Yes, it's clear now. Unfortunately, this won't be too easy to implement. The problem is that to wrap an argument, we need to match arbitrary expressions, which isn't possible with regexes (context-free grammar vs regex). So we'll have to use a few tricks to make this happen.
Sorry for the delay!
No problem 😀 !!!! Sorry again for bothering you :)
Yes, it's clear now.
I'm glad to know that is clear :)
Unfortunately, this won't be too easy to implement. The problem is that to wrap an argument, we need to match arbitrary expressions, which isn't possible with regexes (context-free grammar vs regex). So we'll have to use a few tricks to make this happen.
I appreciate you feedback ! My hope is that would be something easy to implement :)
I am going to start to create my EXCEL documentation in Obsidian maybe in the future we get the highlights for the EXCEL arguments.
Thanks and have a great day!!!!!!
Hello friends !!!!
My FR is about a little feature to be added when using the syntax
xlsx
orxls
.In many cases we need to present the argument of an EXCEL formula instead of the cell.
=FORMULA(argument_1,argument_2)
We only get syntax highlight when inserting cells
=FORMULA(A1,A2)
Why I am asking this ?
The Note-taking App Obsidian uses PrismJS to highlight code syntax .
I am creating a documentation about my EXCEL formula knowledge and I want to describe the formula arguments as a code block.
Suggestion of Implementation
I was talking about this idea with ganesshkumar on this Issue here
ganesshkumar suggests these approach:
This the original comment with all the details.
I was not able to insert images in this issue (I don’t know why) but I tried the best to show my FR.
Thanks for reading this. Let me know if something is not clear.
Have a great day!