My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/infra/libkookie/overlays/kookie/emacs/rust/default.el

29 lines
863 B

;; rust.el
;; Configure rust development via lsp and rust-analyzer
;;
;; This mode enables IDE-like integration for writing and editing rust
;; mode, as well as projectile.el, a utility to mark projects in a
;; large set of directories such as a monorepo. This mode depends on
;; all projects in this tree following the projectile conventions.
;;
;;
;; This file is part of LIBKOOKIE, a collection of nix expressions.
;; LIBKOOKIE is licensed under the GPL-3.0 (or later) -- see LICENSE
(provide 'rust)
(require 'yasnippet)
;;; Use rust-analyzer for completions
(setq lsp-rust-server 'rust-analyzer)
;;; Start lsp mode for Rust buffers
(add-hook 'rust-mode-hook #'lsp)
;;; Use projectile to find project roots
(projectile-mode t)
(setq lsp-auto-guess-root t)
(setq lsp-ui-doc-position 'top)
(setq lsp-ui-doc-max-width 40)
(setq lsp-ui-doc-max-height 20)