Merge branch 'main' of github.com:iamtoaster/emacs-dotfiles
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
(which-key-mode))
|
||||
|
||||
;; Pixel perfect scrolling
|
||||
(pixel-scroll-precision-mode)
|
||||
(unless (version< emacs-version "29.0")
|
||||
(pixel-scroll-precision-mode))
|
||||
|
||||
;; Display time
|
||||
(display-time-mode)
|
||||
@@ -116,7 +117,9 @@
|
||||
;; stopped loading it automatically. So, to remedy that, we load it if it was
|
||||
;; not already loaded.
|
||||
(unless (memq 'vterm features)
|
||||
(load "vterm" nil t))
|
||||
(load "vterm" t)
|
||||
(unless (memq 'vterm features)
|
||||
(message "Failed to load vterm. It is probably not installed.")))
|
||||
|
||||
;;
|
||||
(add-to-list 'load-path (expand-file-name (concat minimal-emacs-user-directory "load")))
|
||||
|
||||
@@ -48,7 +48,9 @@
|
||||
(setq org-roam-directory (file-truename "~/data2/Notes"))
|
||||
|
||||
;; This tells org-roam to sync notes with its index in the background.
|
||||
(org-roam-db-autosync-mode)
|
||||
(if (file-directory-p org-roam-directory)
|
||||
(org-roam-db-autosync-mode)
|
||||
(message "Org Roam directory (%s) does not exist. Autosync disabled." org-roam-directory))
|
||||
|
||||
(setq global-roam-map (make-sparse-keymap "Roam Keys"))
|
||||
(global-set-key "\C-cr" global-roam-map)
|
||||
@@ -76,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 ()
|
||||
@@ -47,28 +70,19 @@ Won't work if the script is not there."
|
||||
|
||||
(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"))
|
||||
|
||||
@@ -125,10 +139,10 @@ control codes are not supported."
|
||||
|
||||
;; Lispy provides structural editing to lisp modes.
|
||||
(use-package lispy
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
(add-hook 'emacs-lisp-mode-hook (lambda () (lispy-mode 1)))
|
||||
(if (memq 'lispy-autoloads features)
|
||||
(add-hook 'emacs-lisp-mode-hook (lambda () (lispy-mode 1))))
|
||||
|
||||
;; This package adds indent bars. Currently only configured for rust and python.
|
||||
(use-package indent-bars
|
||||
@@ -154,4 +168,17 @@ control codes are not supported."
|
||||
(indent-bars-treesit-wrap '((rust arguments parameters)))
|
||||
:hook ((python-base-mode yaml-mode rust-mode) . indent-bars-mode))
|
||||
|
||||
;;; 15-lsp.el ends here
|
||||
;; 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
|
||||
|
||||
Reference in New Issue
Block a user