Jump to conversation
Unresolved conversations (13)
@minad minad Feb 10, 2021
Here one may consider `'(substring orderless)` which ensures that TAB prefix completion works under more circumstances. Since substring matches a subset of orderless, this generally works well. Furthermore one could even set `'(basic substring orderless)`, but in this case basic matches strictly less, so this can lead to unexpected behavior but ensures that matches with the current prefix are preferred.
modules/completion/selectrum/config.el
minad
@gagbo gagbo Jan 29, 2021
Why is there a space in front of `--hidden` but not `--maxdepth 1` or `--null` ?
...ompletion/selectrum/autoload/selectrum.el
@Townk Townk Jan 20, 2021
Can't we lazy initialize `orderless` as well? If we can't, a comment explaining why would be helpful.
modules/completion/selectrum/config.el
minad Townk
@Townk Townk Jan 19, 2021
[Embark wiki](https://github.com/oantolin/embark/wiki/Additional-Actions) has excellent suggestions. I particularly like the "[Very large files and sudo edit](https://github.com/oantolin/embark/wiki/Additional-Actions#very-large-files-and-sudo-edit)".
modules/completion/selectrum/config.el
@Townk Townk Jan 19, 2021
I'm not sure you need to wait for selectrum to load here. I think just the hook is enough.
modules/completion/selectrum/config.el
@Townk Townk Jan 19, 2021
why are you adding these to `selectrum-minibuffer-map`? Embark is supposed to work without selectrum, so you can add these directly to the `minibuffer-local-map`, don't you?
modules/completion/selectrum/config.el
@Townk Townk Jan 19, 2021
You have to change the `+default/yank-pop` as well: ```emacs-lisp ;;;###autoload (defun +default/yank-pop (&rest _) "Interactively select what text to insert from the kill ring." (interactive "P") (call-interactively (cond ((fboundp 'counsel-yank-pop) #'counsel-yank-pop) ((fboundp 'consult-yank-pop) #'consult-yank-pop) ((fboundp 'helm-show-kill-ring) #'helm-show-kill-ring) ((error "No kill-ring search backend available. Enable ivy or helm!"))))) ```
modules/config/default/autoload/search.el
@Townk Townk Jan 19, 2021
You should only do this if use does not have `+orderless` enabled.
modules/completion/selectrum/config.el
Townk minad
@Townk Townk Jan 19, 2021
Shouldn't you manually set the `refine`, and `highlight` candidates functions if `+orderless` is enabled? Also, if that is the case, and the user has `+prescient` enabled as well, you should set the `preprocess`candidates function as well: ```emacs-lisp (setq selectrum-refine-candidates-function #'orderless-filter selectrum-highlight-candidates-function #'orderless-highlight-matches selectrum-preprocess-candidates-function #'selectrum-prescient--preprocess) ```
modules/completion/selectrum/config.el
minad Townk
@Townk Townk Jan 19, 2021
The `ivy` counterpart of this function, sets the variable `deactivate-mark` before running the grep command. Shouldn't you do the same?
...ompletion/selectrum/autoload/selectrum.el
@Townk Townk Jan 19, 2021
If I'm reading this correctly, you converted `args` into a string to concatenate more arguments to it inside the let binding, than here, you expand it to a list again in order to store it on `ripgrep-command` variable. Wouldn't be more efficient to only do list operations here? I was thinking on something like this: ```emacs-lisp (let* ((this-command 'consult-ripgrep) (project-root (or (doom-project-root) default-directory)) (directory (or in project-root)) (prompt (or prompt (format "%s [%s]: " (mapconcat #'identity command " ") (cond ((equal directory default-directory) "./") ((equal directory project-root) (projectile-project-name)) ((file-relative-name directory project-root)))))) (query (or query (when (doom-region-active-p) (replace-regexp-in-string "[! |]" (lambda (substr) (cond ((string= substr " ") " ") ((string= substr "|") "\\\\\\\\|") ((concat "\\\\" substr)))) (rxt-quote-pcre (doom-thing-at-point-or-region)))))) (ripgrep-command (seq-remove 'null (append (butlast consult-ripgrep-command) (list (when all-files "-uu") (unless recursive " --maxdepth 1") "--hidden" "-g!.git") args '("-e"))))) ... ) ```
...ompletion/selectrum/autoload/selectrum.el
@Townk Townk Jan 19, 2021
why not use `doom-project-root` here?
modules/completion/selectrum/config.el
@hlissner hlissner Jan 15, 2021
Pin these packages.
Outdated
modules/completion/selectrum/packages.el
Resolved conversations (4)
@hlissner hlissner Jan 15, 2021
Attach these modes to `selectrum-mode-hook`, rather than `doom-first-input-hook`.
Outdated
modules/completion/selectrum/config.el
@hlissner hlissner Jan 15, 2021
Lazy load this package.
modules/completion/selectrum/config.el
@hlissner hlissner Jan 15, 2021
Lazy load this package.
Outdated
modules/completion/selectrum/config.el
@hlissner hlissner Jan 15, 2021
Use `use-package!`'s `:when` instead of surrounding the `use-package` in a `when` form. e.g. ```diff -(when (featurep! +prescient) (use-package! selectrum-prescient + :when (featurep! +prescient) :after selectrum :hook ((doom-first-input . selectrum-prescient-mode) (doom-first-input . prescient-persist-mode)))) ```
modules/completion/selectrum/config.el