stuff..
This commit is contained in:
parent
9ec4c8a3bf
commit
fd0dc6e778
31
init.org
31
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.
|
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
|
#+begin_src emacs-lisp
|
||||||
(setq gc-cons-percentage 0.6)
|
(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
|
(setq read-process-output-max (* 20 1024 1024)) ;; 1mb
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -1616,14 +1616,15 @@ Use =eglot= as an alternative to =lsp-mode=:
|
||||||
`(rust-mode
|
`(rust-mode
|
||||||
. ("rust-analyzer" :initializationOptions
|
. ("rust-analyzer" :initializationOptions
|
||||||
(:cargo (:buildScripts (:enable t)
|
(:cargo (:buildScripts (:enable t)
|
||||||
:allFeatures t
|
:allFeatures (:enable t)
|
||||||
|
:features "all"
|
||||||
:extraEnv (:RUSTFLAGS "-Clinker=clang -Clink-arg=-fuse-ld=mold")))
|
:extraEnv (:RUSTFLAGS "-Clinker=clang -Clink-arg=-fuse-ld=mold")))
|
||||||
(:check (:command "clippy"))
|
(:check (:command "clippy"))
|
||||||
(:completion (:autoimport t))
|
(:completion (:autoimport (:enable t)))
|
||||||
(:inlayHints (
|
(:inlayHints (
|
||||||
;; :maxLength 20
|
;; :maxLength 20
|
||||||
:bindingModeHints t
|
:bindingModeHints (:enable t)
|
||||||
:closureReturnTypeHints t))
|
:closureReturnTypeHints (:enable t)))
|
||||||
(:procMacro (:enable t)))
|
(:procMacro (:enable t)))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -1631,6 +1632,7 @@ Use =eglot= as an alternative to =lsp-mode=:
|
||||||
eglot-extend-to-xref t
|
eglot-extend-to-xref t
|
||||||
completion-category-overrides '((eglot (styles orderless))
|
completion-category-overrides '((eglot (styles orderless))
|
||||||
(eglot-capf (styles orderless)))
|
(eglot-capf (styles orderless)))
|
||||||
|
flymake-show-diagnostics-at-end-of-line 'fancy
|
||||||
)
|
)
|
||||||
(with-eval-after-load 'eglot
|
(with-eval-after-load 'eglot
|
||||||
(setq completion-category-defaults nil))
|
(setq completion-category-defaults nil))
|
||||||
|
@ -1675,6 +1677,11 @@ Use =eglot= as an alternative to =lsp-mode=:
|
||||||
"c s" '("Symbols" . consult-eglot-symbols))
|
"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-local nemo/lsp-format-on-save t)
|
||||||
(defvar nemo/lsp-format-on-save-function #'eglot-format)
|
(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))
|
(dap-auto-configure-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
** Graphics
|
** Graphics
|
||||||
|
|
||||||
*** WGSL/WESL with lsp-mode
|
*** WGSL/WESL with lsp-mode
|
||||||
|
@ -1916,6 +1922,7 @@ hlsl-mode:
|
||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
*** COMMENT slang-mode
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(require 'slang-ts-mode)
|
(require 'slang-ts-mode)
|
||||||
(add-hook 'slang-ts-mode-hook (lambda () (hs-minor-mode -1)))
|
(add-hook 'slang-ts-mode-hook (lambda () (hs-minor-mode -1)))
|
||||||
|
@ -2168,16 +2175,6 @@ delimiters < and >'s."
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Rust
|
** 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=]]
|
[[https://github.com/brotzeit/rustic][=rustic-mode=]]
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package rustic
|
(use-package rustic
|
||||||
|
@ -2214,10 +2211,12 @@ delimiters < and >'s."
|
||||||
:config
|
:config
|
||||||
(setq rust-mode-treesitter-derive t
|
(setq rust-mode-treesitter-derive t
|
||||||
rustic-format-on-save nil
|
rustic-format-on-save nil
|
||||||
|
rustic-lsp-client 'eglot
|
||||||
;; rustic-format-trigger 'on-save
|
;; rustic-format-trigger 'on-save
|
||||||
;; rustic-format-on-save-method #'rustic-format-buffer
|
;; rustic-format-on-save-method #'rustic-format-buffer
|
||||||
;; rustic-analyzer-command '("/usr/bin/rust-analyzer")
|
;; rustic-analyzer-command '("/usr/bin/rust-analyzer")
|
||||||
)
|
)
|
||||||
|
;; (add-hook 'eglot--managed-mode-hook (lambda () (flymake-mode -1)))
|
||||||
)
|
)
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
Loading…
Reference in a new issue