SUMMARY If I open a .R file with Kate, it will show the operator ":=" with an extra underline in the right sign, making it show **three** bars instead of two. This is very annoying since it makes it harder to read the code and makes people think they've inputted the wrong symbol. These two symbols together (:=) are very common in R code, and what's more, kate's coloring backed is offered as one of the styles for "rmarkdown" (what most people use to write tutorials, manuals, vignettes, etc. with R code), but this issue makes it a very unsuitable candidate (and it's understandably not the default BTW, even though it otherwise looks better than the default style from rmarkdown). I have on multiple ocassions decided to use a Python syntax highlighter for R code instead due to this issue alone. STEPS TO REPRODUCE 1. Save this text as a .R file and open it with Kate: library(data.table) dt <- data.table(col1 = 1:3) dt[, col1 := col1+1] OBSERVED RESULT The ":=" operator has three lines. EXPECTED RESULT The ":=" operator should have two lines. SOFTWARE/OS VERSIONS Operating System: Debian GNU/Linux KDE Plasma Version: 5.23.5 KDE Frameworks Version: 5.88.0 Qt Version: 5.15.2 Kernel Version: 5.15.0-2-amd64 (64-bit) Graphics Platform: X11 Processors: 16 × AMD Ryzen 7 2700 Eight-Core Processor Memory: 15.6 GiB of RAM Graphics Processor: AMD VEGA10
Hi if you have some time maybe you can help us fix the bug. See the link below to learn more https://kate-editor.org/2005/03/24/writing-a-syntax-highlighting-file/
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/327
Git commit c94761c382ccf11483a1d116ec70c990e2f12e0b by Jonathan Poelen. Committed on 31/07/2022 at 22:59. Pushed by cullmann into branch 'master'. R: add := operator M +2 -1 data/syntax/r.xml https://invent.kde.org/frameworks/syntax-highlighting/commit/c94761c382ccf11483a1d116ec70c990e2f12e0b