Added ivy, projectile + org-roam.

master
Rostyslav Hnatyshyn 3 years ago
parent b15148f63a
commit 5becb71af6
  1. 2
      bashrc
  2. 65
      emacs
  3. 4
      emacs_home.el
  4. 3
      emacs_work.el
  5. 76
      emacs~
  6. 0
      install.sh

@ -9,7 +9,7 @@ if [[ -f ~/.bash_home ]]; then
fi fi
# later switch to emacs client when the emacs server is running # later switch to emacs client when the emacs server is running
alias emacs='emacsclient -ct' alias emacs='emacsclient -ct --eval "(load \"~/.emacs\")"'
alias ls='ls --color=auto' alias ls='ls --color=auto'
alias diff='diff --color=auto' alias diff='diff --color=auto'
alias grep='grep --color=auto' alias grep='grep --color=auto'

65
emacs

@ -1,5 +1,7 @@
(require 'package) (require 'package)
;; fixing broken emacsclient config: emacsclient --eval "(load "~/.emacs")"
(add-to-list 'package-archives '("elpa" . "https://tromey.com/elpa/") t) (add-to-list 'package-archives '("elpa" . "https://tromey.com/elpa/") t)
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/") t) (add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/") t)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
@ -43,7 +45,7 @@ Return a list of installed packages or nil for every skipped package."
(or (file-exists-p package-user-dir) (or (file-exists-p package-user-dir)
(package-refresh-contents)) (package-refresh-contents))
(ensure-package-installed 'use-package 'smex 'magit 'centaur-tabs 'eglot 'telephone-line 'dashboard 'multiple-cursors 'flycheck 'which-key 'restart-emacs 'doom-themes 'rainbow-mode 'rainbow-delimiters 'neotree 'all-the-icons 'elpy 'rustic 'simpleclip 'messages-are-flowing 'hl-todo 'format-all 'auctex) (ensure-package-installed 'use-package 'ivy 'magit 'centaur-tabs 'eglot 'telephone-line 'dashboard 'multiple-cursors 'flycheck 'which-key 'restart-emacs 'doom-themes 'rainbow-mode 'rainbow-delimiters 'neotree 'all-the-icons 'elpy 'rustic 'simpleclip 'messages-are-flowing 'hl-todo 'format-all 'auctex 'counsel 'swiper 'projectile 'org-roam)
(use-package company) (use-package company)
(add-hook 'after-init-hook 'global-company-mode) (add-hook 'after-init-hook 'global-company-mode)
@ -65,9 +67,6 @@ Return a list of installed packages or nil for every skipped package."
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode) (add-hook 'prog-mode-hook #'rainbow-delimiters-mode)
(add-hook 'css-mode-hook #'rainbow-mode) (add-hook 'css-mode-hook #'rainbow-mode)
(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "M-X") 'smex-major-mode-commands)
(require 'telephone-line) (require 'telephone-line)
(telephone-line-mode 1) (telephone-line-mode 1)
(when (fboundp 'windmove-default-keybindings) (when (fboundp 'windmove-default-keybindings)
@ -77,15 +76,14 @@ Return a list of installed packages or nil for every skipped package."
(which-key-mode) (which-key-mode)
(use-package dashboard (use-package dashboard
:ensure t :init
:config (dashboard-setup-startup-hook)
(setq dashboard-set-footer nil (setq dashboard-set-footer nil
dashboard-org-agenda-categories '("Tasks" "appointments") dashboard-org-agenda-categories '("Tasks" "appointments")
dashboard-center-content t)) dashboard-center-content t
dashboard-set-heading-icons t
(setq dashboard-set-heading-icons t) dashboard-set-file-icons t)
(setq dashboard-set-file-icons t) :ensure t
(setq dashboard-set-navigator t) :config (dashboard-setup-startup-hook))
(require 'multiple-cursors) (require 'multiple-cursors)
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines) (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
@ -102,6 +100,49 @@ Return a list of installed packages or nil for every skipped package."
:init :init
(advice-add 'python-mode :before 'elpy-enable)) (advice-add 'python-mode :before 'elpy-enable))
(use-package ivy :ensure t
:diminish ivy-mode
:init (setq projectile-completion-system 'ivy)
:config
(ivy-mode 1)
(setq ivy-height 13)
(setq ivy-wrap t)
(setq ivy-use-virtual-buffers t)
(setq ivy-count-format "(%d/%d) "))
(use-package counsel
:ensure t
:bind*
(("M-x" . counsel-M-x)
("C-c d d" . counsel-descbinds)
("C-c s s" . counsel-ag)
("C-c s d" . counsel-ag-projectile)
("C-x C-f" . counsel-find-file)
("C-x r f" . counsel-recentf)
("C-c g g" . counsel-git)
("C-c g G" . counsel-git-grep)
("C-x l" . counsel-locate)
("C-c g s" . counsel-grep-or-swiper)
("C-M-y" . counsel-yank-pop)
("C-c C-r" . ivy-resume)
("C-c i m" . counsel-imenu)
("C-c i M" . ivy-imenu-anywhere)
("C-c d s" . describe-symbol)))
(use-package swiper
:bind*
(("C-s" . swiper)))
(setq search-default-mode #'char-fold-to-regexp)
(use-package projectile
:ensure t
:init
(projectile-mode +1)
:bind (:map projectile-mode-map
("s-p" . projectile-command-map)
("C-c p" . projectile-command-map)))
(global-hl-todo-mode 1) (global-hl-todo-mode 1)
;; org settings ;; org settings

@ -4,9 +4,11 @@
"~/Documents/home-org-mode/personal.org")) "~/Documents/home-org-mode/personal.org"))
(set-frame-font "Iosevka:size=16") (set-frame-font "Iosevka:size=16")
(use-package all-the-icons) (use-package all-the-icons)
(setq org-roam-directory (file-truename "~/Documents/slipbox"))
(org-roam-db-autosync-mode)
(add-to-list 'auto-mode-alist '("neomutt" . mail-mode)) (add-to-list 'auto-mode-alist '("neomutt" . mail-mode))
(setq appt-message-warning-time 15 (setq appt-message-warning-time 15

@ -1,5 +1,8 @@
(setq org-agenda-files (list "/home/local/ASUAD/rhnatysh/Seafile/Emacs/Org Notes/Notes.org" (setq org-agenda-files (list "/home/local/ASUAD/rhnatysh/Seafile/Emacs/Org Notes/Notes.org"
"/home/local/ASUAD/rhnatysh/Seafile/Emacs/Org Notes/school.org")) "/home/local/ASUAD/rhnatysh/Seafile/Emacs/Org Notes/school.org"))
(setq org-roam-directory (file-truename "/home/local/ASUAD/rhnatysh/slipbox"))
(org-roam-db-autosync-mode)
(provide 'emacs_work) (provide 'emacs_work)
;;;emacs_work.el ends here ;;;emacs_work.el ends here

@ -1,76 +0,0 @@
(require 'package)
;;(eval-when-compile
;; (require 'use-package))
(setq package-check-signature nil)
;list the packages you want
(setq package-list '(multiple-cursors transient magit restart-emacs dashboard simpleclip auctex company eglot centaur-tabs telephone-line rainbow-delimiters smex format-all flycheck neotree rainbow-mode use-package))
; activate all the packages (in particular autoloads)
(package-initialize)
; list the repositories containing them
(setq package-archives '(("elpa" . "http://tromey.com/elpa/")
("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")))
; fetch the list of packages available
(unless package-archive-contents
(package-refresh-contents))
; install the missing packages
(dolist (package package-list)
(unless (package-installed-p package)
(package-install package)))
(use-package company)
(add-hook 'after-init-hook 'global-company-mode)
(use-package eglot :ensure t)
(add-hook 'c++-mode-hook 'eglot-ensure)
(add-hook 'c-mode-hook 'eglot-ensure)
;;(use-package rustic :init
;; (setq rustic-lsp-client 'eglot))
(use-package centaur-tabs :init
(setq centaur-tabs-enable-key-bindings t
centaur-tabs-set-icons t
centaur-tabs-set-modified-marker t
centaur-tabs-style "chamfer"))
(centaur-tabs-headline-match)
(centaur-tabs-mode 1)
(add-hook 'after-init-hook #'global-flycheck-mode)
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode)
(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "M-X") 'smex-major-mode-commands)
(require 'telephone-line)
(telephone-line-mode 1)
(when (fboundp 'windmove-default-keybindings)
(windmove-default-keybindings))
(setq-default cursor-type 'bar)
(setq backup-directory-alist '(("" . "~/.emacs.d/backup")))
(which-key-mode)
(use-package dashboard
:ensure t
:config (dashboard-setup-startup-hook)
(setq dashboard-set-footer nil
dashboard-org-agenda-categories '("Tasks" "appointments")))
(setq interprogram-cut-function nil)
(require 'multiple-cursors)
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
(scroll-bar-mode -1)
(cond ((file-exists-p "~/.emacs_home.el") (load "~/.emacs_home.el")))
;;; .emacs ends here
Loading…
Cancel
Save