   (interactive)
   (setq truncate-lines nil)
 )
-
-(defun sh ()
-   (interactive)
-   (shell)
-   (rename-buffer "shell"))
 
 ;; thanks to jonas for this function - allows you to add a number to
 ;; all matching strings in the rest of the document

  "Insert the current date in format \"yyyy-mm-dd\" at point for file creation."
  (interactive)
  (insert (format-time-string "%Y-%m-%d" (current-time))))


(defun comment ()
  "Insert a C comment with my initials and today's date at point."
  (interactive)
  (insert "// David Daly-")
  (insert-datestamp)
  (insert ": ")
)

(defun insert-current-time ()
  "Insert the current time in format \"HH:MM:SS\" at point."



;;;; ELPY Python support -- not LSP based
;; (use-package elpy
;;   :ensure t
;;   :init
;;   (elpy-enable)
;;   :config
;;   ; disable flymake and use flycheck if if exists
;;   (when (require 'flycheck nil t)
;;     (setq elpy-modules (delq 'elpy-module-flymake elpy-modules))
;;     (add-hook 'elpy-mode-hook 'flycheck-mode))
;;   (setq python-shell-interpreter "jupyter"
;;       python-shell-interpreter-args "console --simple-prompt"
;;       python-shell-prompt-detect-failure-warning nil)
;;   (add-to-list 'python-shell-completion-native-disabled-interpreters
;;              "jupyter")
;;   )


;;;;; END IDE related

;;;;; Formatting and flycheck packages
;;; Yapify and yapf
(use-package yapfify
  :commands yapf-mode
  :hook (python-mode . yapf-mode))

;;; sphinx doc mode for python documentation
(use-package sphinx-doc
  :commands sphinx-doc-mode
  :hook (python-mode . sphinx-doc-mode))

(use-package flycheck
  :init (global-flycheck-mode)
  :config (setq-default flycheck-disabled-checkers
                        (append flycheck-disabled-checkers
                                '(javascript-jshint)
                                '(python-flake8)))
  (flycheck-add-mode 'javascript-eslint 'web-mode)
)

(use-package flycheck-yamllint
  :after flycheck
  :commands flycheck-yamllint-setup
  :hook (flycheck-mode . flycheck-yamllint-setup))

;; disable jshint since we prefer eslint checking
;; use eslint with web-mode for jsx files
(add-hook 'c++-mode-hook
          (lambda () (setq flycheck-gcc-include-path
                           (list (expand-file-name "/usr/local/include/bsoncxx/v_noabi")))))
;; (eval-after-load 'flycheck
;;   '(progn
;;      (require 'flycheck-google-cpplint)
;;      ;; Add Google C++ Style checker.
;;      ;; In default, syntax checked by Clang and Cppcheck.
;;     (flycheck-add-next-checker 'c/c++-cppcheck
;;                                 '(warning . c/c++-googlelint))))
(use-package flycheck-color-mode-line
  :after flycheck
  :hook (flycheck-mode . flycheck-color-mode-line-mode)
  :commands flycheck-color-mode-line-mode
  )

;;;; END Formatting and flycheck packages

;;; magit: Git porcelain
(use-package magit
