Commit fc2b43a3 authored by peacerebel's avatar peacerebel
Browse files

Enable rust-mode and add js2 minor mode

parent 0a23371f
......@@ -24,7 +24,6 @@
(custom-set-variables
'(initial-frame-alist (quote ((fullscreen . maximized)))))
;; Disable toolbar, menu and scrollbar
(tool-bar-mode 0)
(menu-bar-mode 0)
......@@ -230,6 +229,7 @@ other, future frames."
;; Company-mode
(use-package company
:ensure t
:config
(setq company-frontends
'(company-pseudo-tooltip-unless-just-one-frontend
......@@ -343,6 +343,7 @@ other, future frames."
'(javascript-jshint)))
(flycheck-add-mode 'javascript-eslint 'web-mode)
(flycheck-add-mode 'javascript-eslint 'js-mode)
(flycheck-add-mode 'typescript-tslint 'web-mode)
:init
(global-flycheck-mode))
......@@ -367,6 +368,7 @@ other, future frames."
(add-to-list 'auto-mode-alist '("\\.ts$" . typescript-mode)))
(use-package tide
:ensure t
:config
(setq company-tooltip-align-annotations t)
(add-hook 'before-save-hook 'tide-format-before-save)
......@@ -384,6 +386,10 @@ other, future frames."
;; Javascript
(setq js-indent-level 2)
(use-package js2-mode
:config
(add-hook 'js-mode-hook 'js2-minor-mode))
(use-package tern
:config
(unbind-key "M-." tern-mode-keymap)
......@@ -406,6 +412,13 @@ other, future frames."
(add-hook 'flycheck-mode-hook #'my/use-eslint-from-node-modules)
;; Rust
(use-package rust-mode
:config
(setq rust-format-on-save t)
(setq indent-tabs-mode nil)
(setq lsp-rust-rls-server-command 'rls))
;; TeX
(use-package auctex
:defer t
......
Supports Markdown
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