summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2021-03-09 15:32:52 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2021-03-09 15:32:52 +0100
commite5de60cc7d7826b7f82ec1ee8ab740491238c463 (patch)
tree3b944b2f85ebd4bc9493345e95f8fb899252cd1d
parentok (diff)
downloaddotfiles-bsd-e5de60cc7d7826b7f82ec1ee8ab740491238c463.tar.gz
dotfiles-bsd-e5de60cc7d7826b7f82ec1ee8ab740491238c463.tar.bz2
dotfiles-bsd-e5de60cc7d7826b7f82ec1ee8ab740491238c463.tar.xz
dotfiles-bsd-e5de60cc7d7826b7f82ec1ee8ab740491238c463.tar.zst
dotfiles-bsd-e5de60cc7d7826b7f82ec1ee8ab740491238c463.zip
fixed emacs
-rw-r--r--.config/emacs/init.el2
-rw-r--r--.config/emacs/org/config.org254
-rwxr-xr-x.local/bin/flacdir35
3 files changed, 161 insertions, 130 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 28cd76a..3319543 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -41,7 +41,7 @@
'(jdee-db-spec-breakpoint-face-colors (cons "#1c1f2b" "#676E95"))
'(objed-cursor-color "#ff5370")
'(package-selected-packages
- '(helm-flymake evil-leader evil-search-highlight-persist undo-tree helm-etags-plus helm-xref treemacs-projectile treemacs-magit treemacs-evil treemacs ibuffer-vc ibuffer-projectile eyebrowse diff-hl difflib fzf helm-fuzzy helm-fuzzy-find helm-ag evil-numbers ccls org-superstar company-lsp lsp-ui lsp-mode evil-mc evil-surround company-irony neotree irony xr font-utils org-evil evil-vimish-fold crontab-mode symon toc-org yaml-mode helm-w3m helm-mu htmlize babel org-pdftools shell-pop which-key dmenu lua-mode dionysos helm-c-yasnippet helm-emms emms restart-emacs w3m string-utils go-mode major-mode-icons dired-icon mode-icons evil-collection sed-mode zones kaolin-themes gruvbox-theme helm-themes yasnippet-classic-snippets yasnippet-snippets auto-yasnippet php-auto-yasnippets el-autoyas yasnippet cargo evil-ediff windresize helm-make spacemacs-theme centaur-tabs dashboard ssh sudo-ext dockerfile-mode docker frame-local ov dash-functional helm-addressbook org-mime flyspell-correct pdf-tools websocket request emojify-logos emojify oauth2 circe web-mode doom-themes doom-modeline all-the-icons-dired all-the-icons-gnus all-the-icons html5-schema phps-mode org-babel-eval-in-repl rust-mode smart-mode-line-powerline-theme eshell-prompt-extras eshell-fixed-prompt pyenv-mode s realgud-lldb ranger ## color-theme-modern auto-complete-c-headers command-log-mode auto-complete magit smart-tabs-mode paredit autopair tabbar-ruler tabbar use-package-el-get color-theme-approximate diminish rainbow-delimiters color-identifiers-mode use-package helm evil-visual-mark-mode))
+ '(windresize evil evil-collection evil-leader evil-search-highlight-persist evil-mc evil-surround evil-ediff evil-visual-mark-mode evil-nerd-commenter evil-vimish-fold evil-numbers lsp-mode lsp-treemacs lsp-ui ccls yasnippet yasnippet-classic-snippets yasnippet-snippets auto-yasnippet el-autoyas helm helm-xref helm-lsp helm-etags-plus helm-fuzzy helm-themes helm-make helm-projectile projectile company company-box which-key dap-mode magit undo-tree shell-pop treemacs treemacs-projectile treemacs-magit treemacs-evil autopair paredit rainbow-delimiters color-identifiers-mode ibuffer-vc ibuffer-projectile eyebrowse diff-hl fzf font-utils restart-emacs string-utils dired-icon kaolin-themes gruvbox-theme doom-themes spacemacs-theme doom-modeline dashboard org-superstar toc-org pdf-tools dockerfile-mode web-mode ssh sudo-ext vimish-fold bind-key all-the-icons all-the-icons-dired all-the-icons-ibuffer))
'(pdf-view-midnight-colors (cons "#EEFFFF" "#292D3E"))
'(pos-tip-background-color "#2E2A29")
'(pos-tip-foreground-color "#d4d4d6")
diff --git a/.config/emacs/org/config.org b/.config/emacs/org/config.org
index 48fbbdf..dca5cd3 100644
--- a/.config/emacs/org/config.org
+++ b/.config/emacs/org/config.org
@@ -52,18 +52,59 @@
** MELPA and non-MELPA
#+BEGIN_SRC emacs-lisp
-(require 'package)
-(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/"))
-(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
-(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/1"))
-
-(add-to-list 'load-path "~/.config/emacs/font-lock+")
-(add-to-list 'load-path "~/.config/emacs/all-the-icons/")
-(add-to-list 'load-path "~/.config/emacs/all-the-icons-dired/")
-
-(setq package-enable-at-startup nil)
-(setq package-check-signature nil)
-(package-initialize)
+ (require 'package)
+ (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
+ (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
+ (add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
+ (package-initialize)
+
+ (add-to-list 'load-path "~/.config/emacs/font-lock+")
+ (add-to-list 'load-path "~/.config/emacs/all-the-icons/")
+ (add-to-list 'load-path "~/.config/emacs/all-the-icons-dired/")
+
+ (setq package-selected-packages '(
+ evil evil-collection evil-leader
+ evil-search-highlight-persist evil-mc evil-surround evil-ediff
+ evil-visual-mark-mode evil-nerd-commenter evil-vimish-fold
+ evil-numbers
+ lsp-mode lsp-treemacs lsp-ui
+ ccls
+ yasnippet yasnippet-classic-snippets yasnippet-snippets auto-yasnippet el-autoyas
+ helm helm-xref helm-lsp helm-etags-plus helm-fuzzy helm-themes helm-make helm-projectile
+ projectile
+ company company-box
+ which-key dap-mode
+ magit
+ undo-tree
+ shell-pop
+ treemacs treemacs-projectile treemacs-magit treemacs-evil
+ autopair paredit
+ rainbow-delimiters
+ color-identifiers-mode
+ ibuffer-vc ibuffer-projectile
+ eyebrowse
+ diff-hl
+ fzf
+ font-utils
+ restart-emacs
+ string-utils
+ dired-icon
+ kaolin-themes gruvbox-theme doom-themes spacemacs-theme
+ doom-modeline
+ dashboard
+ org-superstar toc-org
+ pdf-tools
+ dockerfile-mode
+ web-mode
+ ssh sudo-ext
+ vimish-fold
+ bind-key
+ all-the-icons all-the-icons-dired all-the-icons-ibuffer
+ ))
+
+ (when (cl-find-if-not #'package-installed-p package-selected-packages)
+ (package-refresh-contents)
+ (mapc #'package-install package-selected-packages))
#+END_SRC
** Some org
@@ -89,8 +130,7 @@
(setq org-todo-keywords
'((sequence "TODO"
"|"
- "DONE"
- "CANCELLED")))
+ "DONE")))
(setq org-log-done 'time)
@@ -143,14 +183,14 @@
*** Paredit
#+BEGIN_SRC emacs-lisp
-(require 'paredit)
-(defadvice paredit-mode (around disable-autopairs-around (arg))
- ad-do-it
- (if (null ad-return-value)
- (autopair-mode 1)
- (autopair-mode -1)
-))
-(ad-activate 'paredit-mode)
+;; (require 'paredit)
+;; (defadvice paredit-mode (around disable-autopairs-around (arg))
+;; ad-do-it
+;; (if (null ad-return-value)
+;; (autopair-mode 1)
+;; (autopair-mode -1)
+;; ))
+;; (ad-activate 'paredit-mode)
#+END_SRC
*** Evil mode
@@ -313,9 +353,9 @@
*** w3m
#+BEGIN_SRC emacs-lisp
-(require 'w3m-load)
-(setq w3m-home-page "https://start.duckduckgo.com/")
-(setq w3m-default-display-inline-images t)
+;; (require 'w3m-load)
+;; (setq w3m-home-page "https://start.duckduckgo.com/")
+;; (setq w3m-default-display-inline-images t)
;; (define-key w3m-mode-map "w" 'right-word)
;; (define-key w3m-mode-map "b" 'left-word)
;; (define-key w3m-mode-map "<" 'scroll-left)
@@ -334,25 +374,6 @@
;; (define-key w3m-mode-map "t" 'w3m-copy-buffer)
#+END_SRC
-*** NeoTree
-#+BEGIN_SRC emacs-lisp
- ;; (require 'neotree)
- ;; (setq neo-vc-integration '(face))
- ;; (evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter)
- ;; (evil-define-key 'normal neotree-mode-map (kbd "SPC") 'neotree-quick-look)
- ;; (evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide)
- ;; (evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter)
- ;; (evil-define-key 'normal neotree-mode-map (kbd "g") 'neotree-refresh)
- ;; (evil-define-key 'normal neotree-mode-map (kbd "n") 'neotree-next-line)
- ;; (evil-define-key 'normal neotree-mode-map (kbd "p") 'neotree-previous-line)
- ;; (evil-define-key 'normal neotree-mode-map (kbd "A") 'neotree-stretch-toggle)
- ;; (evil-define-key 'normal neotree-mode-map (kbd "H") 'neotree-hidden-file-toggle)
- ;; (evil-define-key 'normal neotree-mode-map (kbd "|") 'neotree-enter-vertical-split)
- ;; (evil-define-key 'normal neotree-mode-map (kbd "S") 'neotree-enter-vertical-split)
- ;; (evil-define-key 'normal neotree-mode-map (kbd "/") 'neotree-enter-horizontal-split)
- ;; (evil-define-key 'normal neotree-mode-map (kbd "s") 'neotree-enter-horizontal-split)
-#+END_SRC
-
*** Treemacs
#+BEGIN_SRC emacs-lisp
(require 'treemacs)
@@ -368,11 +389,12 @@
(require 'helm-misc)
(require 'helm-projectile)
(require 'helm-locate)
+ (require 'helm-lsp)
(global-set-key (kbd "M-x") 'helm-M-x)
(global-set-key (kbd "C-x C-f") #'helm-find-files)
(global-set-key (kbd "M-p") #'helm-projectile-switch-project)
- (global-set-key (kbd "C-x C-b") #'helm-buffers-list)
+ (global-set-key (kbd "C-x C-b") #'helm-mini)
(global-set-key (kbd "C-x p") #'helm-projectile)
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action)
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action)
@@ -508,22 +530,6 @@ buffer in current window."
(global-set-key (kbd "C-c t") 'my/toggle-window-dedicated)
#+END_SRC
-*** cargo
-#+BEGIN_SRC emacs-lisp
-(require 'cargo)
-(add-hook 'rust-mode-hook 'cargo-minor-mode)
-#+END_SRC
-
-*** yasnippet
-#+BEGIN_SRC emacs-lisp
-(require 'yasnippet)
-(require 'yasnippet-snippets)
-(require 'yasnippet-classic-snippets)
-(require 'helm-c-yasnippet)
-(yas-reload-all)
-(add-hook 'prog-mode-hook #'yas-minor-mode)
-#+END_SRC
-
*** Tabs and stuff
#+BEGIN_SRC emacs-lisp
(defun minibuffer-keyboard-quit ()
@@ -557,12 +563,27 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(setq-default cperl-indent-level my/tab-stop)
#+END_SRC
+*** ibuffer
+ #+BEGIN_SRC emacs-lisp
+ (require 'ibuffer)
+ (require 'ibuffer-vc)
+ (require 'ibuffer-projectile)
+ (add-hook 'ibuffer-hook
+ (lambda ()
+ (ibuffer-projectile-set-filter-groups)
+ (unless (eq ibuffer-sorting-mode 'alphabetic)
+ (ibuffer-do-sort-by-alphabetic))))
+ #+END_SRC
+
*** all the icons
#+BEGIN_SRC emacs-lisp
(require 'font-lock+)
(require 'all-the-icons)
+(require 'all-the-icons-dired)
+(require 'all-the-icons-ibuffer)
(load "all-the-icons-dired.el")
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)
+(all-the-icons-ibuffer-mode 1)
#+END_SRC
*** which-key
@@ -599,57 +620,52 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(define-key markdown-mode-map (kbd "\C-c\C-o") 'toc-org-markdown-follow-thing-at-point)
#+END_SRC
-*** irony
- #+BEGIN_SRC emacs-lisp
- (require 'irony)
- (add-hook 'c++-mode-hook 'irony-mode)
- (add-hook 'c-mode-hook 'irony-mode)
- (add-hook 'objc-mode-hook 'irony-mode)
- (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)
- #+END_SRC
-
-*** company
- #+BEGIN_SRC emacs-lisp
- (require 'company)
- (require 'company-irony)
- ;; (add-to-list 'company-backends 'company-irony)
- ;; (add-to-list 'company-backends 'company-yasnippet)
- (add-hook 'after-init-hook 'global-company-mode)
- (global-company-mode)
- ;; company delay until suggestions are shown
- (setq company-idle-delay 0)
-
- ;; weight by frequency
- (setq company-transformers '(company-sort-by-occurrence))
-
- ;; Add yasnippet support for all company backends
- ;; https://github.com/syl20bnr/spacemacs/pull/179
- (defvar company-mode/enable-yas t "Enable yasnippet for all backends.")
-
- (defun company-mode/backend-with-yas (backend)
- (if (or (not company-mode/enable-yas) (and (listp backend) (member 'company-yasnippet backend)))
- backend
- (append (if (consp backend) backend (list backend))
- '(:with company-yasnippet))))
-
- (setq company-backends (mapcar #'company-mode/backend-with-yas company-backends))
- (define-key company-active-map (kbd "C-j") 'company-select-next)
- (define-key company-active-map (kbd "C-k") 'company-select-previous)
- (define-key company-search-map (kbd "C-j") 'company-select-next)
- (define-key company-search-map (kbd "C-k") 'company-select-previous)
- (define-key company-search-map (kbd "C-t") 'company-search-toggle-filtering)
- #+END_SRC
-
-*** lsp, ccls
+*** lsp, ccls, company, yasnippet
#+BEGIN_SRC emacs-lisp
(require 'lsp-mode)
(require 'lsp-ui)
- (require 'company-lsp)
(require 'ccls)
- (add-hook 'c-mode-hook (lambda () (lsp)))
- (add-hook 'c++-mode-hook (lambda () (lsp)))
- (add-hook 'objc-mode-hook (lambda () (lsp)))
- (add-hook 'cuda-mode-hook (lambda () (lsp)))
+ (require 'company)
+ (require 'company-box)
+ (require 'yasnippet)
+ (require 'yasnippet-snippets)
+ (require 'yasnippet-classic-snippets)
+ (yas-reload-all)
+ (yas-global-mode)
+ (add-hook 'c-mode-hook 'lsp)
+ (add-hook 'c++-mode-hook 'lsp)
+
+ (setq lsp-ui-doc-header nil
+ lsp-ui-doc-position 'top
+ lsp-ui-sideline-enable t)
+
+ (setq lsp-enable-indentation nil
+ lsp-completion-enable t
+ lsp-headerline-breadcrumb-enable nil)
+ (setq gc-cons-threshold (* 100 1024 1024)
+ read-process-output-max (* 1024 1024)
+ treemacs-space-between-root-nodes nil
+ company-idle-delay 0.0
+ company-minimum-prefix-length 1
+ lsp-idle-delay 0.1)
+
+ (with-eval-after-load 'lsp-mode
+ (add-hook 'lsp-mode-hook #'lsp-enable-which-key-integration)
+ (require 'dap-cpptools)
+ (yas-global-mode))
+
+ (add-hook 'after-init-hook 'global-company-mode)
+ (global-company-mode)
+
+ (define-key company-active-map (kbd "C-j") 'company-select-next)
+ (define-key company-active-map (kbd "C-k") 'company-select-previous)
+ (define-key company-search-map (kbd "C-j") 'company-select-next)
+ (define-key company-search-map (kbd "C-k") 'company-select-previous)
+ (define-key company-search-map (kbd "C-t") 'company-search-toggle-filtering)
+ ;; (push 'company-lsp company-backends)
+ ;; (setq company-transformers nil company-lsp-async t company-lsp-cache-candidates nil)
+ (add-hook 'company-mode-hook 'company-box-mode)
+
(setq ccls-executable "/usr/local/bin/ccls")
(defun ccls/callee () (interactive) (lsp-ui-peek-find-custom "$ccls/call" '(:callee t)))
@@ -691,17 +707,9 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
;; (ccls/vars 3) => field or local variable. 3 = 1 | 2
;; (ccls/vars 4) => parameter
- (setq lsp-ui-doc-header nil)
- (setq lsp-ui-doc-position 'top)
- (setq lsp-ui-sideline-enable t)
-
;; References whose filenames are under this project
- (setq company-transformers nil company-lsp-async t company-lsp-cache-candidates nil)
(setq ccls-sem-highlight-method 'overlay)
(ccls-use-default-rainbow-sem-highlight)
- (setq lsp-enable-indentation nil)
- (setq lsp-completion-enable t)
- (setq lsp-headerline-breadcrumb-enable nil)
#+END_SRC
*** diff-hl
@@ -740,18 +748,6 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(setq eyebrowse-new-workspace t)
#+END_SRC
-*** ibuffer
- #+BEGIN_SRC emacs-lisp
- (require 'ibuffer)
- (require 'ibuffer-vc)
- (require 'ibuffer-projectile)
- (add-hook 'ibuffer-hook
- (lambda ()
- (ibuffer-projectile-set-filter-groups)
- (unless (eq ibuffer-sorting-mode 'alphabetic)
- (ibuffer-do-sort-by-alphabetic))))
- #+END_SRC
-
*** undo-tree
#+BEGIN_SRC emacs-lisp
(require 'undo-tree)
@@ -789,7 +785,6 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(global-set-key [f5] 'undo-tree-visualize)
(global-set-key (kbd "C-x d") 'dired)
(global-set-key (kbd "C-x b") 'ibuffer)
- (global-set-key (kbd "C-x C-b") 'helm-buffers-list)
(global-set-key (kbd "M-9") 'shell-command)
(global-set-key (kbd "M-0") 'async-shell-command)
(global-set-key (kbd "M-j") 'next-buffer)
@@ -797,3 +792,4 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer."
(shell-pop--set-shell-type 'my/shell-pop-shell-type my/shell-pop-shell-type)
#+END_SRC
+
diff --git a/.local/bin/flacdir b/.local/bin/flacdir
new file mode 100755
index 0000000..625e72e
--- /dev/null
+++ b/.local/bin/flacdir
@@ -0,0 +1,35 @@
+#!/usr/local/bin/perl
+
+use warnings;
+use strict;
+
+use constant FLAC_PATH => '/usr/local/bin/flac';
+
+sub main
+{
+ opendir(DIR, '.') or die "Cannot open directory: $!";
+ # my @files = readdir(DIR);
+ my @files = grep(/\.wav$/, readdir(DIR));
+ closedir(DIR);
+ foreach (@files) {
+ if (
+ system(
+ FLAC_PATH,
+ '--warnings-as-errors',
+ '--compression-level-0',
+ '--verify',
+ $_
+ ) != 0
+ ) {
+ exit 1;
+ }
+ else {
+ unlink($_);
+ }
+ }
+ return;
+}
+
+main();
+
+__END__