Skip to content

Instantly share code, notes, and snippets.

@mateusfccp
Created September 7, 2022 23:12
Show Gist options
  • Save mateusfccp/63bfd981ae801d981b678fbfd8f60849 to your computer and use it in GitHub Desktop.
Save mateusfccp/63bfd981ae801d981b678fbfd8f60849 to your computer and use it in GitHub Desktop.
init.el
;;; init.el --- My personal, self-containting init.el
;;; Commentary:
;;; Code:
;; Style
(set-frame-font "Fira Code 12" nil t)
;; straight.el bootstrap
(defvar straight-use-package-by-default 'true)
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
;; General
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
(setq ring-bell-function 'ignore)
(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
;; Packages
(straight-use-package 'use-package)
;; Guru mode
(use-package guru-mode
:config (guru-global-mode +1))
;; Projectile
(use-package projectile
:init (projectile-mode +1)
:bind (("s-p" . projectile-command-map)
("C-c p" . projectile-command-map)
:map projectile-mode-map))
;; expand-region
(use-package expand-region
:bind ("C-=" . er/expand-region))
;; visual-regexp-search
(use-package visual-regexp-steroids
:bind (("C-c r" . vr/replace)
("C-c q" . vr/query-replace)
("C-c m" . vr/mc-mark)
("C-r" . vr/isearch-backward)
("C-s" . vr/isearch-forward)))
;; diff-hl
(use-package diff-hl
:config (global-diff-hl-mode))
;; Smartparens
(use-package smartparens
:config (smartparens-global-mode t))
;; Theme
(use-package dracula-theme
:config (load-theme 'dracula t))
;; Magit
(use-package magit)
;; Dart
(use-package dart-mode)
;; Json
(use-package json-mode)
;; Yaml
(use-package yaml-mode)
;; Yasnippet
(use-package yasnippet)
;; Company
(use-package company)
;; Flycheck
(use-package flycheck
:config (global-flycheck-mode))
;; LSP
(use-package lsp-mode
:init (setq lsp-keymap-prefix "C-c l")
:hook ((dart-mode . lsp)
(lsp-mode . lsp-enable-which-key-integration))
:commands lsp)
(setq
company-minimum-prefix-length 1
gc-cons-threshold (* 100 1024 1024)
lsp-lens-enable nil
lsp-ui-doc-show-with-mouse nil
lsp-signature-auto-activate nil
read-process-output-max (* 2 1024 1024))
(use-package lsp-ui :commands lsp-ui-mode)
(use-package lsp-dart)
(use-package lsp-treemacs :commands lsp-treemacs-errors-list)
(use-package dap-mode)
(use-package which-key
:config (which-key-mode))
;; Generated
(custom-set-variables
'(warning-suppress-types '((comp))))
;;; init.el ends here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment