Commit f42e42c4 authored by Benjamin James's avatar Benjamin James
Browse files

localized company mode

parent adf08e1c
(("~/Documents/RoamNotes/20210816015625-module_6.org" "062efe94-a41d-42de-88e5-57adee7f410d") ("~/Documents/RoamNotes/20210816015541-module_5.org" "814e2c11-28b0-4ab2-8655-87a0461e864d") ("~/Documents/RoamNotes/20210816015459-module_4.org" "7d3ffc1f-bf64-41fe-a70d-35c896e3f051") ("~/Documents/RoamNotes/20210816015321-module_3.org" "ce6238ca-b9b7-4ea5-8971-062b87073abf") ("~/Documents/RoamNotes/20210816015037-module_2.org" "8ce6d1d8-fa80-4927-9f15-c59dad56ed33") ("~/Documents/RoamNotes/20210816014944-module_1.org" "401638e3-127d-4c08-9772-54bdc82bbdca") ("~/Documents/RoamNotes/20210816013614-mechanics.org" "1c48b9f3-424c-4114-99f1-53273c351706") ("~/Documents/RoamNotes/20210816013420-collegenotes.org" "59dd1235-1ce9-405d-9e45-fdca6b0814c3") ("~/Documents/RoamNotes/20210816003157-electrical_and_electronics.org" "8864f06e-f8c3-48fb-ae2e-2ea3cecd4e7b") ("~/Documents/RoamNotes/20210816002403-cheatsheets.org" "3a9c3dc7-f4c3-4ed1-afd7-5a33189ff657"))
......@@ -13,6 +13,7 @@
(require 'helpful-rcp)
(require 'counsel-rcp)
(require 'org-rcp)
(require 'org-roam-rcp)
(require 'ivy-rcp)
(require 'snippets-rcp)
(require 'company-rcp)
......@@ -27,6 +28,7 @@
(require 'keybinds-rcp)
(require 'which-key-rcp)
(require 'spellcheck-rcp)
(require 'email-rcp)
#+end_src
* default-rcp
......@@ -73,6 +75,16 @@
(setq tabify-regexp "^\t* [ \t]+")
(fset 'yes-or-no-p 'y-or-n-p)
(setq require-final-newline t)
(setq next-line-add-newlines nil)
(setq message-log-max 100)
(require 'paren) (show-paren-mode t)
(provide 'default-rcp)
#+end_src
......@@ -117,8 +129,8 @@
;; Fonts
(defun daemon/set-font-faces ()
;; Transperent background
(set-frame-parameter (selected-frame) 'alpha '(90 50))
(add-to-list 'default-frame-alist '(alpha 90 50))
(set-frame-parameter (selected-frame) 'alpha '(90 90))
(add-to-list 'default-frame-alist '(alpha 90 90))
;; Setting default font
(set-face-attribute 'default nil
......@@ -156,19 +168,20 @@
#+begin_src emacs-lisp :tangle recipes/evil-rcp.el
(use-package undo-tree
:ensure t
:defer t
:init
(setq evil-undo-system 'undo-tree)
:config
(setq undo-limit 400000 ; 400kb (default is 160kb)
undo-strong-limit 3000000 ; 3mb (default is 240kb)
undo-outer-limit 48000000)) ; 48mb (default is 24mb)
undo-outer-limit 48000000) ; 48mb (default is 24mb)
(global-undo-tree-mode t))
(use-package evil
:ensure t
:defer t
:init
(setq evil-want-integration t)
(setq evil-want-fine-undo t)
(setq evil-want-keybinding t)
(setq evil-respect-visual-line-mode t)
(setq evil-want-fine-undo t)
......@@ -356,6 +369,22 @@
(provide 'org-rcp)
#+end_src
* Org roam
#+begin_src emacs-lisp :tangle recipes/org-roam-rcp.el
(use-package org-roam
:ensure t
:defer t
:init
(setq org-roam-v2-ack t)
:custom
(org-roam-directory "~/Documents/RoamNotes")
:bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n i" . org-roam-node-insert))
:config
(org-roam-setup))
(provide 'org-roam-rcp)
#+end_src
* Ivy
#+begin_src emacs-lisp :tangle recipes/ivy-rcp.el
(use-package ivy
......@@ -437,10 +466,33 @@
"Set up `company-mode' for `emacs-lisp-mode'."
(set (make-local-variable 'company-backends)
'((company-yasnippet
company-capf
company-elisp
company-dabbrev-code
company-files))))
(defun company-rustic-mode ()
"Set up `company-mode' for `rustic-mode'."
(set (make-local-variable 'company-backends)
'((company-yasnippet
company-capf
company-keywords
company-dabbrev-code
company-files))))
(defun company-cc-mode ()
"Set up `company-mode' for `c-common-mode'."
(set (make-local-variable 'company-backends)
'((company-yasnippet
company-capf
company-keywords
company-dabbrev-code
company-files))))
(add-hook 'emacs-lisp-mode-hook 'company-emacs-lisp-mode)
(add-hook 'rustic-mode-hook 'company-rustic-mode)
(add-hook 'c-mode 'company-cc-mode)
(add-hook 'c++-mode 'company-cc-mode)
(provide 'company-local-rcp)
#+end_src
......@@ -574,6 +626,18 @@
"|>" "<|" "||>" "<||" "|||>" "<|>" ".=" "..<" ".?" "::" ":::"
":=" "::=" ":?" ":?>" "/=" "//=" "/==" "__"))
(defvar ligatures-JetBrainsMono-cc
'("--" "---" "==" "===" "!=" "!==" "=!=" "=:=" "=/=" "<=" ">=" "&&" "&&&" "&=" "++" "+++"
;;"***" ";;" "!!" "??" "?:" "?." "?=" "<:" ":<" ":>" ">:" "<>" "<<<" ">>>" "<<" ">>" "||" "-|"
;;"_|_" "|-" "||-" "|=" "||=" "##" "###" "####" "#{" ":[" "]#" "#(" "#?" "#_" "#_(" "#:"
;;"#!" "#=" "^=" "<$>" "<$" "$>" "<+>" "<+ +>" "</" "</>" "/>" "<!--"
;;"<#--" "-->" "->" "->>" "<<-" "<-" "<=<" "=<<" "<<=" "<==" "<=>" "<==>" "==>" "=>"
;;"=>>" ">=>" ">>=" ">>-" ">-" ">--" "-<" "-<<" ">->" "<-<" "<-|" "<=|" "|=>" "|->" "<-"
;;"<~~" "<~" "<~>" "~~" "~~>" "~>" "~-" "-~" "~@" "[||]" "|]" "[|" "|}" "{|" "[< >]"
;;"|>" "<|" "||>" "<||" "|||>" "<|||" "<|>" "..." ".." ".=" ".-" "..<" ".?" "::" ":::"
;;":=" "::=" ":?" ":?>" "//" "///" "/*" "*/" "/=" "//=" "/==" "@_" "__"
))
(use-package ligature
;; git repo [https://github.com/mickeynp/ligature.el.git]
:load-path "/home/simson/.config/emacs/ligature.el"
......@@ -582,7 +646,9 @@
(ligature-set-ligatures 'rustic-mode ligatures-JetBrainsMono-rust)
(ligature-set-ligatures 'text-mode ligatures-JetBrainsMono-rust)
(ligature-set-ligatures 'emacs-lisp-mode ligatures-JetBrainsMono-rust)
(global-ligature-mode t))
(ligature-set-ligatures 'c-mode ligatures-JetBrainsMono-cc)
(ligature-set-ligatures 'c++-mode ligatures-JetBrainsMono-cc)
(global-ligature-mode 1))
(provide 'ligatures-rcp)
#+end_src
......@@ -606,3 +672,31 @@
(dired-async-mode 1))
(provide 'async-rcp)
#+end_src
* Email
#+begin_src emacs-lisp :tangle recipes/email-rcp.el
(use-package mu4e
:load-path "/usr/share/emacs/site-lisp/mu4e/"
:config
(setq mu4e-change-filenames-when-moving t)
(setq mu4e-update-interval (* 10 60))
(setq mu4e-get-mail-command "mbsync -a")
(setq mu4e-maildir "~/Mail")
(setq mu4e-drafts-folder "/[Gmail]/Drafts")
(setq mu4e-sent-folder "/[Gmail]/Sent Mail")
(setq mu4e-refile-folder "/[Gmail]/All Mail")
(setq mu4e-trash-folder "/[Gmail]/Trash")
(setq mu4e-maildir-shortcuts
'(("/Inbox" . ?i)
("/[Gmail]/Sent Mail" . ?s)
("/[Gmail]/Trash" . ?t)
("/[Gmail]/Drafts" . ?d)
("/[Gmail]/All Mail" . ?a)
("/[Gmail]/Important" . ?m)
("/[Gmail]/Stared" . ?p))))
(provide 'email-rcp)
#+end_src
;;;; Emacs Bookmark Format Version 1 ;;;; -*- coding: utf-8-emacs -*-
;;; This format is meant to be slightly human-readable;
;;; nevertheless, you probably don't want to edit it.
;;; -*- End Of Bookmark File Format Version Stamp -*-
(("org-capture-last-stored"
(filename . "~/Documents/RoamNotes/20210816015625-module_6.org")
(front-context-string . "This is the Engi")
(rear-context-string . "title: Module 6\n")
(position . 86))
)
mbsync
ls
clear
clear
......@@ -8,6 +8,7 @@
(require 'helpful-rcp)
(require 'counsel-rcp)
(require 'org-rcp)
(require 'org-roam-rcp)
(require 'ivy-rcp)
(require 'snippets-rcp)
(require 'company-rcp)
......@@ -22,3 +23,4 @@
(require 'keybinds-rcp)
(require 'which-key-rcp)
(require 'spellcheck-rcp)
(require 'email-rcp)
File added
......@@ -2,9 +2,32 @@
"Set up `company-mode' for `emacs-lisp-mode'."
(set (make-local-variable 'company-backends)
'((company-yasnippet
company-capf
company-elisp
company-dabbrev-code
company-files))))
(defun company-rustic-mode ()
"Set up `company-mode' for `rustic-mode'."
(set (make-local-variable 'company-backends)
'((company-yasnippet
company-capf
company-keywords
company-dabbrev-code
company-files))))
(defun company-cc-mode ()
"Set up `company-mode' for `c-common-mode'."
(set (make-local-variable 'company-backends)
'((company-yasnippet
company-capf
company-keywords
company-dabbrev-code
company-files))))
(add-hook 'emacs-lisp-mode-hook 'company-emacs-lisp-mode)
(add-hook 'rustic-mode-hook 'company-rustic-mode)
(add-hook 'c-mode 'company-cc-mode)
(add-hook 'c++-mode 'company-cc-mode)
(provide 'company-local-rcp)
......@@ -40,4 +40,14 @@
(setq tabify-regexp "^\t* [ \t]+")
(fset 'yes-or-no-p 'y-or-n-p)
(setq require-final-newline t)
(setq next-line-add-newlines nil)
(setq message-log-max 100)
(require 'paren) (show-paren-mode t)
(provide 'default-rcp)
(use-package mu4e
:load-path "/usr/share/emacs/site-lisp/mu4e/"
:config
(setq mu4e-change-filenames-when-moving t)
(setq mu4e-update-interval (* 10 60))
(setq mu4e-get-mail-command "mbsync -a")
(setq mu4e-maildir "~/Mail")
(setq mu4e-drafts-folder "/[Gmail]/Drafts")
(setq mu4e-sent-folder "/[Gmail]/Sent Mail")
(setq mu4e-refile-folder "/[Gmail]/All Mail")
(setq mu4e-trash-folder "/[Gmail]/Trash")
(setq mu4e-maildir-shortcuts
'(("/Inbox" . ?i)
("/[Gmail]/Sent Mail" . ?s)
("/[Gmail]/Trash" . ?t)
("/[Gmail]/Drafts" . ?d)
("/[Gmail]/All Mail" . ?a)
("/[Gmail]/Important" . ?m)
("/[Gmail]/Stared" . ?p))))
(provide 'email-rcp)
(use-package undo-tree
:ensure t
:defer t
:init
(setq evil-undo-system 'undo-tree)
:config
(setq undo-limit 400000 ; 400kb (default is 160kb)
undo-strong-limit 3000000 ; 3mb (default is 240kb)
undo-outer-limit 48000000)) ; 48mb (default is 24mb)
undo-outer-limit 48000000) ; 48mb (default is 24mb)
(global-undo-tree-mode t))
(use-package evil
:ensure t
:defer t
:init
(setq evil-want-integration t)
(setq evil-want-fine-undo t)
(setq evil-want-keybinding t)
(setq evil-respect-visual-line-mode t)
(setq evil-want-fine-undo t)
......
......@@ -31,6 +31,18 @@
"|>" "<|" "||>" "<||" "|||>" "<|>" ".=" "..<" ".?" "::" ":::"
":=" "::=" ":?" ":?>" "/=" "//=" "/==" "__"))
(defvar ligatures-JetBrainsMono-cc
'("--" "---" "==" "===" "!=" "!==" "=!=" "=:=" "=/=" "<=" ">=" "&&" "&&&" "&=" "++" "+++"
;;"***" ";;" "!!" "??" "?:" "?." "?=" "<:" ":<" ":>" ">:" "<>" "<<<" ">>>" "<<" ">>" "||" "-|"
;;"_|_" "|-" "||-" "|=" "||=" "##" "###" "####" "#{" ":[" "]#" "#(" "#?" "#_" "#_(" "#:"
;;"#!" "#=" "^=" "<$>" "<$" "$>" "<+>" "<+ +>" "</" "</>" "/>" "<!--"
;;"<#--" "-->" "->" "->>" "<<-" "<-" "<=<" "=<<" "<<=" "<==" "<=>" "<==>" "==>" "=>"
;;"=>>" ">=>" ">>=" ">>-" ">-" ">--" "-<" "-<<" ">->" "<-<" "<-|" "<=|" "|=>" "|->" "<-"
;;"<~~" "<~" "<~>" "~~" "~~>" "~>" "~-" "-~" "~@" "[||]" "|]" "[|" "|}" "{|" "[< >]"
;;"|>" "<|" "||>" "<||" "|||>" "<|||" "<|>" "..." ".." ".=" ".-" "..<" ".?" "::" ":::"
;;":=" "::=" ":?" ":?>" "//" "///" "/*" "*/" "/=" "//=" "/==" "@_" "__"
))
(use-package ligature
;; git repo [https://github.com/mickeynp/ligature.el.git]
:load-path "/home/simson/.config/emacs/ligature.el"
......@@ -39,6 +51,8 @@
(ligature-set-ligatures 'rustic-mode ligatures-JetBrainsMono-rust)
(ligature-set-ligatures 'text-mode ligatures-JetBrainsMono-rust)
(ligature-set-ligatures 'emacs-lisp-mode ligatures-JetBrainsMono-rust)
(global-ligature-mode t))
(ligature-set-ligatures 'c-mode ligatures-JetBrainsMono-cc)
(ligature-set-ligatures 'c++-mode ligatures-JetBrainsMono-cc)
(global-ligature-mode 1))
(provide 'ligatures-rcp)
(use-package org-roam
:ensure t
:defer t
:init
(setq org-roam-v2-ack t)
:custom
(org-roam-directory "~/Documents/RoamNotes")
:bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n i" . org-roam-node-insert))
:config
(org-roam-setup))
(provide 'org-roam-rcp)
......@@ -15,8 +15,8 @@
;; Fonts
(defun daemon/set-font-faces ()
;; Transperent background
(set-frame-parameter (selected-frame) 'alpha '(90 50))
(add-to-list 'default-frame-alist '(alpha 90 50))
(set-frame-parameter (selected-frame) 'alpha '(90 90))
(add-to-list 'default-frame-alist '(alpha 90 90))
;; Setting default font
(set-face-attribute 'default nil
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment