Created
December 19, 2021 20:28
-
-
Save matyklug18/37559537150d8581d0cd169b487b2b37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq gc-cons-threshold (* (expt 1024 3) 1)) ; 1 GB | |
(setq read-process-output-max (* (expt 1024 2) 1)) ; 1 MB | |
(add-to-list 'load-path "~/.emacs.d/lazy-load/org-mode/lisp") | |
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes") | |
(load-theme 'dracula t) | |
(tool-bar-mode -1) | |
;(add-to-list 'load-path "~/.emacs.d/all-the-icons") | |
;(load "all-the-icons") | |
(add-to-list 'load-path "~/.emacs.d/emacs-dashboard") | |
(require 'dashboard) | |
(setq dashboard-set-heading-icons t) | |
(setq dashboard-set-file-icons t) | |
(dashboard-setup-startup-hook) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; DONT FORGET TO RECOMPILE AGAIN | |
(defun treemacs () | |
"Lazy-load treemacs" | |
(interactive) | |
(add-to-list 'load-path "~/.emacs.d/lazy-load/treemacs/src/elisp") | |
(require 'treemacs) | |
(treemacs) | |
(when (boundp 'lsp-mode) (load-lsp-treemacs))) | |
(add-to-list 'load-path "~/.emacs.d/lisp") | |
(require 'undo-tree) | |
(setq undo-tree-auto-safe-history t) | |
(global-undo-tree-mode) | |
(run-with-idle-timer 0.1 nil (lambda () | |
(add-to-list 'load-path "~/.emacs.d/evil") | |
(require 'evil) | |
(setq evil-want-fine-undo t) | |
(evil-set-undo-system 'undo-tree) | |
(evil-mode t))) | |
(run-with-idle-timer 0.1 nil (lambda () | |
(add-to-list 'load-path "~/.emacs.d/ivy") | |
(require 'ivy) | |
(ivy-mode))) | |
(setq org-agenda-files '("~/.emacs.d/org-agenda/")) | |
(add-hook 'org-mode-hook (lambda () | |
(add-to-list 'load-path "~/.emacs.d/lazy-load/org-mode/lisp") | |
(load "oc") | |
(load "org-compat") | |
(load "org-element") | |
(load "org"))) | |
(setq custom-file (concat user-emacs-directory "/custom.el")) | |
(load-file custom-file) | |
(savehist-mode t) | |
(setq revert-without-query '(".pdf")) | |
(defun load-tree-sitter () | |
(unless (boundp 'tree-sitter-mode) | |
(add-to-list 'load-path "~/.emacs.d/elisp-tree-sitter/core") | |
(add-to-list 'load-path "~/.emacs.d/elisp-tree-sitter/lisp") | |
(add-to-list 'load-path "~/.emacs.d/elisp-tree-sitter/langs") | |
(require 'tree-sitter) | |
(require 'tree-sitter-hl) | |
(require 'tree-sitter-langs) | |
(require 'tree-sitter-debug) | |
(require 'tree-sitter-query)) | |
(tree-sitter-mode) | |
(tree-sitter-hl-mode)) | |
;(defun load-clang-lsp () | |
; (unless (boundp 'flycheck-clangcheck-analyze) | |
; (load-flycheck) | |
; (load-lsp) | |
; (load-tree-sitter) | |
; (add-to-list 'load-path "~/.emacs.d/lazy-load/flycheck-clangcheck") | |
; (require 'flycheck-clangcheck) | |
; (flycheck-set-checker-executable 'c/c++-clangcheck | |
; "/usr/bin/clang-check") | |
; (flycheck-select-checker 'c/c++-clangcheck) | |
; (setq flycheck-clangcheck-analyze t))) | |
(defun load-flycheck () | |
(unless (boundp 'flycheck-mode) | |
(add-to-list 'load-path "~/.emacs.d/lazy-load/flycheck") | |
(require 'flycheck)) | |
(flycheck-mode)) | |
(defun load-company () | |
(unless (boundp 'company-mode) | |
(add-to-list 'load-path "~/.emacs.d/lazy-load/company-mode") | |
;(add-to-list 'load-path "~/.emacs.d/lazy-load/company-quickhelp") | |
(require 'company) | |
;(require 'company-quickhelp) | |
;(company-quickhelp-mode) | |
(setq company-minimum-prefix-length 1)) | |
(company-mode)) | |
(defun load-lsp-ui () | |
(unless (boundp 'lsp-ui-mode) | |
(add-to-list 'load-path "~/.emacs.d/lazy-load/lsp-ui") | |
(load "lsp-ui") | |
;(lsp-ui-sideline) | |
(setq lsp-ui-doc-enable t) | |
(setq lsp-ui-sideline-show-hover t) | |
;(lsp-ui-doc-show) | |
(setq lsp-ui-sideline-update-mode 'line))) | |
(defun load-lsp () | |
(load-flycheck) | |
(load-company) | |
(unless (boundp 'lsp-mode) | |
(add-to-list 'load-path "~/.emacs.d/lazy-load/lsp-mode") | |
(add-to-list 'load-path "~/.emacs.d/lazy-load/lsp-mode/clients") | |
(load "lsp-lens") | |
(load "lsp-modeline") | |
(load "lsp-headerline") | |
(load "lsp-diagnostics") | |
(load "lsp-completion") | |
(load "lsp-dired") | |
(load "lsp-icons") | |
(load "lsp-protocol") | |
(load "lsp-semantic-tokens") | |
(load "lsp-mode")) | |
(load-lsp-ui) | |
(lsp-deferred)) | |
(defun load-lsp-treemacs () | |
(add-to-list 'load-path "~/.emacs.d/lazy-load/lsp-treemacs") | |
(require 'lsp-treemacs) | |
(lsp-treemacs-sync-mode t) | |
(lsp-treemacs-generic-mode t)) | |
(add-hook 'c-mode-hook 'load-tree-sitter) | |
(add-hook 'c-mode-hook 'load-lsp) | |
;(add-hook 'c-mode-hook 'load-clang-lsp) | |
(add-hook 'emacs-lisp-mode-hook 'load-company) | |
;(setq backup-directory-alist | |
; (concat user-emacs-directory "backups")) | |
(setq-default c-basic-offset 2 | |
tab-width 2 | |
indent-tabs-mode t) | |
(setq user-full-name "Mathias Klug") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment