Code Monkey home page Code Monkey logo

emacs_config's Introduction

My emacs config

Some notes

After copying this config you need to install use-package via M-x package-install

My own variables

Some initial necessary shit

(menu-bar-mode -1)                    ; Le classique
(tool-bar-mode -1)                   ; Le classique
(scroll-bar-mode -1)                  ; Le classique
(global-display-line-numbers-mode 1)  ; Display numbers on lines
(windmove-default-keybindings)        ; thing for moving around windows
(setq-default  cursor-type 'bar)      ; No comments ;)
(global-hl-line-mode t)               ; highlight for current line

(set-face-attribute 'default nil :family "JetBrainsMono Nerd Font")
(set-face-attribute 'default nil :height 120)

For enabling melpa

(require 'package)
(add-to-list 'package-archives
	       '("melpa" . "https://melpa.org/packages/")
	       '("melpa-stable" . "http://stable.melpa.org/packages/"))

Language stuff

;; Rust
(use-package rust-mode
  :config
  (setq rust-format-on-save t)
  (define-key rust-mode-map (kbd "C-c C-c") 'rust-run))

;; Python 
(use-package python-mode
  :ensure t)

;; Web development
(use-package web-mode
  :ensure t)

(use-package emmet-mode
  :ensure t)

(use-package js2-mode
  :ensure t)

(use-package php-mode
  :ensure t)

LSP

(use-package lsp-mode
  :init (setq lsp-keymap-prefix "C-c l")
  :hook ((rust-mode . lsp)
	   (python-mode . lsp)
	   (web-mode . lsp)
	   (php-mode . lsp)
	   (swift-mode . lsp)
	   ;; if you want which-key integration
	   (lsp-mode . lsp-enable-which-key-integration))
  :config (lsp-treemacs-sync-mode 1)
  :commands lsp)

(use-package lsp-ui
  :commands lsp-ui-mode)
(use-package helm-lsp
  :commands helm-lsp-workspace-symbol)
(use-package lsp-treemacs
  :commands lsp-treemacs-errors-list)

Some personalisation

Documentation for ef-themes: https://protesilaos.com/emacs/ef-themes#h:ac76ded0-af9b-4566-aff9-75142ef2d4ef

;; ef-themes (from modus author)
;;  (use-package ef-themes							 ;;
;;    :config									 ;;
;;    (setq ef-themes-mixed-fonts t						 ;;
;; 	 ef-themes-variable-pitch-ui t						 ;;
;; 	 ef-themes-headings							 ;;
;; 	 '((0 . (variable-pitch light 1.9))					 ;;
;; 	   (1 . (variable-pitch light 1.8))					 ;;
;; 	   (2 . (variable-pitch regular 1.7))					 ;;
;; 	   (3 . (variable-pitch regular 1.6))					 ;;
;; 	   (4 . (variable-pitch regular 1.5))					 ;;
;; 	   (5 . (variable-pitch 1.4)) ; absence of weight means `bold'		 ;;
;; 	   (6 . (variable-pitch 1.3))						 ;;
;; 	   (7 . (variable-pitch 1.2))						 ;;
;; 	   (t . (variable-pitch 1.1)))))					 ;;
;; 										 ;;
;; ;;  Doom themes								 ;;
(use-package doom-themes
  :config
  (setq doom-themes-enable-bold t
	  doom-themes-enable-italic t)
  (load-theme 'doom-dracula t)
  (doom-themes-visual-bell-config)
  (setq doom-themes-treemacs-theme "doom-atom") 
  (doom-themes-treemacs-config)
  (doom-themes-org-config))

;; (defun my/apply-theme (appearance)
;;   "Load theme, taking current system APPEARANCE into consideration."
;;   (mapc #'disable-theme custom-enabled-themes)
;;   (pcase appearance
;; 	('light (load-theme 'ef-summer t))
;; 	('dark (load-theme 'ef-winter t))))

;; (add-hook 'ns-system-appearance-change-functions #'my/apply-
;; theme)

;; Doom modeline
(use-package doom-modeline
  :init (doom-modeline-mode)
  :custom
  ;; (doom-modeline-major-mode-icon t)
  (doom-modeline-major-mode-color-icon nil)
  (doom-modeline-icon (display-graphic-p))
  (doom-modeline-buffer-modification-icon t)
  (doom-modeline-flycheck-icon t)
  (doom-modeline-checker-simple-format t)
  (doom-modeline-buffer-encoding t)
  (doom-modeline-height 30))

(use-package all-the-icons
  :ensure t)

(use-package nyan-mode
  :init (nyan-mode))

(use-package fancy-battery
  :init (fancy-battery-mode)
  :config (setq fancy-battery-show-percentage t))

Some useful packages

;; Treemacs
(use-package treemacs
  :ensure t)

;; Autocomplete for emacs
(use-package helm
  :init (helm-mode t)
  :config
  (global-set-key (kbd "M-x") 'helm-M-x))

;; Better dired
(use-package dirvish
  :init (dirvish-override-dired-mode))

(use-package company					        
  :config (add-hook 'after-init-hook 'global-company-mode))

(use-package company-box
  :hook (company-mode . company-box-mode))

(use-package which-key
  :config
  (which-key-mode))

(use-package vterm
  :commands vterm
  :config
  (setq term-prompt-regexp "^[^#$%>\n]*[#$%>] *")  ;; Set this to match your custom shell prompt
  (setq vterm-max-scrollback 10000))

Org mode

Some list:

  • [ ] Some entry
    • [X] jskfjdk
 '(org-hide-emphasis-markers t)

 (font-lock-add-keywords
    'org-mode
    '(("^ *\\([-]\\) "
	(0 (prog1 () (compose-region (match-beginning 1) (match-end 1) ""))))))

 (use-package org-bullets
     :after org
     :hook
     (org-mode . (lambda () (org-bullets-mode 1))))

 '(org-mode . '(lambda ()
		  "Beautify Org Checkbox Symbol"
		  (push '("[ ]" . "" ) prettify-symbols-alist)
		  (push '("[X]" . "" ) prettify-symbols-alist)
		  (push '("[-]" . "" ) prettify-symbols-alist)
		  (prettify-symbols-mode)))

 '(prettify-symbols-unprettify-at-point 'right-edge)

 (defface org-checkbox-done-text
   '((t (:foreground "#71696A" :strike-through t)))
   "Face for the text part of a checked org-mode checkbox.")

 ;; (font-lock-add-keywords
 ;;  'org-mode
 ;;  `(("^[ \t]*\\(?:[-+*]\\|[0-9]+[).]\\)[ \t]+\\(\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[\\(?:X\\|\\([0-9]+\\)/\\2\\)\\][^\n]*\n\\)"
 ;;     1 'org-checkbox-done-text prepend))
 ;;  'append)

Some writing stuff

(use-package markdown-mode
  :ensure t)
  ;; :config (setq markdown-css-paths '("~/.emacs.d/custom-md-css/default.css")))

;; For converting markdown and org files to pdf
(use-package pandoc-mode
  :ensure t)

;; Idk why it's here, but why not lol
(use-package pdf-tools
  :ensure t)

;; Preview for org files
(use-package org-preview-html
  :ensure t)

;; Preview for markdown
(use-package grip-mode
  :config (setq grip-preview-use-webkit t))

emacs_config's People

Contributors

pol1n04ka avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.