Last active
December 16, 2021 11:41
-
-
Save yantar92/bc5f81a6cf2644fc1dfa67e8cdd01093 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 '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/lazy-load/treemacs/src/elisp") | |
(add-to-list 'load-path "~/.emacs.d/lisp") | |
(add-to-list 'load-path "~/.emacs.d/evil") | |
(add-to-list 'load-path "~/.emacs.d/ivy") | |
(add-to-list 'load-path "~/.emacs.d/lazy-load/org-mode/lisp") | |
(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") | |
(add-to-list 'load-path "~/.emacs.d/lazy-load/flycheck") | |
;; (add-to-list 'load-path "~/.emacs.d/lazy-load/flycheck-clangcheck") | |
(add-to-list 'load-path "~/.emacs.d/lazy-load/company-mode") | |
;; (add-to-list 'load-path "~/.emacs.d/lazy-load/company-quickhelp") | |
(add-to-list 'load-path "~/.emacs.d/lazy-load/lsp-ui") | |
(add-to-list 'load-path "~/.emacs.d/lazy-load/lsp-mode") | |
(add-to-list 'load-path "~/.emacs.d/lazy-load/lsp-mode/clients") | |
(add-to-list 'load-path "~/.emacs.d/lazy-load/lsp-treemacs") | |
(eval-and-compile (add-to-list 'load-path "~/.emacs.d/emacs-dashboard")) | |
(setq recentf-auto-cleanup 10) | |
(require 'dashboard) | |
(setq dashboard-set-heading-icons t) | |
(setq dashboard-set-file-icons t) | |
(setq dashboard-item-generators '(;; (recents . dashboard-insert-recents) | |
(bookmarks . dashboard-insert-bookmarks) | |
(projects . dashboard-insert-projects) | |
;; (agenda . dashboard-insert-agenda) | |
(registers . dashboard-insert-registers))) | |
(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 | |
(eval-when-compile (load "~/.emacs.d/early-init.el")) | |
(defun treemacs () | |
"Lazy-load treemacs" | |
(interactive) | |
(require 'treemacs) | |
(treemacs) | |
(when (boundp 'lsp-mode) (load-lsp-treemacs))) | |
(require 'undo-tree) | |
(setq undo-tree-auto-safe-history t) | |
(global-undo-tree-mode +1) | |
;; This will try to execute lambda every single 0.1 sec of idle time. Ever | |
;; while Emacs is runnig... I was wrong thoug. Missed second argument. | |
(run-with-idle-timer 0.1 nil (lambda () | |
(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 () | |
(require 'ivy) | |
(ivy-mode))) | |
(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) | |
(require 'tree-sitter) | |
(require 'tree-sitter-hl) | |
(require 'tree-sitter-langs) | |
(require 'tree-sitter-debug) | |
(require 'tree-sitter-query)) | |
(tree-sitter-mode +1) | |
(tree-sitter-hl-mode +1)) | |
;;(defun load-clang-lsp () | |
;; (unless (boundp 'flycheck-clangcheck-analyze) | |
;; (load-flycheck) | |
;; (load-lsp) | |
;; (load-tree-sitter) | |
;; (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) | |
(require 'flycheck)) | |
(flycheck-mode +1)) | |
(setq company-minimum-prefix-length 1) | |
(defun load-company () | |
(unless (boundp 'company-mode) | |
(require 'company) | |
;;(require 'company-quickhelp) | |
;;(company-quickhelp-mode +1) | |
) | |
(company-mode +1)) | |
(defun load-lsp-ui () | |
(unless (boundp 'lsp-ui-mode) | |
(require '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) | |
(require 'lsp-lens) | |
(require 'lsp-modeline) | |
(require 'lsp-headerline) | |
(require 'lsp-diagnostics) | |
(require 'lsp-completion) | |
(require 'lsp-dired) | |
(require 'lsp-icons) | |
(require 'lsp-protocol) | |
(require 'lsp-semantic-tokens) | |
(require 'lsp-mode)) | |
(load-lsp-ui) | |
(lsp-deferred)) | |
(defun 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")) | |
; Autosave doesn't really autosave, but instead makes *do not save this buffer* | |
; actually save the buffer anyway. | |
; While that is really hilarious, it's very annoying. | |
(setq auto-save-default nil) | |
(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