|
|
|
@ -13,12 +13,12 @@
|
|
|
|
|
(column-number-mode 't) ; show current column in status bar
|
|
|
|
|
(set-fringe-mode 10)
|
|
|
|
|
|
|
|
|
|
;; Indent 4 spaces by default. Use the "BSD" style for C-like languages.
|
|
|
|
|
(setq c-default-style
|
|
|
|
|
(quote ((java-mode . "java")
|
|
|
|
|
(awk-mode . "awk")
|
|
|
|
|
(other . "bsd")))
|
|
|
|
|
c-basic-offset 4)
|
|
|
|
|
;;;; Indent 4 spaces by default. Use the "BSD" style for C-like languages.
|
|
|
|
|
;;(setq c-default-style
|
|
|
|
|
;; (quote ((java-mode . "java")
|
|
|
|
|
;; (awk-mode . "awk")
|
|
|
|
|
;; (other . "bsd")))
|
|
|
|
|
;; c-basic-offset 4)
|
|
|
|
|
|
|
|
|
|
;; Use 4 spaces for one tab visually.
|
|
|
|
|
(setq tab-width 4)
|
|
|
|
@ -51,11 +51,11 @@
|
|
|
|
|
(setq visible-bell t)
|
|
|
|
|
|
|
|
|
|
; Advanced per-language checks.
|
|
|
|
|
(require 'flycheck)
|
|
|
|
|
(global-flycheck-mode 1)
|
|
|
|
|
(setq flycheck-checker-error-threshold 1000) ; for large go files and the escape checker
|
|
|
|
|
|
|
|
|
|
(setq flycheck-check-syntax-automatically '(mode-enabled save))
|
|
|
|
|
;;(require 'flycheck)
|
|
|
|
|
;;(global-flycheck-mode 1)
|
|
|
|
|
;;(setq flycheck-checker-error-threshold 1000) ; for large go files and the escape checker
|
|
|
|
|
;;
|
|
|
|
|
;;(setq flycheck-check-syntax-automatically '(mode-enabled save))
|
|
|
|
|
|
|
|
|
|
;; Backup
|
|
|
|
|
|
|
|
|
@ -91,12 +91,12 @@
|
|
|
|
|
;;(setq message-citation-line-function 'message-insert-formatted-citation-line)
|
|
|
|
|
;;(setq message-citation-line-format "On %d/%m/%Y %H:%M, %N wrote:")
|
|
|
|
|
|
|
|
|
|
(defun default-web-indent-mode ()
|
|
|
|
|
(setq indent-tabs-mode nil)
|
|
|
|
|
(setq tab-width 2)
|
|
|
|
|
(setq web-mode-markup-indent-offset 2)
|
|
|
|
|
(setq web-mode-css-indent-offset 2)
|
|
|
|
|
(setq web-mode-code-indent-offset 2))
|
|
|
|
|
;;(defun default-web-indent-mode ()
|
|
|
|
|
;; (setq indent-tabs-mode nil)
|
|
|
|
|
;; (setq tab-width 2)
|
|
|
|
|
;; (setq web-mode-markup-indent-offset 2)
|
|
|
|
|
;; (setq web-mode-css-indent-offset 2)
|
|
|
|
|
;; (setq web-mode-code-indent-offset 2))
|
|
|
|
|
|
|
|
|
|
(use-package doom-themes
|
|
|
|
|
:init (load-theme 'doom-nord t)
|
|
|
|
@ -112,21 +112,21 @@
|
|
|
|
|
:config (lsp-enable-which-key-integration t)
|
|
|
|
|
:hook (lsp-mode . electric-pair-mode))
|
|
|
|
|
|
|
|
|
|
(use-package web-mode
|
|
|
|
|
:mode ("\\.json\\'" . web-mode)
|
|
|
|
|
:mode ("\\.html?\\'" . web-mode)
|
|
|
|
|
:mode ("\\.s?css\\'" . web-mode)
|
|
|
|
|
:mode ("\\.[jt]sx?\\'" . web-mode)
|
|
|
|
|
:hook (web-mode . lsp-deferred)
|
|
|
|
|
:hook (web-mode . default-web-indent-mode))
|
|
|
|
|
;;(use-package web-mode
|
|
|
|
|
;; :mode ("\\.json\\'" . web-mode)
|
|
|
|
|
;; :mode ("\\.html?\\'" . web-mode)
|
|
|
|
|
;; :mode ("\\.s?css\\'" . web-mode)
|
|
|
|
|
;; :mode ("\\.[jt]sx?\\'" . web-mode)
|
|
|
|
|
;; :hook (web-mode . lsp-deferred)
|
|
|
|
|
;; :hook (web-mode . default-web-indent-mode))
|
|
|
|
|
|
|
|
|
|
(use-package nix-mode
|
|
|
|
|
:mode ("\\.nix\\'" . nix-mode)
|
|
|
|
|
:hook (nix-mode . lsp-deferred))
|
|
|
|
|
|
|
|
|
|
(use-package rust-mode
|
|
|
|
|
:hook (rust-mode . lsp-deferred)
|
|
|
|
|
:config (setq rust-format-on-save t))
|
|
|
|
|
;;(use-package rust-mode
|
|
|
|
|
;; :hook (rust-mode . lsp-deferred)
|
|
|
|
|
;; :config (setq rust-format-on-save t))
|
|
|
|
|
|
|
|
|
|
(use-package company
|
|
|
|
|
:config (setq company-idle-delay 0.25)
|
|
|
|
@ -139,48 +139,47 @@
|
|
|
|
|
:hook (yas-minor-mode . yas-reload-all)
|
|
|
|
|
:config (setq yas-snippet-dirs '("/etc/nixos/programs/emacs/snippets")))
|
|
|
|
|
|
|
|
|
|
(use-package prettier-js
|
|
|
|
|
:after (web-mode)
|
|
|
|
|
:hook (web-mode . prettier-js-mode))
|
|
|
|
|
;;(use-package prettier-js
|
|
|
|
|
;; :after (web-mode)
|
|
|
|
|
;; :hook (web-mode . prettier-js-mode))
|
|
|
|
|
;;
|
|
|
|
|
;;(use-package smartparens
|
|
|
|
|
;; :bind ("C-c s s" . sp-splice-sexp)
|
|
|
|
|
;; :bind ("C-c s r" . sp-rewrap-sexp))
|
|
|
|
|
;;
|
|
|
|
|
;;(use-package bbdb
|
|
|
|
|
;; :init (bbdb-initialize 'gnus 'message)
|
|
|
|
|
;; :init (bbdb-mua-auto-update-init 'gnus 'message)
|
|
|
|
|
;; :config (setq bbdb-file "~/Nextcloud/PRIVE/13_Org/contacts/bbdb")
|
|
|
|
|
;; :config (setq bbdb-mua-auto-update-p 'create))
|
|
|
|
|
|
|
|
|
|
(use-package smartparens
|
|
|
|
|
:bind ("C-c s s" . sp-splice-sexp)
|
|
|
|
|
:bind ("C-c s r" . sp-rewrap-sexp))
|
|
|
|
|
|
|
|
|
|
(use-package bbdb
|
|
|
|
|
:init (bbdb-initialize 'gnus 'message)
|
|
|
|
|
:init (bbdb-mua-auto-update-init 'gnus 'message)
|
|
|
|
|
:config (setq bbdb-file "~/Nextcloud/PRIVE/13_Org/contacts/bbdb")
|
|
|
|
|
:config (setq bbdb-mua-auto-update-p 'create))
|
|
|
|
|
|
|
|
|
|
(use-package org
|
|
|
|
|
:config
|
|
|
|
|
(setq org-startup-folded t)
|
|
|
|
|
(setq org-agenda-files
|
|
|
|
|
"~/Nextcloud/PRIVE/13_Org/agenda-DRI.org"
|
|
|
|
|
"~/Nextcloud/PRIVE/13_Org/perso.org")
|
|
|
|
|
(setq org-refile-use-outline-path 'file)
|
|
|
|
|
(setq org-refile-targets
|
|
|
|
|
'(("~/Nextcloud/PRIVE/13_Org/DRI.org" :maxlevel . 3)
|
|
|
|
|
("~/Nextcloud/PRIVE/13_Org/perso.org" :level . 1)
|
|
|
|
|
("~/Nextcloud/PRIVE/13_Org/pizajoffre.org" :level . 1)))
|
|
|
|
|
(setq org-todo-keywords
|
|
|
|
|
'((sequence "TODO(t)" "PENDING(p)" "|" "CANCELLED(c)" "DONE(d)")))
|
|
|
|
|
(setq org-todo-keyword-faces
|
|
|
|
|
'(("TODO" . (:foreground "#c678dd" :weight bold))
|
|
|
|
|
("PENDING" . (:background "#3f444a" :foreground "#ff6c6b" :weight bold))))
|
|
|
|
|
(setq org-capture-templates
|
|
|
|
|
'(("i" "Inbox" entry (file "~/Nextcloud/PRIVE/13_Org/DRI.org") "* TODO %i%?")
|
|
|
|
|
("a" "Agenda" entry (file "~/Nextcloud/PRIVE/13_Org/agenda-DRI.org") "* TODO %i%?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))")))
|
|
|
|
|
(setq org-agenda-custom-commands
|
|
|
|
|
'(("t" "Today" tags-todo "+LEVEL=1+CATEGORY=\"tasks\"|+SCHEDULED<=\"<today>\"|+DEADLINE<=\"<today>\""))))
|
|
|
|
|
|
|
|
|
|
(setq org-caldav-url "https://next20.produhost.net/remote.php/dav/calendars/alexandre")
|
|
|
|
|
(setq org-caldav-calendars
|
|
|
|
|
'((:calendar-id "alexandre-dri" :files ("~/Nextcloud/PRIVE/13_Org/agenda.org")
|
|
|
|
|
:inbox "~/Nextcloud/PRIVE/13_Org/agenda-DRI.org")
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
;;(use-package org
|
|
|
|
|
;; (setq org-startup-folded t)
|
|
|
|
|
;; (setq org-agenda-files
|
|
|
|
|
;; "~/Nextcloud/PRIVE/13_Org/agenda-DRI.org"
|
|
|
|
|
;; "~/Nextcloud/PRIVE/13_Org/perso.org")
|
|
|
|
|
;; (setq org-refile-use-outline-path 'file)
|
|
|
|
|
;; (setq org-refile-targets
|
|
|
|
|
;; '(("~/Nextcloud/PRIVE/13_Org/DRI.org" :maxlevel . 3)
|
|
|
|
|
;; ("~/Nextcloud/PRIVE/13_Org/perso.org" :level . 1)
|
|
|
|
|
;; ("~/Nextcloud/PRIVE/13_Org/pizajoffre.org" :level . 1)))
|
|
|
|
|
;; (setq org-todo-keywords
|
|
|
|
|
;; '((sequence "TODO(t)" "PENDING(p)" "|" "CANCELLED(c)" "DONE(d)")))
|
|
|
|
|
;; (setq org-todo-keyword-faces
|
|
|
|
|
;; '(("TODO" . (:foreground "#c678dd" :weight bold))
|
|
|
|
|
;; ("PENDING" . (:background "#3f444a" :foreground "#ff6c6b" :weight bold))))
|
|
|
|
|
;; (setq org-capture-templates
|
|
|
|
|
;; '(("i" "Inbox" entry (file "~/Nextcloud/PRIVE/13_Org/DRI.org") "* TODO %i%?")
|
|
|
|
|
;; ("a" "Agenda" entry (file "~/Nextcloud/PRIVE/13_Org/agenda-DRI.org") "* TODO %i%?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))")))
|
|
|
|
|
;; (setq org-agenda-custom-commands
|
|
|
|
|
;; '(("t" "Today" tags-todo "+LEVEL=1+CATEGORY=\"tasks\"|+SCHEDULED<=\"<today>\"|+DEADLINE<=\"<today>\""))))
|
|
|
|
|
;;
|
|
|
|
|
;;(setq org-caldav-url "https://next20.produhost.net/remote.php/dav/calendars/alexandre")
|
|
|
|
|
;;(setq org-caldav-calendars
|
|
|
|
|
;; '((:calendar-id "alexandre-dri" :files ("~/Nextcloud/PRIVE/13_Org/agenda.org")
|
|
|
|
|
;; :inbox "~/Nextcloud/PRIVE/13_Org/agenda-DRI.org")
|
|
|
|
|
;; )
|
|
|
|
|
;;)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(use-package magit)
|
|
|
|
@ -297,3 +296,71 @@
|
|
|
|
|
(autoload 'gfm-mode "markdown-mode"
|
|
|
|
|
"Major mode for editing GitHub Flavored Markdown files" t)
|
|
|
|
|
(add-to-list 'auto-mode-alist '("README\\.md\\'" . gfm-mode))
|
|
|
|
|
|
|
|
|
|
;; org-mode
|
|
|
|
|
(require 'org)
|
|
|
|
|
(require 'remember)
|
|
|
|
|
(require 'org-mouse)
|
|
|
|
|
;; files with ".org" open in org-mode
|
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
|
|
|
|
|
;; one file org
|
|
|
|
|
(defvar org-gtd-file "~/Nextcloud/PRIVE/13_Org/DRI.org")
|
|
|
|
|
|
|
|
|
|
;; Open DRI.org when I hit C-c g
|
|
|
|
|
(defun gtd ()
|
|
|
|
|
"Open the GTD file."
|
|
|
|
|
(interactive)
|
|
|
|
|
(find-file org-gtd-file))
|
|
|
|
|
;; keybinding
|
|
|
|
|
(global-set-key "\C-cl" 'org-store-link)
|
|
|
|
|
(global-set-key "\C-ca" 'org-agenda)
|
|
|
|
|
(global-set-key "\C-cr" 'org-remember)
|
|
|
|
|
(global-set-key "\C-cg" 'gtd)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(global-set-key (kbd "C-c l") 'org-store-link)
|
|
|
|
|
|
|
|
|
|
;; This seems like a good basic set of keywords to start out with:
|
|
|
|
|
|
|
|
|
|
(setq org-todo-keywords '((type "TODO" "SCHEDULED" "NEXT" "WAITING" "DONE")))
|
|
|
|
|
|
|
|
|
|
(setf org-todo-keyword-faces '(("NEXT" . (:foreground "yellow" :background "red" :bold t :weight bold))
|
|
|
|
|
("TODO" . (:foreground "cyan" :background "steelblue" :bold t :weight bold))
|
|
|
|
|
("WAITING" . (:foreground "yellow" :background "magenta2" :bold t :weight bold))
|
|
|
|
|
("DONE" . (:foreground "gray50" :background "gray30"))))
|
|
|
|
|
|
|
|
|
|
;; Remember support. This creates several files:
|
|
|
|
|
;;
|
|
|
|
|
;; ~/todo.org Where remembered TODO's are stored.
|
|
|
|
|
;; ~/journal.org Timestamped journal entries.
|
|
|
|
|
;; ~/remember.org All other notes
|
|
|
|
|
|
|
|
|
|
;; and a keybinding of "C-c r" for making quick notes from any buffer.
|
|
|
|
|
|
|
|
|
|
;; These bits of Remembered information must eventually be reviewed
|
|
|
|
|
;; and filed somewhere (perhaps in gtd.org, or in a project-specific
|
|
|
|
|
;; org file.) The out-of-sight, out-of-mind rule applies here---if I
|
|
|
|
|
;; don't review these auxiliary org-files, I'll probably forget what's
|
|
|
|
|
;; in them.
|
|
|
|
|
|
|
|
|
|
(require 'remember)
|
|
|
|
|
(setq org-reverse-note-order t) ;; note at beginning of file by default.
|
|
|
|
|
(setq org-default-notes-file "~/remember.org")
|
|
|
|
|
(setq remember-annotation-functions '(org-remember-annotation))
|
|
|
|
|
(setq remember-handler-functions '(org-remember-handler))
|
|
|
|
|
(add-hook 'remember-mode-hook 'org-remember-apply-template)
|
|
|
|
|
|
|
|
|
|
(setq org-remember-templates
|
|
|
|
|
'((?t "* TODO %?\n %i\n %a" "~/Nextcloud/PRIVE/13_Org/todo.org")
|
|
|
|
|
(?j "* %U %?\n\n %i\n %a" "~/Nextcloud/PRIVE/13_Org/journal.org")
|
|
|
|
|
(?i "* %^{Title}\n %i\n %a" "~/Nextcloud/PRIVE/13_Org/remember.org" "New Ideas")))
|
|
|
|
|
|
|
|
|
|
(global-set-key "\C-cr" 'org-remember)
|
|
|
|
|
(global-set-key [(f12)] 'org-remember)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; widen category field a little
|
|
|
|
|
(setq org-agenda-prefix-format " %-17:c%?-12t% s")
|
|
|
|
|
|
|
|
|
|
;; https://gist.github.com/dandrews/4644693
|
|
|
|
|
|
|
|
|
|