   :config
   (progn
     (org-projectile-per-project)
+    (setq org-log-done 'note)
     (setq org-projectile-per-project-filepath ".notes/todo.org")
     (setq org-agenda-files (append org-agenda-files (org-projectile-todo-files)))
     (push (org-projectile-project-todo-entry) org-capture-templates))

;; (use-package dap-mode :pin melpa)

;; abandon lsp-mode, let's try eglot
(use-package eglot :pin melpa
  :config (add-to-list 'eglot-server-programs '((caml-mode tuareg-mode) . ("ocamllsp"))))

;; follow https://github.com/ubolonton/emacs-tree-sitter
(use-package tree-sitter :pin ublt :ensure t
  :config
  (add-hook 'rust-mode-hook #'tree-sitter-mode)
  (add-hook 'clojure-mode-hook #'tree-sitter-mode)
  (add-hook 'java-mode-hook #'tree-sitter-mode)
  (add-hook 'ocaml-mode-hook #'tree-sitter-mode)
  (add-hook 'tuareg-mode-hook #'tree-sitter-mode))

(use-package gif-screencast :pin melpa :ensure t)
(use-package pass :pin melpa)

;; java
(use-package jdecomp
  :pin melpa
  :config (setq jdecomp-decompiler-type 'fernflower
                jdecomp-decompiler-paths '((cfr . "/opt/jde/cfr.jar")
                                           (fernflower . "/opt/jde/fernflower.jar")
                                           (procyon . "/opt/jde/procyon.jar"))))

(use-package adoc-mode :pin melpa :mode "\\.adoc\\$")

(use-package markdown-mode
  :ensure t
  :commands (markdown-mode gfm-mode)
  :mode (("README\\.md\\'" . gfm-mode)
         ("\\.md\\'" . markdown-mode)
         ("\\.markdown\\'" . markdown-mode))
  :init (setq markdown-command "multimarkdown"))

(use-package calibredb
  :quelpa
  (calibredb :repo "chenyanming/calibredb.el" :fetcher github)
  :config
  (setq sql-sqlite-program "/usr/bin/sqlite3"
        calibredb-root-dir (expand-file-name "~/Documents/books/library/")
        calibredb-db-dir (concat calibredb-root-dir "/metadata.db")
        calibredb-program "/usr/bin/calibredb"))

(use-package flycheck :pin melpa :config (global-flycheck-mode))

(flycheck-define-checker scala
  "A Scala syntax checker using the Scala compiler.
See URL `http://www.scala-lang.org/'."
  :command ("scalac" "-target:1.12" "-encoding" "UTF-8" "-deprecation" "-opt-warnings" source)
  :error-patterns
    ((error line-start (file-name) ":" line ": error: " (message) line-end))
  :modes scala-mode
  :next-checkers ((warning . scala-scalastyle)))

(use-package ansible :pin melpa :ensure t)
(use-package terraform-mode :pin melpa :ensure t)

(use-package groovy-mode :pin melpa :ensure t)
(use-package erlang :pin melpa :ensure t)
(use-package epg :config (setq epg-gpgconf-program "gpg"))
