Skip to content

Initialize helm-source-ls-git #47

@kanbouchou

Description

@kanbouchou

Hi

I'd like to first thank you for the great package, this is one of my favorite helm packages.

The way I'm using helm-ls-git is adding helm-source-ls-git to helm-for-files-preferred-list, and invoking helm-for-files.
The problem is that helm-source-ls-git is initially nil, and helm-for-files doesn't show git files.
Invoking helm-ls-git-ls once, helm-source-ls-git is initialized and helm-for-files shows git files as expected.
I am getting around this by doing this in my init.el.

(setq helm-source-ls-git-status
      (and (memq 'helm-source-ls-git-status helm-ls-git-default-sources)
           (helm-make-source "Git status" 'helm-ls-git-status-source
             :fuzzy-match helm-ls-git-fuzzy-match))
      helm-source-ls-git
      (and (memq 'helm-source-ls-git helm-ls-git-default-sources)
           (helm-make-source "Git files" 'helm-ls-git-source
             :fuzzy-match helm-ls-git-fuzzy-match))
      helm-source-ls-git-buffers
      (and (memq 'helm-source-ls-git-buffers helm-ls-git-default-sources)
           (helm-make-source "Buffers in git project" 'helm-source-buffers
             :header-name #'helm-ls-git-header-name
             :buffer-list (lambda () (helm-browse-project-get-buffers
                                      (helm-ls-git-root-dir)))
             :keymap helm-ls-git-buffer-map)))

I suppose this should happen on helm-ls-git side.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions