forgot to commit ..

This commit is contained in:
2024-05-16 18:14:24 +02:00
parent 8958787606
commit 48fb52a332
7 changed files with 137 additions and 51 deletions

4
.gitignore vendored
View File

@@ -5,6 +5,9 @@ el-get
elpa-27.1
elpa-28.2
elpa-29.1
elpa-29.2
elpa-29.3
.eln-cache
elpa
projectile-bookmarks.eld
recentf
@@ -24,3 +27,4 @@ history
emms
macros.el
forge-database.sqlite
forge-database*

View File

@@ -11,7 +11,7 @@
'("7f1d414afda803f3244c6fb4c2c64bea44dac040ed3731ec9d75275b9e831fe5" default))
'(magit-todos-insert-after '(bottom) nil nil "Changed by setter of obsolete option `magit-todos-insert-at'")
'(package-selected-packages
'(avy sqlite3 dmacro emms package-lint blamer howm tiny tramp dictcc beacon which-key goto-last-change browse-kill-ring fringe-current-line swiper smex undo-tree fic-mode cmake-mode yaml-mode windresize web-mode use-package tablist solarized-theme smartparens rust-mode projectile persistent-scratch org-bullets markdown-mode magit iedit ibuffer-vc ibuffer-tramp hydra htmlize highlight-indentation go-mode eyebrowse elmacro dumb-jump dired-ranger dired-k dired-filter default-text-scale change-inner buffer-move))
'(nix-mode avy sqlite3 dmacro emms package-lint blamer howm tiny tramp dictcc beacon which-key goto-last-change browse-kill-ring fringe-current-line swiper smex undo-tree fic-mode cmake-mode yaml-mode windresize web-mode use-package tablist solarized-theme smartparens rust-mode projectile persistent-scratch org-bullets markdown-mode magit iedit ibuffer-vc ibuffer-tramp hydra htmlize highlight-indentation go-mode eyebrowse elmacro dumb-jump dired-ranger dired-k dired-filter default-text-scale change-inner buffer-move))
'(safe-local-variable-values '((ruby-indent-level 4)))
'(warning-suppress-types '((comp))))
(custom-set-faces

View File

@@ -84,6 +84,8 @@
;; bootstrap emacs
(add-to-list 'load-path tvd-lisp-dir)
(add-to-list 'load-path tvd-sitelisp-dir)
(require 'init-display)
(require 'init-modeline)
(require 'init-elget)
@@ -128,6 +130,7 @@
(require 'init-orgtable)
(require 'init-outline)
(require 'init-markdown)
(require 'init-lvl)
;; interactive modes
(require 'init-eshell)
@@ -147,7 +150,7 @@
(require 'init-ediff)
(require 'init-projectile)
(require 'init-occur)
(require 'init-audio)
;; (require 'init-audio) nope, I'm just not using it anymore
(require 'init-daemonde)
;; emacs configuration

View File

@@ -71,10 +71,11 @@
:type http
:url "http://nschum.de/src/emacs/rotate-text/rotate-text.el")
(el-get-bundle consult-emms
:type github
:pkgname "Hugo-Heagren/consult-emms"
:features consult-emms)
;; doesn't work AND I don't use it anymore
;; (el-get-bundle consult-emms
;; :type github
;; :pkgname "Hugo-Heagren/consult-emms"
;; :features consult-emms)
;; (el-get-bundle matcha
;; :type github

View File

@@ -1,37 +1,52 @@
;; *** Go Lang
(use-package go-mode
:mode "\\.go\\'"
:mode "\\.mod\\'"
:mode "\\.go\\'"
:mode "\\.mod\\'"
:config
(setq gofmt-args '("-s"))
(setq tab-width 4)
;; (setq indent-tabs-mode 1)
:config
(setq gofmt-args '("-s"))
(setq tab-width 4)
;; (setq indent-tabs-mode 1)
:init
;; disabled, I'm now trying lsp-mode, see below:
;; (add-hook 'before-save-hook 'gofmt-before-save)
;; :hook (go-mode lsp-deferred)
:init
;; disabled, I'm now trying lsp-mode, see below:
;; (add-hook 'before-save-hook 'gofmt-before-save)
;; :hook (go-mode lsp-deferred)
(when (fboundp 'lsp-deferred)
(defun lsp-go-install-save-hooks ()
(add-hook 'before-save-hook #'lsp-format-buffer t t)
(add-hook 'before-save-hook #'lsp-organize-imports t t))
(when (fboundp 'lsp-deferred)
(defun lsp-go-install-save-hooks ()
(add-hook 'before-save-hook #'lsp-format-buffer t t)
(add-hook 'before-save-hook #'lsp-organize-imports t t))
(add-hook 'go-mode-hook #'lsp-deferred)
(add-hook 'go-mode-hook #'lsp-go-install-save-hooks)
;; (add-hook 'go-mode-hook #'ivy-mode)
(add-hook 'go-mode-hook #'lsp-deferred)
(add-hook 'go-mode-hook #'lsp-go-install-save-hooks)
;; (add-hook 'go-mode-hook #'ivy-mode)
;; overwrite dump-jump settions here
;; (bind-key* (kbd "C-c j") #'lsp-find-definition)
;; (bind-key* (kbd "C-c b") #'xref-pop-marker-stack)
)
;; overwrite dump-jump settions here
;; (bind-key* (kbd "C-c j") #'lsp-find-definition)
;; (bind-key* (kbd "C-c b") #'xref-pop-marker-stack)
)
:bind (:map go-mode-map
( "C-c j" . #'lsp-find-definition)
("C-c b" . #'xref-pop-marker-stack)))
:bind (:map go-mode-map
( "C-c j" . #'lsp-find-definition)
("C-c b" . #'xref-pop-marker-stack)))
(use-package kage-mode
:ensure nil ;; installed in site-lisp
:defer nil
:mode "\\.kg\\'"
:commands kage-gofmt-before-save
:init
(defun tvd-kage-install-hooks()
(remove-hook 'before-save-hook #'lsp-format-buffer t)
(remove-hook 'before-save-hook #'lsp-organize-imports t)
(add-hook 'before-save-hook #'kage-gofmt-before-save t t))
:config
(add-hook 'kage-mode-hook #'tvd-kage-install-hooks)
(setq lsp-warn-no-matched-clients nil))
(provide 'init-go)
;;; init-go.el ends here

View File

@@ -133,31 +133,32 @@ a remote file anytime and from everywhere I am by just entering :"
(use-package embark
:ensure t
(when nil
(use-package embark
:ensure t
:bind
(("C-." . embark-act) ;; pick some comfortable binding
("C-," . embark-dwim)) ;; good alternative: M-.
:bind
(("C-." . embark-act) ;; pick some comfortable binding
("C-," . embark-dwim)) ;; good alternative: M-.
:init
:init
;; Optionally replace the key help with a completing-read interface
(setq prefix-help-command #'embark-prefix-help-command)
;; Optionally replace the key help with a completing-read interface
(setq prefix-help-command #'embark-prefix-help-command)
;; Show the Embark target at point via Eldoc. You may adjust the Eldoc
;; strategy, if you want to see the documentation from multiple providers.
(add-hook 'eldoc-documentation-functions #'embark-eldoc-first-target)
;; (setq eldoc-documentation-strategy #'eldoc-documentation-compose-eagerly)
;; Show the Embark target at point via Eldoc. You may adjust the Eldoc
;; strategy, if you want to see the documentation from multiple providers.
(add-hook 'eldoc-documentation-functions #'embark-eldoc-first-target)
;; (setq eldoc-documentation-strategy #'eldoc-documentation-compose-eagerly)
:config
:config
;; Hide the mode line of the Embark live/completions buffers
(add-to-list 'display-buffer-alist
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
nil
(window-parameters (mode-line-format . none)))))
;; Hide the mode line of the Embark live/completions buffers
(add-to-list 'display-buffer-alist
'("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
nil
(window-parameters (mode-line-format . none))))))
(use-package consult
@@ -209,9 +210,10 @@ a remote file anytime and from everywhere I am by just entering :"
(use-package
embark-consult
:after (embark consult))
(when nil
(use-package
embark-consult
:after (embark consult)))

61
site-lisp/kage-mode.el Normal file
View File

@@ -0,0 +1,61 @@
;;; kage-mode.el --- mode for the kage shader language -*- lexical-binding: t; -*-
;; Copyright (C) 2024, T.v.Dein <tlinden@cpan.org>
;; This file is NOT part of Emacs.
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of the
;; License, or (at your option) any later version.
;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
;; USA
;; Version: 0.0.1
;; Package-Version: 20240319.100
;; Author: T.v.Dein <tlinden@cpan.org>
;; Keywords: languages go
;; URL: https://github.com/tlinden/kage-mode
;; License: GNU General Public License >= 3
;; Package-Requires: ((emacs "24.1"))
;; SPDX-License-Identifier: GPL-3.0
;; add dependency
(require 'go-mode)
;; kage-mode is simply derived from go-mode
(define-derived-mode kage-mode go-mode "Kage shader script"
"Major mode for editing Ebitengine Kage shader files.
This mode provides all the features go-mode provides, since kage files
are go compatible.
It also supports the use of gofmt -s. If you want to use it, add this
to your config:
\(add-hook 'before-save-hook #'kage-gofmt-before-save)"
;;; (run-hooks 'kage-mode-hook)
)
;; we need to have our own call to gofmt, because the one in go-mode
;; only works with *.go files, but we use the original call to it anyway
(defun kage-gofmt-before-save ()
"Execute gofmt, intended to be put into before-safe-hook"
(interactive)
(when (eq major-mode 'kage-mode) (gofmt)))
;; autoloaders
(autoload 'kage-mode "kage-mode")
(autoload 'kage-gofmt-before-save "execute gofmt on write")
(provide 'kage-mode)