Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
emacs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DOSCH Philippe
emacs
Commits
97cd6e1a
Commit
97cd6e1a
authored
2 years ago
by
Philippe Dosch
Browse files
Options
Downloads
Patches
Plain Diff
Lot of stuff
parent
7e1cdc3d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.emacs
+126
-32
126 additions, 32 deletions
.emacs
with
126 additions
and
32 deletions
.emacs
+
126
−
32
View file @
97cd6e1a
...
@@ -12,18 +12,17 @@
...
@@ -12,18 +12,17 @@
;; Chargement principal
;; Chargement principal
(require 'package)
(require 'package)
(custom-set-variables '(gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3"))
;; Ajout de Melpa
;; Ajout de Melpa
(add-to-list 'package-archives
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
'(
("gnu" . "https://elpa.gnu.org/packages/")
;; Add the user-contributed repository
("melpa" . "https://melpa.org/packages/")
(add-to-list 'package-archives
("nongnu" . "https://elpa.nongnu.org/nongnu/")
'("marmalade" . "http://marmalade-repo.org/packages/"))
(";TODO: romey" . "http://tromey.com/elpa/")
)
;; MAJ plus réactives de org à la source (+ dangereux ?)
)
(add-to-list 'package-archives
'("org" . "http://orgmode.org/elpa/") t)
;; Dépôt alternatif (utile ?)
;; Dépôt alternatif (utile ?)
;; (add-to-list 'package-archives
;; (add-to-list 'package-archives
...
@@ -57,9 +56,13 @@
...
@@ -57,9 +56,13 @@
'(
'(
"/home/phil/.lisp/"
"/home/phil/.lisp/"
"/home/phil/.lisp/emacs-solargraph/"
"/home/phil/.lisp/emacs-solargraph/"
"/home/phil/.lisp/Emacs-langtool/"
"/home/phil/.lisp/emacs-everywhere//"
)
)
load-path))
load-path))
;; (require 'emacs-everywhere)
;; On personnalise la barre de titre
;; On personnalise la barre de titre
(setq frame-title-format (list "Emacs (" (getenv "USER") ") : %b"))
(setq frame-title-format (list "Emacs (" (getenv "USER") ") : %b"))
...
@@ -157,9 +160,9 @@
...
@@ -157,9 +160,9 @@
(setq compilation-window-height 20)
(setq compilation-window-height 20)
;; Pour mon clavier KB-522 qui ne réagit pas à certaines
;; Pour mon clavier KB-522 qui ne réagit pas à certaines
;; combinaisons de touches
;; combinaisons de touches
- Edit : nouvelle config pour mx keys
(global-set-key (kbd "M-
]
") 'delete-horizontal-space)
(global-set-key (kbd "M-
ç
") 'delete-horizontal-space)
(global-set-key (kbd "C-M-
]
") 'indent-region)
(global-set-key (kbd "C-M-
ç
") 'indent-region)
;; ==========================
;; ==========================
;; Configurations de packages
;; Configurations de packages
...
@@ -532,19 +535,63 @@
...
@@ -532,19 +535,63 @@
:ensure t
:ensure t
:commands lsp-treemacs-errors-list)
:commands lsp-treemacs-errors-list)
(use-package rg
;; (use-package rg
:ensure t
;; :ensure t
:bind(("C-c s" . rg-menu)))
;; :bind(("C-c s" . rg-menu)))
;; Pour languagetool
;; (sudo snap install languagetool)
(setq langtool-language-tool-jar "/snap/languagetool/34/usr/bin/languagetool-commandline.jar")
(require 'langtool)
(global-set-key (kbd "C-&") 'langtool-check-buffer)
;; Pour grammalecte
;; Pour grammalecte
(use-package flycheck-grammalecte
:ensure t
;; (use-package flycheck-grammalecte
:config
;; :hook (fountain-mode . flycheck-mode)
(setq flycheck-grammalecte-enabled-modes
;; :init
'(mail-mode))
;; (setq flycheck-grammalecte-report-apos nil
(setq flycheck-grammalecte-report-apos nil)
;; flycheck-grammalecte-report-esp nil
(setq flycheck-grammalecte-report-esp nil)
;; flycheck-grammalecte-report-nbsp nil)
(setq flycheck-grammalecte-report-nbsp nil))
;; :config
;; (add-to-list 'flycheck-grammalecte-enabled-modes 'fountain-mode)
;; (grammalecte-download-grammalecte)
;; (flycheck-grammalecte-setup))
;; (use-package flycheck-grammalecte
;; :ensure t
;; :hook (text-mode . flycheck-mode)
;; :init
;; (setq flycheck-grammalecte-report-apos nil
;; flycheck-grammalecte-report-esp nil
;; flycheck-grammalecte-report-nbsp nil)
;; :config
;; (grammalecte-download-grammalecte)
;; (flycheck-grammalecte-setup))
;; (setq flycheck-grammalecte-report-apos nil)
;; (setq flycheck-grammalecte-report-esp nil)
;; (setq flycheck-grammalecte-report-nbsp nil)
;; (load-file "~/.emacs.d/flycheck-grammalecte/grammalecte.el")
;; (load-file "~/.emacs.d/flycheck-grammalecte/flycheck-grammalecte.el")
;; ;; (require 'flycheck-grammalecte)
;; (flycheck-grammalecte-setup)
;; (setq flycheck-grammalecte-enabled-modes
;; '(mail-mode))
;; (load-file "~/.emacs.d/flycheck-grammalecte/flycheck-grammalecte.el")
;; (flycheck-grammalecte-setup)
;; (setq flycheck-grammalecte-report-apos nil)
;; (setq flycheck-grammalecte-report-esp nil)
;; (setq flycheck-grammalecte-report-nbsp nil)
;; (add-to-list 'flycheck-grammalecte-enabled-modes 'mail-mode))
;; (flycheck-grammalecte-setup))
;; (load-file "~/.emacs.d/flycheck-grammalecte/flycheck-grammalecte.elc")
;; (flycheck-grammalecte-setup)
;; Pour JS
;; Pour JS
(use-package js2-mode
(use-package js2-mode
...
@@ -618,7 +665,7 @@
...
@@ -618,7 +665,7 @@
(use-package ox-reveal
(use-package ox-reveal
:ensure t
:ensure t
:config
:config
(setq org-reveal-root "file:///home/
dosch
/divers/presentation/reveal.js"))
(setq org-reveal-root "file:///home/
phil
/divers/presentation/reveal.js"))
;; Pour function-arg (complétion et vérifciation en C/C++)
;; Pour function-arg (complétion et vérifciation en C/C++)
(use-package function-args
(use-package function-args
...
@@ -632,6 +679,13 @@
...
@@ -632,6 +679,13 @@
:config
:config
(edit-server-start))
(edit-server-start))
;; emmet, les complétions pour le Web (HTML/CSS)
;; (C-j pour l'expand)
(use-package emmet-mode
:ensure t
:config
(add-hook 'web-mode-hook 'emmet-mode))
;; Openwith : utilsation de programmes externe lors de
;; Openwith : utilsation de programmes externe lors de
;; l'ouverture pour certains types de fichiers
;; l'ouverture pour certains types de fichiers
(use-package openwith
(use-package openwith
...
@@ -680,9 +734,10 @@
...
@@ -680,9 +734,10 @@
'(imenu-use-popup-menu t)
'(imenu-use-popup-menu t)
'(package-selected-packages
'(package-selected-packages
(quote
(quote
(js2-refactor org-bullets lsp-treemacs helm-lsp company-lsp lsp-ui lsp-mode gnu-elpa-keyring-update markdown-mode flycheck-clang-analyzer flycheck-grammalecte which-key web-mode undo-tree try smex smartscan smart-mode-line-powerline-theme ruby-refactor ruby-electric robe rainbow-delimiters quelpa-use-package projectile plantuml-mode php-extras pdf-tools ox-reveal nlinum neotree multiple-cursors monokai-theme magit js2-mode irony-eldoc imenu-anywhere iedit ido-vertical-mode highlight-indent-guides helm-swoop helm-orgcard helm-flycheck helm-directory helm-css-scss helm-c-yasnippet helm-anything git-timemachine function-args flx-ido feature-mode expand-region edit-server ecb dumb-jump dired+ dic-lookup-w3m counsel company-web company-tern company-php company-jedi company-irony company-inf-ruby company-c-headers company-auctex clang-format avy auto-yasnippet anzu ac-helm diff-hl request)))
(
org rust-mode
js2-refactor org-bullets lsp-treemacs helm-lsp company-lsp lsp-ui lsp-mode gnu-elpa-keyring-update markdown-mode flycheck-clang-analyzer flycheck-grammalecte which-key web-mode undo-tree try smex smartscan smart-mode-line-powerline-theme ruby-refactor ruby-electric robe rainbow-delimiters quelpa-use-package projectile plantuml-mode php-extras pdf-tools ox-reveal nlinum neotree multiple-cursors monokai-theme magit js2-mode irony-eldoc imenu-anywhere iedit ido-vertical-mode highlight-indent-guides helm-swoop helm-orgcard helm-flycheck helm-directory helm-css-scss helm-c-yasnippet helm-anything git-timemachine function-args flx-ido feature-mode expand-region edit-server ecb dumb-jump dired+ dic-lookup-w3m counsel company-web company-tern company-php company-jedi company-irony company-inf-ruby company-c-headers company-auctex clang-format avy auto-yasnippet anzu ac-helm diff-hl request)))
'(show-paren-mode t)
'(show-paren-mode t)
'(tool-bar-mode nil))
'(tool-bar-mode nil)
'(tramp-default-method "scpc"))
;; Configuration du style d'affichage
;; Configuration du style d'affichage
(custom-set-faces
(custom-set-faces
...
@@ -762,11 +817,14 @@
...
@@ -762,11 +817,14 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Pour peupler la liste des fichiers .org
;
; Pour peupler la liste des fichiers .org
(load-library "find-lisp")
(load-library "find-lisp")
(setq org-agenda-files
(setq org-agenda-files
(find-lisp-find-files "~/org/" "\.org$"))
(find-lisp-find-files "~/org/" "\.org$"))
;; Ouverture par défaut des fichiers org
(setq org-startup-folded "overview")
;; Des puces plus sympas
;; Des puces plus sympas
(use-package org-bullets
(use-package org-bullets
:ensure t
:ensure t
...
@@ -816,7 +874,14 @@
...
@@ -816,7 +874,14 @@
("NEXT" ("WAITING") ("CANCELLED") ("HOLD"))
("NEXT" ("WAITING") ("CANCELLED") ("HOLD"))
("DONE" ("WAITING") ("CANCELLED") ("HOLD")))))
("DONE" ("WAITING") ("CANCELLED") ("HOLD")))))
; Pour les notes rapides
;; Pour insérer des templates plus facilement sous orgcard
(require 'org-tempo)
(add-to-list 'org-structure-template-alist '("sh" . "src shell"))
(add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp"))
(add-to-list 'org-structure-template-alist '("py" . "src python"))
(add-to-list 'org-structure-template-alist '("rb" . "src ruby"))
;; Pour les notes rapides
(setq org-directory "~/org")
(setq org-directory "~/org")
(setq org-default-notes-file "~/org/refile.org")
(setq org-default-notes-file "~/org/refile.org")
...
@@ -1082,6 +1147,18 @@
...
@@ -1082,6 +1147,18 @@
(global-set-key "\C-xc" 'comtex)
(global-set-key "\C-xc" 'comtex)
;; Macro pratique pour éditer les mails
(fset 'cleanmail
(kmacro-lambda-form [?\C-x ?h delete ?\C-y escape ?<] 0 "%d"))
(fset 'copymail
(kmacro-lambda-form [?\C-x ?h ?\M-w escape ?<] 0 "%d"))
;; (global-set-key (kbd "C-?²" 'cleanmail)
;; (global-set-key [(control ?²)] 'cleanmail)
;; (global-set-key [(control return)] 'compile)
(global-set-key (kbd "<f10>") 'cleanmail)
(global-set-key (kbd "M-<f10>") 'copymail)
;; Accès direct au répertoire courant avec C-x C-j
;; Accès direct au répertoire courant avec C-x C-j
(require 'dired-x)
(require 'dired-x)
...
@@ -1109,7 +1186,7 @@
...
@@ -1109,7 +1186,7 @@
(global-set-key [(control $)] 'yas-global-mode)
(global-set-key [(control $)] 'yas-global-mode)
;; Pour dire où est reveal...
;; Pour dire où est reveal...
(setq org-reveal-root "file:///home/
dosch
/divers/presentation/reveal.js")
(setq org-reveal-root "file:///home/
phil
/divers/presentation/reveal.js")
;; Exclude very large buffers from dabbrev
;; Exclude very large buffers from dabbrev
(defun sanityinc/dabbrev-friend-buffer (other-buffer)
(defun sanityinc/dabbrev-friend-buffer (other-buffer)
...
@@ -1180,7 +1257,7 @@
...
@@ -1180,7 +1257,7 @@
'(lambda ()
'(lambda ()
(flycheck-mode 1)))
(flycheck-mode 1)))
(global-set-key (kbd "<f10>") 'flycheck-mode)
;;
(global-set-key (kbd "<f10>") 'flycheck-mode)
;; Pour discover, le mode qui va bien pour présenter certaines
;; Pour discover, le mode qui va bien pour présenter certaines
;; options de commandes comme sous magit
;; options de commandes comme sous magit
...
@@ -1197,8 +1274,8 @@
...
@@ -1197,8 +1274,8 @@
(fset 'gitnext
(fset 'gitnext
[?\M-! ?g ?i ?t ? ?n ?e ?x ?t return])
[?\M-! ?g ?i ?t ? ?n ?e ?x ?t return])
(global-set-key (kbd "M-<f10>") 'gitnext)
;;
(global-set-key (kbd "M-<f10>") 'gitnext)
(global-set-key (kbd "S-<f10>") 'gitprev)
;;
(global-set-key (kbd "S-<f10>") 'gitprev)
;; Pour initialiser PDFtools (test du 26/1/16)
;; Pour initialiser PDFtools (test du 26/1/16)
; (pdf-tools-install)
; (pdf-tools-install)
...
@@ -1213,6 +1290,23 @@
...
@@ -1213,6 +1290,23 @@
;; (ce qui permet d'ouvrir le nouveau folder à la place de l'ancien)
;; (ce qui permet d'ouvrir le nouveau folder à la place de l'ancien)
(put 'dired-find-alternate-file 'disabled nil)
(put 'dired-find-alternate-file 'disabled nil)
;; Pour les quotes de mail trop longues (via insert-kbd-macro)
(defun mailcut ()
"Format lines from quoted mails."
(interactive)
(end-of-line)
(kill-line)
(delete-char 1)
(just-one-space)
(end-of-line)
(gin-do-auto-fill))
;; Au niveau du mapping, c'est un peu tricky. Je n'ai pas trouvé le
;; moyen d'ajouter la touche contrôle, l'idée initiale étant de binder
;; ça sur la touche µ. J'ai récupéré le code dans un buffer dans lequel
;; j'ai exécuté toggle-enable-multibyte-characters (il faut utiliser
;; le code décimal)
(global-set-key [181] 'mailcut)
;;; .emacs ends here
;;; .emacs ends here
(provide '.emacs)
(provide '.emacs)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment