Fork me on GitHub
#emacs
<
2019-01-11
>
bozhidar11:01:55

@enn Depends on your use-case. If you just want a listing of files probably that’d be better. 🙂 Nested projects are always tricky to get right, as different people have different ideas how they should behave.

enn14:01:57

Yes, indeed. I think you could make strong arguments for either behavior (including everything in the repo, or including only the innermost project)

bozhidar14:01:12

Yeah, probably I should make it configurable, so people can select one of those options.

bozhidar14:01:18

That would be pretty easy.

bozhidar14:01:35

I never use multi-project repos, so I never experienced the problem myself. 🙂

enn14:01:44

I just started a new job which organizes things that way

vemv14:01:26

> Is there a way to tell projectile to consider an entire git repo one project, no matter how many profile.cljs are present? how desirable is this though? giantic projects don't seem efficient to handle (to either a human or a computer) when facing these monorepos, I just consider its N projects separately. So I open the N projects and switch between them as I work. Very rarely I have to do a global grep or such cc @enn (just giving out an idea)

mccraigmccraig14:01:05

@vemv i've got a .projectile at the top-level of our monorepo, that seems to be working ok for aging across the whole project - that .projectile contains the exclusions for aging across the whole monorepo, so that you don't get 000s of results from js build products etc

mccraigmccraig14:01:13

@vemv it's pretty common for me to want to work on the model, api and client for a feature and search which can span all modules is quite useful

👍 5
vemv14:01:15

fair enough! One also can open "N + 1"... each subproject, plus the monorepo itself things like the directory tree become neater with these subproject views

mccraigmccraig14:01:02

oh, right - i never use a directory tree - i tend to just helm across all the files in the repo

Drew Verlee18:01:21

Is there a way to configure how single semicolons indent in clojure-mode?

Drew Verlee19:01:57

Or even a more basic question, what specifically is handling indentation given i'm in a cljs file, with clojure-mode on, using spacemacs? It's hard for me to figure out what program is controlling what sometimes. Which is usually a blessing as everything just works.

ag19:01:13

Just to make sure: you know that single semicolons are supposed to be used only for end-of-line comments, right?

Drew Verlee19:01:39

I understand that.

Drew Verlee19:01:06

Well, i understand thats a common style.

Drew Verlee19:01:05

I think i'll be happier finding a way to customize ;, than the alternatives.

ag19:01:39

I’ve seen people using single semicolons instead of doubles and that does sometimes mess up indentation

ag19:01:26

but if you use them only for end-of-line comments, they do work as intended

Drew Verlee19:01:01

Thanks. i understand the convention its employing and knowing that, still want to change it. If that's not possible, thats good to know, if it is, i'm trying to figure out how.

Drew Verlee19:01:59

I understand its not a bug and it working as the creator intended. I'm just asking if its configurable basically.

ag19:01:03

hmmm… then in that case I’m not sure what you’re trying to change

Drew Verlee19:01:21

i want single semicolons to behave as double do now.

Drew Verlee19:01:12

------------------------ ; <- dont push to middle
;;

Drew Verlee19:01:42

with - as whitespace

ag19:01:29

I have to tell you: - probably not a good idea. I’m not entirely sure how to convince you but single semicolons at the line ending with multiple lines kinda align nicely

ag19:01:47

I think that’s why they work as they are

ag19:01:57

generally in lisp modes

ag19:01:32

But if you insist, you can customize comment-indent-function

Drew Verlee20:01:34

I understand its asking a lot. But would you be able to provide some direction as to how i'm supposed to use that function? Based on [this stack overflow question](https://stackoverflow.com/questions/26312317/wrong-indentation-of-comments-in-emacs) i tried this:

(defun dotspacemacs/user-config ()
  (defun foo () (setq comment-indent-function (lambda () 10)))
  (add-hook 'clojure-mode-hook 'foo))
and it doesn't change the indenting. Any quick guidance you can give would be great.

ag21:01:00

I'm out for lunch. I'll try to dig through the docs when I'm back

ag21:01:07

If I remember it right comment-indent-function by default points to default-indent-function. You need to fork it

ag21:01:11

I’m back… sorry I was wrong, the function you need to fork is this:

(defun comment-indent-default ()
  "Default for `comment-indent-function'."
  (if (and (looking-at "\\s<\\s<\\(\\s<\\)?")
	   (or (match-end 1) (/= (current-column) (current-indentation))))
      0
    (when (or (/= (current-column) (current-indentation))
	      (and (> comment-add 0) (looking-at "\\s<\\(\\S<\\|\\'\\)")))
      comment-column)))

👍 5
Drew Verlee23:01:02

Thanks, ill give this a try.