Skip to content

Strange font lock of swiper #651

Description

@Yevgnen

Hi!

I read the excellent post Better fuzzy matching support in Ivy and try it(integrating flx) in my Emacs, but find something strange of swiper.

Inputing exactly the same thing (the candidate as manually input content and the query) as the last image in the link, swiper and ivy-minibuffer-* gives

screen shot 2016-09-05 at 20 21 02

But counsel-M-x gives
screen shot 2016-09-05 at 20 25 01
which is the same as the image given in the post.

Shouldn't they have similar font lock ? I mean, the matched neighbouring char should have the same color in the swiper case.

A minimum test snippet is

(require 'package)

(setq package-archives '(("marmalade" . "http://marmalade-repo.org/packages/")
                         ("gnu" . "http://elpa.gnu.org/packages/")
                         ("melpa" . "https://melpa.org/packages/")
                         ("org" . "http://orgmode.org/elpa/")))

(package-initialize)

(unless (and (file-exists-p (expand-file-name "elpa/archives/marmalade" user-emacs-directory))
             (file-exists-p (expand-file-name "elpa/archives/gnu" user-emacs-directory))
             (file-exists-p (expand-file-name "elpa/archives/melpa" user-emacs-directory))
             (file-exists-p (expand-file-name "elpa/archives/org" user-emacs-directory)))
  (package-refresh-contents))

(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))

(setq use-package-verbose t
      use-package-enable-imenu-support t)
(require 'use-package)

(use-package swiper
  :ensure t
  :bind (("C-s" . swiper))
  :init (setq ivy-height 15
              ivy-count-format "(%d/%d) "
              ivy-use-virtual-buffers t
              ivy-initial-inputs-alist nil
              ivy-re-builders-alist '((t . ivy--regex-fuzzy))
              swiper-include-line-number-in-search t)

  (use-package flx
    :ensure t
    :after swiper))

;; Test content from the post
;; visual-line-mode
;; global-visual-line-mode
;; doc-view-set-slice-using-mouse
;; vc-git-log-view-mode
;; vc-git-log-edit-mode
;; hydra-vi-toggle/whitespace-mode-and-exit
;; variable-pitch-mode
;; hydra-vi-toggle/auto-fill-mode-and-exit
;; doc-view-set-slice-from-bounding-box

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions