oh I only now noticed that your file is very large. I think this could be an issue with the syntax checker, which may be very slow on large files (again, especially if a Bela program is running). Yet, I am not sure why it should slow down the typing, as that is handled entirely on the client side. Can you try to disable the syntax checker and see if this improves?
If it's indeed syntax checker -related issue, feel free to add here if appropriate.