wiki:dotEmacs
;;; C-h v user-init-file
;;; (find-file user-init-file)

(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)

(add-to-list 'default-frame-alist '(fullscreen . maximized))

(set-frame-font "Source Code Pro Light 16" t t)

(setq inhibit-startup-screen t)
(setq initial-scratch-message "")

(setq initial-major-mode 'emacs-lisp-mode)

(setq-default font-lock-maximum-decoration t)

(eval-when-compile
  (require 'package)
  (add-to-list 'package-archives
               '("melpa-stable" . "http://stable.melpa.org/packages/") t)
  (package-initialize))

(eval-when-compile
  (unless (package-installed-p 'use-package)
    (package-refresh-contents)
    (package-install 'use-package))
  (require 'use-package))

(use-package solarized-theme
  :ensure t
  :config
  (setq solarized-use-variable-pitch nil)
  :init
  (load-theme 'solarized-dark t))

(use-package guru-mode
  :ensure t
  :diminish (guru-mode)
  :config
  (guru-global-mode t))

(use-package which-key
  :ensure t
  :diminish (which-key-mode)
  :config
  (which-key-mode t))

;; (use-package ido
;;   :config
;;   (ido-mode t))

;; (use-package ido-completing-read+
;;   :ensure t
;;   :after ido
;;   :config
;;   (ido-ubiquitous-mode t))

;; (use-package helm
;;   :ensure t
;;   :diminish (helm-mode)
;;   :config
;;   (global-set-key (kbd "M-x") 'helm-M-x)
;;   (global-set-key (kbd "C-x C-m") 'helm-M-x)
;;   (global-set-key (kbd "M-y") 'helm-show-kill-ring)
;;   (global-set-key (kbd "C-x b") 'helm-mini)
;;   (global-set-key (kbd "C-x C-b") 'helm-buffers-list)
;;   (global-set-key (kbd "C-x C-f") 'helm-find-files)
;;   (global-set-key (kbd "C-h f") 'helm-apropos)
;;   (global-set-key (kbd "C-h r") 'helm-info-emacs)
;;   (global-set-key (kbd "C-h C-l") 'helm-locate-library)
;;   (helm-mode t))

(use-package swiper
  :ensure t
  :config
  (global-set-key "\C-s" 'swiper))

;; (use-package swiper-helm
;;   :ensure t
;;   :after swiper helm)

(use-package counsel
  :ensure t
  :config
  (global-set-key (kbd "M-x") 'counsel-M-x)
  (global-set-key (kbd "C-x C-f") 'counsel-find-file)
  (global-set-key (kbd "C-h f") 'counsel-describe-function)
  (global-set-key (kbd "C-h v") 'counsel-describe-variable)
  (define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history))

(use-package ivy
  :ensure t
  :diminish (ivy-mode)
  :after counsel
  :config
  (global-set-key (kbd "C-c C-r") 'ivy-resume)
  (setq ivy-use-virtual-buffers t)
  (setq enable-recursive-minibuffers t)
  (ivy-mode t))

(use-package eldoc
  :diminish (eldoc-mode)
  :config
  (eldoc-mode t))

(use-package rainbow-delimiters
  :ensure t
  :config
  (rainbow-delimiters-mode t))

(use-package smartparens
  :ensure t
  :diminish (smartparens-mode)
  :config
  (smartparens-global-mode t))

(use-package company
  :ensure t
  :diminish (company-mode)
  :config
  (global-company-mode t))

(use-package flycheck
  :ensure t
  :config
  (global-flycheck-mode t))

(use-package lsp-mode
  :ensure t
  :hook (python-mode . lsp)
  :commands lsp)

(use-package lsp-ui
  :ensure t
  :commands lsp-ui-mode)

(use-package company-lsp
  :ensure t
  :after company lsp-mode
  :config
  (push 'company-lsp company-backends))

(use-package python
  :interpreter ("python3" . python-mode))

(use-package python-mode
  :ensure t
  :mode ("\\.py\\'" . python-mode))

;; (use-package elpy
;;   :ensure t)

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(initial-frame-alist (quote ((fullscreen . maximized))))
 '(package-selected-packages
   (quote
    (rainbow-delimiters ido-completing-read+ which-key swiper-helm counsel elpy python-mode smartparens diminish solarized-theme))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
Last modified 16 months ago Last modified on May 21, 2019, 9:57:57 AM
Note: See TracWiki for help on using the wiki.