Commit 827b6311 authored by treyzania's avatar treyzania

Tons of Emacs changes, pls werk pls

parent 2159991f
......@@ -19,41 +19,60 @@
(global-set-key (kbd "C-<PageUp>") 'windmove-left)
(global-set-key (kbd "C-<PageDown>") 'windmove-right)
(use-package company
;;; Core stuff
(use-package flycheck
:ensure t
:init (global-flycheck-mode))
:init (global-flycheck-mode)
:config
; BROKEN
(setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))
)
(use-package flycheck)
(use-package company
:ensure t)
(use-package neotree
:ensure t
:config
(global-set-key [f8] 'neotree-toggle)
(setq neo-theme 'arrow))
;;; Rust stuff
(use-package rust-mode
:ensure t
:config
(setq rust-format-on-save t))
(use-package cargo
:ensure t
:after rust-mode
:hook ((rust-mode . cargo-minor-mode)))
(use-package racer
:hook ((rust-mode . racer-mode)
(racer-mode . eldoc-mode)
(racer-mode . company-mode))
:config
(define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common)
(setq company-tooltip-align-annotations t)
(setq racer-cmd "~/.cargo/bin/racer" ;; Rustup binaries
racer-rust-src-path "~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src")) ;; Rust source code
(use-package flycheck-rust
:hook ((flycheck-mode . flycheck-rust-setup)))
; We're probably not going to be using Racer if we're not on Linux.
; TODO Switch to using rls or rust-analyzer.
(cond
((string-equal system-type "gnu/linux")
(use-package racer
:ensure t
:hook ((rust-mode . racer-mode)
(racer-mode . eldoc-mode)
(racer-mode . company-mode))
:config
(define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common)
(setq company-tooltip-align-annotations t)
(setq racer-cmd "~/.cargo/bin/racer" ;; Rustup binaries
racer-rust-src-path "~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src")))) ;; Rust source code
; BROKEN
;(use-package flycheck-rust
; :hook ((flycheck-mode . flycheck-rust-setup)))
;;; Go Stuff
(use-package go-mode
:ensure t
:hook ((before-save . gofmt-before-save)))
; BROKEN
;(use-package company-go
; :hook ((go-mode . (lambda ()
; (set (make-local-variable 'company-backends) '(company-go))
......@@ -61,34 +80,36 @@
; :config
; (setq company-begin-commands '(self-insert-command))) ; autocomplete only after typing
; BROKEN
(use-package go-autocomplete
:ensure t
:config
(add-hook 'completion-at-point-functions 'go-complete-at-point))
; I don't think I need this.
;(use-package rust-playground)
; which key just runs everywhere
(use-package which-key)
(which-key-mode)
;;; C stuff
(use-package cc-mode
:ensure t
:hook ((prog-mode . (lambda () (interactive)
(setq show-trailing-whitespace 1)))
(c-mode . (lambda ()
(define-key c-mode-base-map (kbd "<tab>") 'company-complete)))))
; c
(use-package company-c-headers
:init
:ensure t
:config
(add-to-list 'company-backends 'company-c-headers))
(add-hook 'c-mode-common-hook 'hs-minor-mode)
(setq c-default-style "linux")
(use-package cc-mode
:hook ((prog-mode . (lambda () (interactive)
(setq show-trailing-whitespace 1)))
(c-mode . (lambda ()
(define-key c-mode-base-map (kbd "<tab>") 'company-complete)))))
;;; Other stuff
; idk what this is yet
;(use-package ggtags
; :hook ((c-mode . ggtags)))
; which key just runs everywhere
(use-package which-key
:ensure t)
; smoother scrolling
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;; one line at a time
......@@ -100,4 +121,4 @@
(setq calendar-longitude -71)
(put 'scroll-left 'disabled nil)
(setq custom-file ".emacs.d/.custom.el")
(setq custom-file (substitute-in-file-name "$HOME/.emacs.d/.custom.el"))
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