fix: flipped logic in tramp + projectile advice
Some logic derps from0b5243c
. Also restores projectile-git-submodule-command in remote buffers (to fix a wrong-type-argument error waiting to happen). Ref0b5243c12c
Ref #5360
This commit is contained in:
parent
0b5243c12c
commit
2c4328ccf0
1 changed files with 6 additions and 4 deletions
|
@ -42,9 +42,8 @@ debian, and derivatives). On most it's 'fd'.")
|
||||||
;; TRAMP, so we gimp it in remote buffers.
|
;; TRAMP, so we gimp it in remote buffers.
|
||||||
projectile-mode-line-function
|
projectile-mode-line-function
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(if (file-remote-p default-directory)
|
(if (file-remote-p default-directory) ""
|
||||||
(projectile-default-mode-line)
|
(projectile-default-mode-line))))
|
||||||
"")))
|
|
||||||
|
|
||||||
(global-set-key [remap evil-jump-to-tag] #'projectile-find-tag)
|
(global-set-key [remap evil-jump-to-tag] #'projectile-find-tag)
|
||||||
(global-set-key [remap find-tag] #'projectile-find-tag)
|
(global-set-key [remap find-tag] #'projectile-find-tag)
|
||||||
|
@ -162,13 +161,16 @@ And if it's a function, evaluate it."
|
||||||
(if (and (functionp projectile-generic-command)
|
(if (and (functionp projectile-generic-command)
|
||||||
(not (file-remote-p default-directory)))
|
(not (file-remote-p default-directory)))
|
||||||
(funcall projectile-generic-command vcs)
|
(funcall projectile-generic-command vcs)
|
||||||
(funcall fn vcs)))
|
(let ((projectile-git-submodule-command
|
||||||
|
(get 'projectile-git-submodule-command 'initial-value)))
|
||||||
|
(funcall fn vcs))))
|
||||||
|
|
||||||
;; `projectile-generic-command' doesn't typically support a function, but my
|
;; `projectile-generic-command' doesn't typically support a function, but my
|
||||||
;; `doom--only-use-generic-command-a' advice allows this. I do it this way so
|
;; `doom--only-use-generic-command-a' advice allows this. I do it this way so
|
||||||
;; that projectile can adapt to remote systems (over TRAMP), rather then look
|
;; that projectile can adapt to remote systems (over TRAMP), rather then look
|
||||||
;; for fd/ripgrep on the remote system simply because it exists on the host.
|
;; for fd/ripgrep on the remote system simply because it exists on the host.
|
||||||
;; It's faster too.
|
;; It's faster too.
|
||||||
|
(put 'projectile-git-submodule-command 'initial-value projectile-git-submodule-command)
|
||||||
(setq projectile-git-submodule-command nil
|
(setq projectile-git-submodule-command nil
|
||||||
projectile-indexing-method 'hybrid
|
projectile-indexing-method 'hybrid
|
||||||
projectile-generic-command
|
projectile-generic-command
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue