Fork me on GitHub

somehow I rediscovered hs-minor-mode recently and am enjoying code-folding in emacs greatly. It works amazingly well in Clojure, Python, R and probably other languages I have yet to try 🙂

yes 15
Mikko Koski12:02:44

Thanks for sharing! I didn't know about this but it looks handy! Definitely gonna give it a try

👍 3

I have a little setup that always folds the ns form by default For the rest of the form personally I never use folding. IMO the need can reveal other issues (e.g. ns size)


I have a few colleagues that have 10,000 line python files per project. I find it useful for those and also for perusing lengthier codebases


sure, I don't question code-folding :) I simply reflected my views for greenfield clojure development

👍 3

curious, does emacs handle a 10kLOC file gracefully? I'd imagine the AST parsing could slow down things


no problems so far


perhaps it has more to do with the RAM on the box


Woaw! Thanks for sharing, I love hs-minor-mode :)

metal 4

i use this to collapse comment blocks sometimes:

(add-hook 'clojure-mode-hook
              (lambda ()
                (setq hs-hide-comments-when-hiding-all nil)
                (setq hs-block-start-regexp "\\s(comment")))

👍 3

thought I'd share


Hi, I have modified my test source directory to test/src instead of test . My objective was to be able to add some test/resources.... and so on. The issue I have is with projectile which projectile-between-implementation-and-testis still trying to create test file directly to testand not test/src. Is there a way to fix that? I don't find reference to that, it that a so bad practise to set directories like that?


Hmm I don't see an option to customize that (might have overlooked it), maybe you can try overriding the following function in your config:

(defun projectile-test-directory (project-type)
  "Find default test directory based on PROJECT-TYPE."
  (projectile-project-type-attribute project-type 'test-dir "test/"))


changing "test/" for "test/src"


So if I understand the answer you gave and the lack of other answers, this use case is not a classical one. I guess people leave their test in the test directory ?