Commit d6918575 authored by treyzania's avatar treyzania

Minor fixes and cleanup/layout.

parent 2608748c
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Init stuff
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
......@@ -14,12 +17,6 @@
(package-initialize)
; Column numbers!
(setq column-number-mode t)
(global-set-key (kbd "C-<PageUp>") 'windmove-left)
(global-set-key (kbd "C-<PageDown>") 'windmove-right)
; macOS is dumb with how it handles sessions so we have to manually do this :(
(when (string-equal system-type "darwin")
(use-package exec-path-from-shell
......@@ -33,6 +30,7 @@
; (setenv "GOPATH" (substitute-in-file-name "$HOME/.go")))
(exec-path-from-shell-initialize))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Core stuff
(use-package flycheck
:ensure t
......@@ -66,40 +64,30 @@
:ensure t
:commands company-lsp)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Rust stuff
(use-package rust-mode
:ensure t
:config
(setq rust-format-on-save t))
(setq rust-format-on-save t)
(define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common))
(use-package cargo
:ensure t
:after rust-mode
:hook (rust-mode . cargo-minor-mode))
; 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)))
:hook ((before-save . gofmt-before-save))
:config
(define-key go-mode-map (kbd "TAB") #'company-indent-or-complete-common))
;;; C stuff
(use-package cc-mode
......@@ -117,13 +105,23 @@
(add-hook 'c-mode-common-hook 'hs-minor-mode)
(setq c-default-style "linux")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Other stuff
; which key just runs everywhere
(use-package which-key
:ensure t)
(which-key-mode)
; Column numbers!
(setq column-number-mode t)
; Nicer navigation.
(global-set-key (kbd "C-<PageUp>") 'windmove-left)
(global-set-key (kbd "C-<PageDown>") 'windmove-right)
; smoother scrolling
; Smoother scrolling
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;; one line at a time
(setq mouse-wheel-progressive-speed nil) ;; don't accelerate scrolling
(setq mouse-wheel-follow-mouse 't) ;; scroll window under mouse
......
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