|
|
@ -540,29 +540,47 @@ Language Server Protocol. |
|
|
|
c++-mode ; clangd |
|
|
|
c++-mode ; clangd |
|
|
|
php-mode) ; nodejs-intelephense |
|
|
|
php-mode) ; nodejs-intelephense |
|
|
|
. lsp-deferred) |
|
|
|
. lsp-deferred) |
|
|
|
:custom |
|
|
|
:config |
|
|
|
(lsp-auto-guess-root t) |
|
|
|
(setq lsp-auto-guess-root t) |
|
|
|
(lsp-clients-clangd-args '("-j=2" |
|
|
|
(setq lsp-clients-clangd-args '("-j=2" |
|
|
|
"--background-index" |
|
|
|
"--background-index" |
|
|
|
"--clang-tidy" |
|
|
|
"--clang-tidy" |
|
|
|
"--compile-commands-dir=build" |
|
|
|
"--compile-commands-dir=build" |
|
|
|
"--log=error" |
|
|
|
"--log=error" |
|
|
|
"--pch-storage=memory")) |
|
|
|
"--pch-storage=memory")) |
|
|
|
(lsp-enable-xref t) |
|
|
|
(setq lsp-clients-lua-language-server-install-dir "/usr/share/lua-language-server/") |
|
|
|
(lsp-headerline-breadcrumb-enable nil) |
|
|
|
(setq lsp-clients-lua-language-server-bin "/usr/bin/lua-language-server") |
|
|
|
(lsp-intelephense-storage-path (concat dot-cache-dir "/lsp-cache")) |
|
|
|
(setq lsp-enable-xref t) |
|
|
|
(lsp-keep-workspace-alive nil) |
|
|
|
(setq lsp-headerline-breadcrumb-enable nil) |
|
|
|
(lsp-prefer-flymake nil) |
|
|
|
(setq lsp-intelephense-storage-path (concat dot-cache-dir "/lsp-cache")) |
|
|
|
(lsp-session-file (concat dot-cache-dir "/lsp-session-v1")) |
|
|
|
(setq lsp-keep-workspace-alive nil) |
|
|
|
:config |
|
|
|
(setq lsp-prefer-flymake nil) |
|
|
|
|
|
|
|
(setq lsp-session-file (concat dot-cache-dir "/lsp-session-v1")) |
|
|
|
|
|
|
|
|
|
|
|
;; Mark clangd args variable as safe to modify via .dir-locals.el |
|
|
|
;; Mark clangd args variable as safe to modify via .dir-locals.el |
|
|
|
(put 'lsp-clients-clangd-args 'safe-local-variable #'listp) |
|
|
|
(put 'lsp-clients-clangd-args 'safe-local-variable #'listp) |
|
|
|
|
|
|
|
|
|
|
|
;; Enable which-key descriptions |
|
|
|
;; Enable which-key descriptions |
|
|
|
(dolist (leader-key (list dot/leader-key dot/leader-alt-key)) |
|
|
|
(dolist (leader-key (list dot/leader-key dot/leader-alt-key)) |
|
|
|
(let ((lsp-keymap-prefix (concat leader-key " l"))) |
|
|
|
(let ((lsp-keymap-prefix (concat leader-key " l"))) |
|
|
|
(lsp-enable-which-key-integration))) |
|
|
|
(lsp-enable-which-key-integration)))) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
(use-package lsp-ui |
|
|
|
|
|
|
|
:commands lsp-ui-mode |
|
|
|
|
|
|
|
:after (flycheck lsp-mode) |
|
|
|
|
|
|
|
:config |
|
|
|
|
|
|
|
(setq lsp-ui-doc-border (face-foreground 'default)) |
|
|
|
|
|
|
|
(setq lsp-ui-doc-enable nil) |
|
|
|
|
|
|
|
(setq lsp-ui-doc-header t) |
|
|
|
|
|
|
|
(setq lsp-ui-doc-include-signature t) |
|
|
|
|
|
|
|
(setq lsp-ui-doc-position 'top) |
|
|
|
|
|
|
|
(setq lsp-ui-doc-use-childframe t) |
|
|
|
|
|
|
|
(setq lsp-ui-flycheck-enable t) |
|
|
|
|
|
|
|
(setq lsp-ui-flycheck-list-position 'right) |
|
|
|
|
|
|
|
(setq lsp-ui-flycheck-live-reporting t) |
|
|
|
|
|
|
|
(setq lsp-ui-peek-enable nil) |
|
|
|
|
|
|
|
(setq lsp-ui-sideline-enable nil)) |
|
|
|
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
(use-package lsp-ui |
|
|
|
(use-package lsp-ui |
|
|
|
:commands lsp-ui-mode |
|
|
|
:commands lsp-ui-mode |
|
|
@ -640,20 +658,20 @@ Language Server Protocol. |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package dashboard |
|
|
|
(use-package dashboard |
|
|
|
:demand |
|
|
|
:demand |
|
|
|
:custom |
|
|
|
:hook (dashboard-mode . dot/hook-disable-line-numbers) |
|
|
|
(initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) |
|
|
|
:config |
|
|
|
(dashboard-banner-logo-title "GNU Emacs master race!") |
|
|
|
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) |
|
|
|
(dashboard-center-content t) |
|
|
|
(setq dashboard-banner-logo-title "GNU Emacs master race!") |
|
|
|
(dashboard-set-file-icons t) |
|
|
|
(setq dashboard-center-content t) |
|
|
|
(dashboard-set-footer nil) |
|
|
|
(setq dashboard-set-file-icons t) |
|
|
|
(dashboard-set-heading-icons t) |
|
|
|
(setq dashboard-set-footer nil) |
|
|
|
(dashboard-show-shortcuts t) |
|
|
|
(setq dashboard-set-heading-icons t) |
|
|
|
(dashboard-startup-banner 'logo) |
|
|
|
(setq dashboard-show-shortcuts t) |
|
|
|
(dashboard-items '((projects . 10) |
|
|
|
(setq dashboard-startup-banner 'logo) |
|
|
|
|
|
|
|
(setq dashboard-items '((projects . 10) |
|
|
|
(bookmarks . 5) |
|
|
|
(bookmarks . 5) |
|
|
|
(recents . 5))) |
|
|
|
(recents . 5))) |
|
|
|
:hook (dashboard-mode . dot/hook-disable-line-numbers) |
|
|
|
(dashboard-setup-startup-hook)) |
|
|
|
:config (dashboard-setup-startup-hook)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; A better *help* buffer |
|
|
|
;; A better *help* buffer |
|
|
|
(use-package helpful |
|
|
|
(use-package helpful |
|
|
@ -864,8 +882,7 @@ Setup file backups versioning. |
|
|
|
;; Enable structured template completion |
|
|
|
;; Enable structured template completion |
|
|
|
(add-to-list 'org-modules 'org-tempo t) |
|
|
|
(add-to-list 'org-modules 'org-tempo t) |
|
|
|
(add-to-list 'org-structure-template-alist |
|
|
|
(add-to-list 'org-structure-template-alist |
|
|
|
'("el" . "src emacs-lisp")) |
|
|
|
'("el" . "src emacs-lisp"))) |
|
|
|
) |
|
|
|
|
|
|
|
#+END_SRC |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
*** Org Agenda |
|
|
|
*** Org Agenda |
|
|
@ -878,8 +895,7 @@ Setup file backups versioning. |
|
|
|
(setq org-agenda-files `(,org-directory ,user-emacs-directory)) |
|
|
|
(setq org-agenda-files `(,org-directory ,user-emacs-directory)) |
|
|
|
(setq org-agenda-span 14) |
|
|
|
(setq org-agenda-span 14) |
|
|
|
(setq org-agenda-window-setup 'current-window) |
|
|
|
(setq org-agenda-window-setup 'current-window) |
|
|
|
(evil-set-initial-state 'org-agenda-mode 'motion) |
|
|
|
(evil-set-initial-state 'org-agenda-mode 'motion)) |
|
|
|
) |
|
|
|
|
|
|
|
#+END_SRC |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
*** Org Keys |
|
|
|
*** Org Keys |
|
|
@ -888,8 +904,7 @@ Setup file backups versioning. |
|
|
|
(use-package org-keys |
|
|
|
(use-package org-keys |
|
|
|
:ensure nil |
|
|
|
:ensure nil |
|
|
|
:config |
|
|
|
:config |
|
|
|
(setq org-return-follows-link t) |
|
|
|
(setq org-return-follows-link t)) |
|
|
|
) |
|
|
|
|
|
|
|
#+END_SRC |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
*** Org Links |
|
|
|
*** Org Links |
|
|
@ -899,8 +914,7 @@ Setup file backups versioning. |
|
|
|
:ensure nil |
|
|
|
:ensure nil |
|
|
|
:config |
|
|
|
:config |
|
|
|
;; Do not open links to .org files in a split window |
|
|
|
;; Do not open links to .org files in a split window |
|
|
|
(add-to-list 'org-link-frame-setup '(file . find-file)) |
|
|
|
(add-to-list 'org-link-frame-setup '(file . find-file))) |
|
|
|
) |
|
|
|
|
|
|
|
#+END_SRC |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
*** Org Source Code Blocks |
|
|
|
*** Org Source Code Blocks |
|
|
@ -913,8 +927,7 @@ Setup file backups versioning. |
|
|
|
(setq org-src-fontify-natively t) |
|
|
|
(setq org-src-fontify-natively t) |
|
|
|
(setq org-src-preserve-indentation t) |
|
|
|
(setq org-src-preserve-indentation t) |
|
|
|
(setq org-src-tab-acts-natively t) |
|
|
|
(setq org-src-tab-acts-natively t) |
|
|
|
(setq org-src-window-setup 'current-window) |
|
|
|
(setq org-src-window-setup 'current-window)) |
|
|
|
) |
|
|
|
|
|
|
|
#+END_SRC |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
*** Org Export |
|
|
|
*** Org Export |
|
|
@ -925,8 +938,7 @@ Setup file backups versioning. |
|
|
|
:ensure nil |
|
|
|
:ensure nil |
|
|
|
:defer t |
|
|
|
:defer t |
|
|
|
:config |
|
|
|
:config |
|
|
|
(setq org-export-coding-system 'utf-8-unix) |
|
|
|
(setq org-export-coding-system 'utf-8-unix)) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Org latex exporter |
|
|
|
;; Org latex exporter |
|
|
|
(use-package ox-latex |
|
|
|
(use-package ox-latex |
|
|
@ -944,8 +956,7 @@ Setup file backups versioning. |
|
|
|
(add-to-list 'org-latex-pdf-process (replace-regexp-in-string |
|
|
|
(add-to-list 'org-latex-pdf-process (replace-regexp-in-string |
|
|
|
"%latex " |
|
|
|
"%latex " |
|
|
|
"%latex -shell-escape " |
|
|
|
"%latex -shell-escape " |
|
|
|
(car org-latex-pdf-process))) |
|
|
|
(car org-latex-pdf-process)))) |
|
|
|
) |
|
|
|
|
|
|
|
#+END_SRC |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
** Recentf |
|
|
|
** Recentf |
|
|
@ -959,8 +970,7 @@ Setup file backups versioning. |
|
|
|
(setq recentf-max-menu-items 0) |
|
|
|
(setq recentf-max-menu-items 0) |
|
|
|
(setq recentf-max-saved-items 200) |
|
|
|
(setq recentf-max-saved-items 200) |
|
|
|
(setq recentf-save-file (concat dot-cache-dir "/recentf")) |
|
|
|
(setq recentf-save-file (concat dot-cache-dir "/recentf")) |
|
|
|
(recentf-mode) |
|
|
|
(recentf-mode)) |
|
|
|
) |
|
|
|
|
|
|
|
#+END_SRC |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
** Tabs |
|
|
|
** Tabs |
|
|
@ -971,7 +981,7 @@ Setup file backups versioning. |
|
|
|
indent-tabs-mode t) |
|
|
|
indent-tabs-mode t) |
|
|
|
|
|
|
|
|
|
|
|
;; C/C++-like languages formatting style |
|
|
|
;; C/C++-like languages formatting style |
|
|
|
;https://www.emacswiki.org/emacs/IndentingC |
|
|
|
;; https://www.emacswiki.org/emacs/IndentingC |
|
|
|
(setq-default c-basic-offset 4 |
|
|
|
(setq-default c-basic-offset 4 |
|
|
|
sgml-basic-offset 4 |
|
|
|
sgml-basic-offset 4 |
|
|
|
c-default-style "linux") |
|
|
|
c-default-style "linux") |
|
|
@ -1191,6 +1201,9 @@ Functions that use package functionality. |
|
|
|
"Compile-Log\\|" |
|
|
|
"Compile-Log\\|" |
|
|
|
"Completions\\|" |
|
|
|
"Completions\\|" |
|
|
|
"clangd\\|" ; lsp c/c++ |
|
|
|
"clangd\\|" ; lsp c/c++ |
|
|
|
|
|
|
|
"dap-mouse\\|" |
|
|
|
|
|
|
|
"dap-ui-\\|" |
|
|
|
|
|
|
|
"Debug\\|" |
|
|
|
"Faces\\|" |
|
|
|
"Faces\\|" |
|
|
|
"Flycheck\\|" |
|
|
|
"Flycheck\\|" |
|
|
|
"Help\\|" |
|
|
|
"Help\\|" |
|
|
@ -1201,26 +1214,21 @@ Functions that use package functionality. |
|
|
|
"Org tags\\|" |
|
|
|
"Org tags\\|" |
|
|
|
"Org todo" |
|
|
|
"Org todo" |
|
|
|
"\\).*") |
|
|
|
"\\).*") |
|
|
|
name) |
|
|
|
name)))) |
|
|
|
))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun dot/centaur-tabs-buffer-cleanup () |
|
|
|
(defun dot/centaur-tabs-buffer-cleanup () |
|
|
|
"Clean up all the hidden buffers." |
|
|
|
"Clean up all the hidden buffers." |
|
|
|
(interactive) |
|
|
|
(interactive) |
|
|
|
(dolist (buffer (buffer-list)) |
|
|
|
(dolist (buffer (buffer-list)) |
|
|
|
(when (centaur-tabs-hide-tab buffer) |
|
|
|
(when (centaur-tabs-hide-tab buffer) |
|
|
|
(kill-buffer buffer)) |
|
|
|
(kill-buffer buffer)))) |
|
|
|
) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun dot/centaur-tabs-kill-buffer-or-window () |
|
|
|
(defun dot/centaur-tabs-kill-buffer-or-window () |
|
|
|
"Delete window of the current buffer, also kill if the buffer is hidden." |
|
|
|
"Delete window of the current buffer, also kill if the buffer is hidden." |
|
|
|
(interactive) |
|
|
|
(interactive) |
|
|
|
(if (centaur-tabs-hide-tab (buffer-name)) |
|
|
|
(if (centaur-tabs-hide-tab (buffer-name)) |
|
|
|
(kill-buffer-and-window) |
|
|
|
(kill-buffer-and-window) |
|
|
|
(delete-window)) |
|
|
|
(delete-window)))) |
|
|
|
) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
#+END_SRC |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
*** Dashboard Functions |
|
|
|
*** Dashboard Functions |
|
|
@ -1234,8 +1242,7 @@ Functions that use package functionality. |
|
|
|
(unless (get-buffer buffer) |
|
|
|
(unless (get-buffer buffer) |
|
|
|
(generate-new-buffer buffer) |
|
|
|
(generate-new-buffer buffer) |
|
|
|
(dashboard-refresh-buffer)) |
|
|
|
(dashboard-refresh-buffer)) |
|
|
|
(switch-to-buffer buffer))) |
|
|
|
(switch-to-buffer buffer)))) |
|
|
|
) |
|
|
|
|
|
|
|
#+END_SRC |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
Fix keybinds.. |
|
|
|
Fix keybinds.. |
|
|
@ -1377,8 +1384,7 @@ Vim equivalence: >gv" |
|
|
|
(bpref? (which-key--group-p (cdr bcons)))) |
|
|
|
(bpref? (which-key--group-p (cdr bcons)))) |
|
|
|
(if (not (eq apref? bpref?)) |
|
|
|
(if (not (eq apref? bpref?)) |
|
|
|
(and (not apref?) bpref?) |
|
|
|
(and (not apref?) bpref?) |
|
|
|
(which-key-key-order-alpha acons bcons)))) |
|
|
|
(which-key-key-order-alpha acons bcons))))) |
|
|
|
) |
|
|
|
|
|
|
|
#+END_SRC |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
* Advice and Aliases |
|
|
|
* Advice and Aliases |
|
|
|