Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add variable to ignore specific projects #1916

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dradetsky
Copy link

@dradetsky dradetsky commented Oct 31, 2024

I want to add a git repo to my home directory in order to track dotfiles (I'm aware there are other approaches that don't involve creating ~/.git/, but for reasons beyond the scope of this PR, I want to do it this way). When I do this, in doom-emacs doom doctor complains

    ! Your $HOME is recognized as a project root
      Emacs will assume $HOME is the root of any project living under $HOME. If this
      isn't desired, you will need to remove ".git" from
      `projectile-project-root-files-bottom-up' (a variable), e.g.
      
        (after! projectile (setq projectile-project-root-files-bottom-up (remove ".git"
          projectile-project-root-files-bottom-up)))

Maybe I'm misunderstanding something, but it seems like the resolution here isn't something I want to do. I still want projectile to recognize dirs with .git as project roots, I just want it to not consider $HOME to be the universal project root, as threatened by doom doctor. Therefore, I need it to say that one or more named directories are not project roots, regardless of what the root-determination machinery would say otherwise.

So I add a variable to hold a list of such directories, and consult it inside projectile-locate-dominating-file.

NOTE: the PR is intentionally missing some required cleanup (like comments) in case there is something fundamentally wrong with my whole approach (I suck at elisp). That's why it's marked as a draft. AFAIK, the code itself does what it should, but I could be wrong.


Before submitting a PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • The new code is not generating bytecode or M-x checkdoc warnings
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the readme (if adding/changing user-visible functionality)

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant