                             (flycheck-mode)))
 
 (require 'dumb-jump)
-(setq dumb-jump-selector 'popup
+(setq dumb-jump-selector 'ivy
       dumb-jump-prefer-searcher 'rg)    ;; because https://github.com/jacktasia/dumb-jump/issues/129
 
 (add-to-list 'dumb-jump-language-file-exts '(:language "c++" :ext "mm" :agtype "cpp" :rgtype "cpp"))

  (company-mode)
  (bind-keys :map prog-mode-map
             ("<C-tab>" . company-complete)
             ("C-." . helm-imenu)))

(add-hook 'text-mode-hook 'auto-fill-mode)
(add-hook 'text-mode-hook 'my-non-special-modes-setup)


(setq python-shell-completion-native-enable nil)

(require 'ivy)
(ivy-mode 1)

(setq ivy-use-virtual-buffers t   ;; add recentf-mode and bookmarks
      ivy-re-builders-alist '((t . ivy--regex-ignore-order))   ;; allow input not in order
      ivy-height 15
      ivy-count-format "(%d/%d) "
      swiper-action-recenter t)

(add-to-list 'savehist-additional-variables 'ivy-dired-history-variable)

(require 'counsel)
(bind-keys ("M-x" . counsel-M-x)
           ("C-x C-f" . counsel-find-file)
           ("C-h a" . counsel-apropos)
           ("C-h v" . counsel-describe-variable)
           ("C-h f" . counsel-describe-function)
           ("M-y" . counsel-yank-pop)
           ("C-c <SPC>" . counsel-mark-ring))

(bind-key "C-l" 'counsel-up-directory counsel-find-file-map)
(bind-key "M-i" '(lambda ()
                   (interactive)
                   (swiper (thing-at-point 'symbol t))))

;; TODO: zde vlastni nahradu za ivy-occur
(bind-key "C-x C-s" 'ivy-occur ivy-minibuffer-map)

(require 'projectile)
(setq projectile-enable-caching t)
(projectile-global-mode)
(setq projectile-completion-system 'ivy)
(bind-key "C-x C-p" 'counsel-projectile)

(setq projectile-tags-command "ctags-exuberant -Re -f \"%s\" %s \"%s\"")

