annotate .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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
501
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
1 (use-package flycheck
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
2 :hook (prog-mode . flycheck-mode))
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
3
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
4 (use-package company
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
5 :hook (prog-mode . company-mode)
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
6 :config (setq company-tooltip-align-annotations t)
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
7 (setq company-minimum-prefix-length 1))
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
8
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
9 (use-package lsp-mode
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
10 :commands lsp
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
11 :config (require 'lsp-clients))
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
12
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
13 (use-package lsp-ui)
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
14
507
7d298a83fceb emacs: reference toml instead of toml-mode, fix up some rust packages
Augie Fackler <raf@durin42.com>
parents: 501
diff changeset
15 (use-package toml)
501
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
16
397
98484e1f564f rust: lots of new configs to make working with rust code easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
17 (use-package rust-mode
501
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
18 :hook (rust-mode . lsp)
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
19 :config (add-hook 'rust-mode-hook
397
98484e1f564f rust: lots of new configs to make working with rust code easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
20 (lambda ()
98484e1f564f rust: lots of new configs to make working with rust code easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
21 (local-set-key (kbd "C-c <tab>") #'rust-format-buffer))))
98484e1f564f rust: lots of new configs to make working with rust code easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
22
501
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
23 ;; Add keybindings for interacting with Cargo
397
98484e1f564f rust: lots of new configs to make working with rust code easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
24 (use-package cargo
501
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
25 :hook (rust-mode . cargo-minor-mode))
397
98484e1f564f rust: lots of new configs to make working with rust code easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
26
98484e1f564f rust: lots of new configs to make working with rust code easy
Augie Fackler <raf@durin42.com>
parents:
diff changeset
27 (use-package flycheck-rust
501
514374a2a5bc emacs: migrate rust config to use rls and lsp
Augie Fackler <raf@durin42.com>
parents: 475
diff changeset
28 :config (add-hook 'flycheck-mode-hook #'flycheck-rust-setup))