-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Initialize helm-source-ls-git #47
Comments
kanbouchou <[email protected]> writes:
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.
Yes and no.
If the source is configured as you are asking, it is easy to reuse it in
other places, however you loose the hability to configure it as you want, see:
https://github.com/emacs-helm/helm/wiki/FAQ#why-is-a-customizable-helm-source-nil
OTH with the sources not builded at compile time, you have the hability
to build it as you did and also to configure it with `helm-setup-user-source` if
needed.
…--
Thierry
Gpg Key fingerprint = 6CEC 7081 AB33 E251 4AB8 5FC2 28D1 7F53 59F2 9997
|
okay, it is designed to be that way. I can configure it in my init.el, no problem. However, I know a few people like me who is using helm-ls-git and were wondering why it doesn't show up in helm-for-files until helm-ls-git-ls is invoked once. And maybe most of the users just want it configured by default. So providing a function like what I am doing on the package side, or at least some note in readme about how to configure it initially would be nice. |
* helm-ls-git.el (helm-source-ls-git-status): Docstring. (helm-source-ls-git): Docstring. (helm-source-ls-git-buffers): Docstring. (helm-ls-git-build-git-status-source): New. (helm-ls-git-build-ls-git-source): New. (helm-ls-git-build-buffers-source): New. (helm-ls-git-ls): Use them to build sources. * README.md: Update.
kanbouchou <[email protected]> writes:
So providing a function like what I am doing on the package side, or
at least some note in readme about how to configure it initially would
be nice.
Ok, I have added functions and updated README.
Thanks.
…--
Thierry
Gpg Key fingerprint = 6CEC 7081 AB33 E251 4AB8 5FC2 28D1 7F53 59F2 9997
|
I tried your change (47981a8), and I get this error and don't see files under git when I invoke helm-ls-git-ls
Does it work for you? |
kanbouchou <[email protected]> writes:
I tried your change (47981a8), and I get this error and don't see
files under git when I invoke helm-ls-git-ls
Debugger entered--Lisp error: (invalid-slot-name
"#<helm-ls-git-status-source Git status>" :group)
I guess you have a old helm-source.el that doesn't have the :group slot.
Try C-h f helm-source RET, you should find this entry:
Slot: group default = helm
The current source group, default to `helm' when not specified.
Does it work for you?
Yes.
…--
Thierry
Gpg Key fingerprint = 6CEC 7081 AB33 E251 4AB8 5FC2 28D1 7F53 59F2 9997
|
okay, using latest helm-source fixed the problem for me. |
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.
I suppose this should happen on helm-ls-git side.
The text was updated successfully, but these errors were encountered: