I want to limit the length of the *inferior-ensime-server-...* buffer to a few thousand lines.
This looks promising, from https://stackoverflow.com/a/11255400/1007926, but does not work in this case:
(add-hook 'compilation-filter-hook 'comint-truncate-buffer)
(setq comint-buffer-maximum-size 2000)
Is there an ENSIME server buffer hook that I can use in place of 'compilation-filter-hook?
Maybe these hooks can be used to truncate the buffer occasionally: https://github.com/ensime/ensime-emacs/blob/master/ensime-mode.el
you can always supply your own
logback.xmlfile by customisingensime-server-logbackand then doing your own filtering.https://github.com/ensime/ensime-emacs/blob/aafff027f40ea58e22538272edd0a5b676821978/ensime-vars.el#L85