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