I have created my own lexer which includes several sublexers using SynWrite (I want to use it for literate programming in noweb where the main text is LaTeX interweaved with code chunks in Python, Lua etc.). This worked fine and the result looks beautiful.
However, I have problems to use the CudaFormatter plugin with the sublexers. Say I want to format only a Python code chunk, I select this and try to run Formatter. I tried all three options: Formatter (menu), Formatter per-lexer and Formatter cross-lexer. For the last two options I have assigned "A" and "1" to Python Black formatter respectively, which I also installed as plugin. Only the last option "cross-lexer" does anything but tries to format the whole file, ignoring my current selection. But since the file header is latex text/code, it gives me this error:
Code: Select all
cuda_fmt_python_black.black.InvalidInput: Cannot parse: 1:0: %latex-header-start
ERROR: Exception in CudaText for format_1: InvalidInput: Cannot parse: 1:0: %latex-header-start
Kind regards,
Martin