view .elisp/settings/99.rust.el @ 526:852565046ed0 default tip

zsh: fidget with screen/tmux message This should speed things up very slightly by avoiding some `grep` action in the common case of no detached screens/tmuxes.
author Augie Fackler <raf@durin42.com>
date Mon, 14 Nov 2022 11:02:35 -0500
parents 7d298a83fceb
children
line wrap: on
line source

(use-package flycheck
  :hook (prog-mode . flycheck-mode))

(use-package company
  :hook (prog-mode . company-mode)
  :config (setq company-tooltip-align-annotations t)
          (setq company-minimum-prefix-length 1))

(use-package lsp-mode
  :commands lsp
  :config (require 'lsp-clients))

(use-package lsp-ui)

(use-package toml)

(use-package rust-mode
  :hook (rust-mode . lsp)
  :config (add-hook 'rust-mode-hook
          (lambda ()
            (local-set-key (kbd "C-c <tab>") #'rust-format-buffer))))

;; Add keybindings for interacting with Cargo
(use-package cargo
  :hook (rust-mode . cargo-minor-mode))

(use-package flycheck-rust
  :config (add-hook 'flycheck-mode-hook #'flycheck-rust-setup))