I want to overwrite the commands listed in the title with
\renewcommand{\(}{\left(}
...
\renewcommand{\]}{\right]}
I already tried it in Overleaf and when I click 'compile' it compiles without errors.
However in the editor I get lines highlited in red with error messages, for example using \( I got this:

Is there a way to hide these errors without defining a command with a different name?
Edit:
When I wrote this question I specified
without defining a command with a different name
I didn't want to have the 'open round/square/... bracket' and 'close ... bracket' commands, because I found it to be a very ugly solution, and also difficult to read, even if shortened with aa a character. Only after posting here I realized I could write a single 'brackets' command with the formula that should be enclosed by the brackets as a parameter, so that in LaTeX I still see the brackets where they should be, but they are curly instead of round or square.
So basically what I did was adding these commands:
\newcommand{\p}[1]{\left( #1 \right)}
\newcommand{\pp}[1]{\left[ #1 \right]}
\newcommand{\ppp}[1]{\left\{ #1 \right\}}
I found this solution to be the most readable and efficient one.
Edit 2:
The best solution was given by Gaussler in the comments:
\usepackage{mathtools}
\DeclarePairedDelimiter{\p}{(}{)}
\DeclarePairedDelimiter{\pp}{[}{]}
\DeclarePairedDelimiter{\ppp}{{}{}}
which gives the option to manually specify the desired dimension for the brackets (e.g. \p[\bigg]{...}), or make it automatic with an asterisk (\pp*{...}). And makes it also nicer with better spacing.
\(and\)open and close inline math, while\[and\]open and close displayed formulas. You do not want to break that. – mickep Oct 19 '22 at 17:31gatherenvironment – Werner Oct 19 '22 at 18:07\(\)\[\]is something you shouldn't even think to. :-) – egreg Oct 21 '22 at 06:55\DeclarePairedDelimiterfrom themathtoolspackage. It provides a much better interface for defining your commands\p,\pp, and\ppp. Also, your solution is bad: Never use\left...\rightby default, it often causes the brackets to become too big. Also, if you absolutely must have auto-scaled brackets,\mleft...\mrightfrom the packagemleftrightis the way to go. – Gaussler Oct 21 '22 at 10:07\DeclarePairedDelimiterover\newcommand. Why\mleftis better than\left? What's the point in having a useful command if (by what you say) it often doesn't work? And by the way I dont use them by default, it's always faster to press buttons on my keyboard insted of inserting commands. – Dj Frixz Oct 23 '22 at 11:38mleftrightpackage is based on the first answer. The advantage of using\DeclarePairedDelimiteris that it takes care of this problem automatically. Also, you don’t want auto-scaling by default, it will often lead to ugly results with way too big brackets. Compare\[ \mleft( \sum_{n=0}^{\infty} \frac{1}{n^2} \mright) \]to\[ \bigg( \sum_{n=0}^{\infty} \frac{1}{n^2} \bigg) \]. There is universal agreement that the latter looks better. – Gaussler Oct 23 '22 at 11:55\DeclarePairedDelimiter, right? That way I can specify\big,\bigg, and so on. – Dj Frixz Oct 23 '22 at 12:58\biggl(...\biggr). Embarrassing… – Gaussler Oct 23 '22 at 14:25%%begin novalidateand%%end novalidate. See: https://www.overleaf.com/learn/how-to/Code_Check#Disabling_Code_Check_for_part_of_a_file – Alex miao Jun 24 '23 at 21:22