Updates to rust lsp, remove org-fc
This commit is contained in:
@@ -78,18 +78,4 @@
|
||||
"~/data2/Notes/inbox.org" "Words")
|
||||
#'tatoeba-get-capture-template)))
|
||||
|
||||
;; This package adds flashcard functionality to org files.
|
||||
(use-package org-fc
|
||||
:straight (org-fc
|
||||
:type git
|
||||
:host nil
|
||||
:repo "https://git.sr.ht/~l3kn/org-fc"
|
||||
:branch "main"
|
||||
:files (:defaults "awk" "demo.org"))
|
||||
:after org
|
||||
:ensure t
|
||||
:defer nil
|
||||
:custom
|
||||
(org-fc-directories '("~/data2/Notes/")))
|
||||
|
||||
;;; 07-org.el ends here
|
||||
|
||||
@@ -7,6 +7,23 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; This package provides syntax highlighting and some utilities for
|
||||
;; working with rust code.
|
||||
(use-package rust-mode
|
||||
:ensure t
|
||||
:defer t
|
||||
:commands (rust-mode))
|
||||
|
||||
(add-hook 'rust-mode-hook #'eglot-ensure)
|
||||
|
||||
;; Clippy backend for flymake so we get propa error reporting in Rust
|
||||
(use-package flymake-clippy
|
||||
:hook (rust-mode . flymake-clippy-setup-backend))
|
||||
|
||||
(defun manually-activate-flymake ()
|
||||
(add-hook 'flymake-diagnostic-functions #'eglot-flymake-backend nil t)
|
||||
(flymake-mode 1))
|
||||
|
||||
;; Eglot is the built-in LSP client.
|
||||
(use-package eglot
|
||||
:ensure nil
|
||||
@@ -17,15 +34,21 @@
|
||||
eglot-rename
|
||||
eglot-format-buffer)
|
||||
|
||||
:hook ((eglot-managed-mode . manually-activate-flymake))
|
||||
|
||||
:custom
|
||||
(eglot-report-progress nil) ; Prevent minibuffer spam
|
||||
(eglot-report-progress nil) ; Prevent minibuffer spam
|
||||
|
||||
:config
|
||||
(add-to-list 'eglot-server-programs '((rust-mode) . ("rust-analyzer")))
|
||||
(add-to-list 'eglot-server-programs '((rust-mode) . ("rust-analyzer" :initializationOptions
|
||||
( :procMacro (:enable t)
|
||||
:cargo ( :buildScripts (:enable t) )))))
|
||||
(add-to-list 'eglot-server-programs '(nix-mode . ("nil")))
|
||||
(add-to-list 'eglot-stay-out-of 'flymake)
|
||||
;; Optimizations
|
||||
(fset #'jsonrpc--log-event #'ignore)
|
||||
(setq jsonrpc-event-hook nil))
|
||||
(setq jsonrpc-event-hook nil)
|
||||
)
|
||||
|
||||
;; This function raises the window to the front using KDE KWin.
|
||||
(defun my/raise-window ()
|
||||
@@ -44,28 +67,19 @@
|
||||
|
||||
(add-hook 'gdscript-mode-hook #'eglot-ensure)
|
||||
|
||||
;; This package provides syntax highlighting and some utilities for
|
||||
;; working with rust code.
|
||||
(use-package rust-mode
|
||||
:ensure t
|
||||
:defer t
|
||||
:commands (rust-mode))
|
||||
|
||||
(add-hook 'rust-mode-hook #'eglot-ensure)
|
||||
|
||||
;; This package provides integration with Prolog (SWI).
|
||||
(use-package sweeprolog
|
||||
:straight (sweeprolog :type git
|
||||
:host nil
|
||||
:repo "https://git.sr.ht/~eshel/sweep"
|
||||
:branch "main"
|
||||
:files ("*.el" "sweep.pl" "sweep.texi")) ; Custom recipe because
|
||||
; the normal one did not
|
||||
; build properly.
|
||||
:host nil
|
||||
:repo "https://git.sr.ht/~eshel/sweep"
|
||||
:branch "main"
|
||||
:files ("*.el" "sweep.pl" "sweep.texi")) ; Custom recipe because
|
||||
; the normal one did not
|
||||
; build properly.
|
||||
:ensure t
|
||||
:defer t
|
||||
:commands (sweeprolog-mode
|
||||
sweeprolog-top-level)
|
||||
sweeprolog-top-level)
|
||||
:init
|
||||
(setq sweeprolog-swipl-path "swipl"))
|
||||
|
||||
@@ -139,4 +153,17 @@
|
||||
(indent-bars-treesit-wrap '((rust arguments parameters)))
|
||||
:hook ((python-base-mode yaml-mode rust-mode) . indent-bars-mode))
|
||||
|
||||
;; Ellama allows using LLMs from emacs.
|
||||
(use-package ellama
|
||||
:ensure nil
|
||||
:defer t
|
||||
:bind ("C-c e" . ellama)
|
||||
:init (setopt ellama-auto-scroll t)
|
||||
:commands (ellama)
|
||||
:config
|
||||
;; show ellama context in header line in all buffers
|
||||
(ellama-context-header-line-global-mode +1)
|
||||
;; show ellama session id in header line in all buffers
|
||||
(ellama-session-header-line-global-mode +1))
|
||||
|
||||
;;; 15-lsp.el end here
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(auth-source-save-behavior nil))
|
||||
)
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
|
||||
Reference in New Issue
Block a user