From fd0dc6e77848e7bd6028fa5e0f5dad013a887aff Mon Sep 17 00:00:00 2001 From: janis Date: Fri, 19 Sep 2025 12:32:02 +0200 Subject: [PATCH] stuff.. --- init.org | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/init.org b/init.org index 74b44d5..2b0f75f 100644 --- a/init.org +++ b/init.org @@ -60,7 +60,7 @@ tangled, and the tangled file is compiled." Usually, I like to run emacs as a daemon and only ever open new emacs clients, but that often doesn't work properly and definitely doesn't work when actively working on an emacs config, so this snippet might be useful. #+begin_src emacs-lisp (setq gc-cons-percentage 0.6) -(setq gc-cons-threshold 2000000000) +(setq gc-cons-threshold 100000000) (setq read-process-output-max (* 20 1024 1024)) ;; 1mb #+end_src @@ -1616,14 +1616,15 @@ Use =eglot= as an alternative to =lsp-mode=: `(rust-mode . ("rust-analyzer" :initializationOptions (:cargo (:buildScripts (:enable t) - :allFeatures t + :allFeatures (:enable t) + :features "all" :extraEnv (:RUSTFLAGS "-Clinker=clang -Clink-arg=-fuse-ld=mold"))) (:check (:command "clippy")) - (:completion (:autoimport t)) + (:completion (:autoimport (:enable t))) (:inlayHints ( ;; :maxLength 20 - :bindingModeHints t - :closureReturnTypeHints t)) + :bindingModeHints (:enable t) + :closureReturnTypeHints (:enable t))) (:procMacro (:enable t))) ) ) @@ -1631,6 +1632,7 @@ Use =eglot= as an alternative to =lsp-mode=: eglot-extend-to-xref t completion-category-overrides '((eglot (styles orderless)) (eglot-capf (styles orderless))) + flymake-show-diagnostics-at-end-of-line 'fancy ) (with-eval-after-load 'eglot (setq completion-category-defaults nil)) @@ -1675,6 +1677,11 @@ Use =eglot= as an alternative to =lsp-mode=: "c s" '("Symbols" . consult-eglot-symbols)) ) +(use-package breadcrumb + :straight t + :hook (eglot-managed-mode . breadcrumb-mode) + ) + (defvar-local nemo/lsp-format-on-save t) (defvar nemo/lsp-format-on-save-function #'eglot-format) @@ -1861,7 +1868,6 @@ Make lsp use plists instead of hash-tables: (dap-auto-configure-mode)) #+end_src - ** Graphics *** WGSL/WESL with lsp-mode @@ -1916,6 +1922,7 @@ hlsl-mode: ) #+end_src +*** COMMENT slang-mode #+begin_src emacs-lisp (require 'slang-ts-mode) (add-hook 'slang-ts-mode-hook (lambda () (hs-minor-mode -1))) @@ -2168,16 +2175,6 @@ delimiters < and >'s." #+end_src ** Rust -[[https://github.com/rust-lang/rust-mode][=rust-mode=]] -#+begin_src emacs-lisp -;; (use-package rust-mode -;; :straight t -;; ;; :hook (rust-mode . lsp-mode) -;; :init -;; (setq rust-mode-treesitter-derive t -;; )) -#+end_src - [[https://github.com/brotzeit/rustic][=rustic-mode=]] #+begin_src emacs-lisp (use-package rustic @@ -2214,10 +2211,12 @@ delimiters < and >'s." :config (setq rust-mode-treesitter-derive t rustic-format-on-save nil + rustic-lsp-client 'eglot ;; rustic-format-trigger 'on-save ;; rustic-format-on-save-method #'rustic-format-buffer ;; rustic-analyzer-command '("/usr/bin/rust-analyzer") ) + ;; (add-hook 'eglot--managed-mode-hook (lambda () (flymake-mode -1))) ) #+end_src