 (global-set-key (kbd "C-c k") 'counsel-ag)
 (global-set-key (kbd "C-x l") 'counsel-locate)
 (define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history)
-(global-set-key (kbd "M-x") nil)
+(define-key ivy-minibuffer-map (kbd "C-n") 'ivy-next-line)
+(define-key ivy-minibuffer-map (kbd "C-p") 'ivy-previous-line)
 
 
 ;;; VTerm

  :init
  (setq exec-path-from-shell-check-startup-files nil)
  (exec-path-from-shell-initialize))

;; autocomplete
(use-package company
  :ensure t
  :init
  (setq company-idle-delay 0)
  (setq company-minimum-prefix-length 1)
  (setq company-selection-wrap-around t)
  :config
  (global-company-mode 1))
(with-eval-after-load 'company
  (define-key company-active-map (kbd "M-n") nil)
  (define-key company-active-map (kbd "M-p") nil)
  (define-key company-active-map (kbd "C-n") #'company-select-next)
  (define-key company-active-map (kbd "C-p") #'company-select-previous)
  (define-key company-active-map (kbd "<tab>") nil)
  (define-key company-active-map (kbd "<return>") #'company-complete-selection))


;;; Programming Languages
(use-package go-mode

(global-set-key (kbd "C-n J") 'evil-window-move-very-bottom)
(global-set-key (kbd "C-n k") 'evil-window-up)
(global-set-key (kbd "C-n K") 'evil-window-move-very-top)
(global-set-key (kbd "C-n %") 'split-right)
(global-set-key (kbd "C-n \"") 'split-down)
(global-set-key (kbd "C-n x") 'evil-window-delete)
(global-set-key (kbd "C-n b") 'persp-ivy-switch-buffer)
(global-set-key (kbd "C-n :") 'counsel-M-x)
