Fork me on GitHub
#cider
<
2020-09-10
>
abdullahibra11:09:54

when i open file before running cider-jack-in, it's usually working fine with clojure mode, but if i open another clojure file while cider-jack-in already is already running, then i'm not at clojure mode

abdullahibra11:09:01

have anybody experienced that issue?

practicalli-john13:09:03

@abdullahibra Sorry, never seen that in years of using Cider. Are you sure the file name has a Clojure extension, .clj, .cljs .cljc .edn What happens if you run the command clojure-mode

abdullahibra13:09:30

yeah all files with clojure ext

abdullahibra13:09:59

symbol's function definition is void: cider-turn-on-eldoc-mode

dpsutton14:09:29

how did you install CIDER?

abdullahibra14:09:25

install-package

abdullahibra14:09:52

that's my init.el

abdullahibra14:09:18

;;;;
;; Packages
;;;;

(or (boundp 'predicate) (defvar predicate))
(or (boundp 'inherit-input-method) (defvar inherit-input-method))
(or (boundp 'ido-cur-item) (defvar ido-cur-item))
(or (boundp 'ido-default-item) (defvar ido-default-item))
(or (boundp 'ido-cur-list) (defvar ido-cur-list))

(set-frame-font "monospace 11" nil t)

;(defvar predicate)
;(defvar inherit-input-method)
;(defvar ido-cur-item)
;(defvar ido-default-item)
;(defvar ido-cur-list)

;; Define package repositories
(require 'package)
(add-to-list 'package-archives
             '("marmalade" . "") t)
(add-to-list 'package-archives
             '("tromey" . "") t)
(add-to-list 'package-archives
             '("melpa" . "") t)
(add-to-list 'package-archives
             '("gnu" . "") t)
(add-to-list 'package-archives
             '("org" . "") t)


;; (setq package-archives '(("gnu" . "")
;;                          ("marmalade" . "")
;;                          ("melpa" . "")))


;; Load and activate emacs packages. Do this first so that the
;; packages are loaded before you start trying to modify them.
;; This also sets the load path.
(package-initialize)

;; Download the ELPA archive description if needed.
;; This informs Emacs about the latest versions of all packages, and
;; makes them available for download.
(when (not package-archive-contents)
  (package-refresh-contents))

;; The packages you want installed. You can also install these
;; manually with M-x package-install
;; Add in your own as you wish:
(defvar my-packages
  '(;; makes handling lisp expressions much, much easier
    ;; Cheatsheet: 
    paredit

    ;; key bindings and code colorization for Clojure
    ;; 
    clojure-mode

    ;; extra syntax highlighting for clojure
    clojure-mode-extra-font-locking

    ;; integration with a Clojure REPL
    ;; 
    cider
    ;; new packages
    auto-complete
    highlight-parentheses
    markdown-mode
    ac-nrepl
    ;; allow ido usage in as many contexts as possible. see
    ;; customizations/navigation.el line 23 for a description
    ;; of ido
    ido-ubiquitous

    ;; Enhances M-x to allow easier execution of commands. Provides
    ;; a filterable list of possible commands in the minibuffer
    ;; 
    smex

    ;; project navigation
    projectile

    ;; colorful parenthesis matching
    rainbow-delimiters

    ;; edit html tags like sexps
    tagedit

    ;; git integration
    magit))

;; On OS X, an Emacs instance started from the graphical user
;; interface will have a different environment than a shell in a
;; terminal window, because OS X does not run a shell during the
;; login. Obviously this will lead to unexpected results when
;; calling external utilities like make from Emacs.
;; This library works around this problem by copying important
;; environment variables from the user's shell.
;; 
(if (eq system-type 'darwin)
    (add-to-list 'my-packages 'exec-path-from-shell))

(dolist (p my-packages)
  (when (not (package-installed-p p))
    (package-install p)))

(unless (package-installed-p 'cider)
   (package-install 'cider))
;; Place downloaded elisp files in ~/.emacs.d/vendor. You'll then be able
;; to load them.
;;
;; For example, if you download yaml-mode.el to ~/.emacs.d/vendor,
;; then you can add the following code to this file:
;;
;; (require 'yaml-mode)
;; (add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
;;
;; Adding this code will make Emacs enter yaml mode whenever you open
;; a .yml file
(add-to-list 'load-path "~/.emacs.d/vendor")


;;;;
;; Customization
;;;;

;; Add a directory to our load path so that when you `load` things
;; below, Emacs knows where to look for the corresponding file.
(add-to-list 'load-path "~/.emacs.d/customizations")

;; Sets up exec-path-from-shell so that Emacs will use the correct
;; environment variables
(load "shell-integration.el")

;; These customizations make it easier for you to navigate files,
;; switch buffers, and choose options from the minibuffer.
(load "navigation.el")

;; These customizations change the way emacs looks and disable/enable
;; some user interface elements
(load "ui.el")

;; These customizations make editing a bit nicer.
(load "editing.el")

;; Hard-to-categorize customizations
(load "misc.el")

;; For editing lisps
(load "elisp-editing.el")

;; Langauage-specific
(load "setup-clojure.el")
(load "setup-js.el")
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(ansi-color-faces-vector
   [default bold shadow italic underline bold bold-italic bold])
 '(beacon-color "#f2777a")
 '(coffee-tab-width 2)
 '(custom-enabled-themes (quote (sanityinc-tomorrow-eighties)))
 '(custom-safe-themes
   (quote
    ("52588047a0fe3727e3cd8a90e76d7f078c9bd62c0b246324e557dfa5112e0d0c" "fa2b58bb98b62c3b8cf3b6f02f058ef7827a8e497125de0254f56e373abee088" "bffa9739ce0752a37d9b1eee78fc00ba159748f50dc328af4be661484848e476" "a7051d761a713aaf5b893c90eaba27463c791cd75d7257d3a8e66b0c8c346e77" "4cf3221feff536e2b3385209e9b9dc4c2e0818a69a1cdb4b522756bcdf4e00a4" "4aee8551b53a43a883cb0b7f3255d6859d766b6c5e14bcb01bed572fcbef4328" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "679ee3b86b4b34661a68ba45bbd373eab0284caee6249139b2a090c9ddd35ce0" "9e54a6ac0051987b4296e9276eecc5dfb67fdcd620191ee553f40a9b6d943e78" "7f1263c969f04a8e58f9441f4ba4d7fb1302243355cb9faecb55aec878a06ee9" "1157a4055504672be1df1232bed784ba575c60ab44d8e6c7b3800ae76b42f8bd" "cf08ae4c26cacce2eebff39d129ea0a21c9d7bf70ea9b945588c1c66392578d1" "5ee12d8250b0952deefc88814cf0672327d7ee70b16344372db9460e9a0e3ffc" default)))
 '(fci-rule-color "#2a2a2a")
 '(flycheck-color-mode-line-face-to-color (quote mode-line-buffer-id))
 '(frame-background-mode (quote dark))
 '(hl-todo-keyword-faces
   (quote
    (("TODO" . "#dc752f")
     ("NEXT" . "#dc752f")
     ("THEM" . "#2d9574")
     ("PROG" . "#4f97d7")
     ("OKAY" . "#4f97d7")
     ("DONT" . "#f2241f")
     ("FAIL" . "#f2241f")
     ("DONE" . "#86dc2f")
     ("NOTE" . "#b1951d")
     ("KLUDGE" . "#b1951d")
     ("HACK" . "#b1951d")
     ("TEMP" . "#b1951d")
     ("FIXME" . "#dc752f")
     ("XXX+" . "#dc752f")
     ("\\?\\?\\?+" . "#dc752f"))))
 '(nrepl-message-colors
   (quote
    ("#CC9393" "#DFAF8F" "#F0DFAF" "#7F9F7F" "#BFEBBF" "#a7a6d4" "#9796c4" "#b48ead")))
 '(package-selected-packages
   (quote
    (tern-auto-complete auto-complete-sage which-key fira-code-mode pretty-symbols org yaml-mode highlight-symbol company spacemacs-theme zenburn-theme color-theme-sanityinc-tomorrow color-theme-sanityinc-solarized sunburn-theme queue 0x0 command-queue cider go-mode idris-mode 0blayout web-mode buffer-move clojars clojure-cheatsheet clojure-mode clojure-project-mode cider-spy cider-profile cider-decompile tagedit smex rainbow-delimiters javap-mode ido-ubiquitous exec-path-from-shell cider-hydra cider-eval-sexp-fu)))
 '(pdf-view-midnight-colors (quote ("#b2b2b2" . "#292b2e")))
 '(vc-annotate-background "#433844")
 '(vc-annotate-color-map
   (quote
    ((20 . "#BC8383")
     (40 . "#CC9393")
     (60 . "#DFAF8F")
     (80 . "#D0BF8F")
     (100 . "#E0CF9F")
     (120 . "#F0DFAF")
     (140 . "#5F7F5F")
     (160 . "#7F9F7F")
     (180 . "#8FB28F")
     (200 . "#9FC59F")
     (220 . "#AFD8AF")
     (240 . "#BFEBBF")
     (260 . "#a7a6d4")
     (280 . "#676694")
     (300 . "#777694")
     (320 . "#8786b4")
     (340 . "#9796c4")
     (360 . "#b48ead"))))
 '(vc-annotate-very-old-color "#b48ead")
 '(window-divider-mode nil))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
(split-window-right)

;; Tell emacs where is your personal elisp lib dir
(add-to-list 'load-path "~/.emacs.d/lisp/")

;;(global-company-mode)

(require 'highlight-symbol)
;;(global-set-key [(control f3)] 'highlight-symbol)
;;(global-set-key [f3] 'highlight-symbol-next)
;;(global-set-key [(shift f3)] 'highlight-symbol-prev)
;;(global-set-key [(meta f3)] 'highlight-symbol-query-replace)


;; magit global key
;;(global-set-key (kbd "C-x G") 'magit-status)

 (setq python-shell-interpreter "/home/visof/.pyenv/shims/python")


(setq prettify-symbols-alist '(("lambda" . 955)))
(defun my-add-pretty-lambda ()
  "make some word or string show as pretty Unicode symbols"
  (setq prettify-symbols-alist
        '(
          ("lambda" . 955) ; λ
          ("fn" . 955)
          ("->" . 8594)    ; →
          ("=>" . 8658)    ; ⇒
          ;;("map" . 8614)   ; ↦
          ;;("clojure.set/intersection" . 8745) ; ∩
          ;;("clojure.set/union" . 8746) ; ∪
          ("elephant" . 128024)
          ("owl" . 129417)
          )))

;;(add-hook 'clojure-mode-hook 'my-add-pretty-lambda)
;;(add-hook 'haskell-mode-hook 'my-add-pretty-lambda)
;;(add-hook 'shen-mode-hook 'my-add-pretty-lambda)
;;(add-hook 'tex-mode-hook 'my-add-pretty-lambda)

;;(global-prettify-symbols-mode 1)
;;(global-fira-code-mode)


(global-set-key (kbd "C-z") 'undo)
;(global-set-key (kbd "C-s-/") 'undo-tree-redo)