~aodag/dotfiles

420bc6036e3462851b52a2c1f075af54eaa5c671 — Atsushi Odagiri 5 months ago 6bc26f6
use straight
1 files changed, 34 insertions(+), 46 deletions(-)

M config/emacs/init.el
M config/emacs/init.el => config/emacs/init.el +34 -46
@@ 1,16 1,17 @@
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired.  See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)
(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))

(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))

(eval-when-compile
  (require 'use-package))
(straight-use-package 'use-package)

;; basic preference
(load-theme 'tango-dark t)


@@ 21,7 22,7 @@
(setq-default indent-tabs-mode nil)

(use-package mozc
  :ensure t
  :straight t
  :init
  (setq default-input-method "japanese-mozc"))



@@ 31,12 32,12 @@
  (unless (server-running-p) (server-start)))

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

(use-package highlight-indent-guides
  :ensure t
  :straight t
  :hook
  (go-mode . highlight-indent-guides-mode)
  (rust-mode . highlight-indent-guides-mode)


@@ 50,57 51,57 @@
(use-package ido-vertical-mode
  :init
  (setq ido-vertical-define-keys 'C-n-and-C-p-only)
  :ensure t
  :straight t
  :config
  (ido-vertical-mode 1))
(use-package smex
  :ensure t
  :straight t
  :config
  (smex-initialize)
  :bind (("M-x" . smex)
	 ("M-X" . smex-major-mode-commands)
	 ("C-c C-c M-x" . execute-extended-command)))
(use-package idomenu
  :ensure t)
  :straight t)
(use-package imenu-list
  :ensure t
  :straight t
  :bind (("C-'" . imenu-list-smart-toggle)))

;; develop
(use-package magit
  :ensure t)
  :straight t)
(use-package git-gutter
  :ensure t
  :straight t
  :config
  (global-git-gutter-mode t))
(use-package projectile
  :ensure t
  :straight t
  :config
  (projectile-mode +1)
  (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map))

;; modes
(use-package markdown-mode
  :ensure t)
  :straight t)
(use-package yaml-mode
  :ensure t)
  :straight t)
(use-package go-mode
  :ensure t
  :straight t
  :config
  (add-hook 'before-save-hook 'gofmt-before-save))
(use-package typescript-mode
  :ensure t)
  :straight t)
(use-package fsharp-mode
  :ensure t)
  :straight t)
(use-package docker
  :ensure t
  :straight t
  :bind ("C-c d" . docker))
(use-package dockerfile-mode
  :ensure t)
  :straight t)
(use-package company
  :ensure t)
  :straight t)
(use-package lsp-mode
  :ensure t
  :straight t
  :commands lsp
  :init
  (setq lsp-keymap-prefix "C-c l")


@@ 109,22 110,9 @@
  (typescript-mode . lsp)
  (fsharp-mode . lsp))
(use-package lsp-pyright
  :ensure t
  :straight t
  :hook (python-mode . (lambda ()
                         (require 'lsp-pyright)
                         (lsp))))  ; or lsp-deferred
(use-package rustic
  :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.
 '(package-selected-packages '(use-package)))
(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.
 )
  :straight t)