work stuff

This commit is contained in:
Joe Ardent 2025-02-24 11:43:03 -08:00
parent af51a6f39b
commit 7559e2879a
5 changed files with 104 additions and 6 deletions

View file

@ -157,6 +157,8 @@
- [[#the-nebkor-langsel-section-for-ziglang-zig-mode][The =nebkor-langs.el= section for Ziglang (~zig-mode~)]]
- [[#the-nebkor-langsel-section-for-clojure-programming][The =nebkor-langs.el= section for Clojure programming]]
- [[#the-nebkor-langsel-section-for-scheme][The =nebkor-langs.el= section for Scheme]]
- [[#the-nebkor-langsel-section-for-go][The =nebkor-langs.el= section for Go]]
- [[#the-nebkor-langsel-section-for-terrform][The =nebkor-langs.el= section for Terrform]]
- [[#the-nebkor-langsel-section-for-emacs-lisp][The =nebkor-langs.el= section for Emacs Lisp]]
- [[#finally-we-provide-the-nebkor-langsel-module][Finally, we provide the =nebkor-langs.el= module]]
- [[#the-nebkor-studyel-module][The =nebkor-study.el= module]]
@ -888,7 +890,7 @@ Another section defines some complementary functionality
(t
;; See the fontaine manual for the technicalities:
;; <https://protesilaos.com/emacs/fontaine>.
:default-family "Noto Sans Mono"
:default-family "Menlo"
:default-weight normal
:variable-pitch-family "Iosevka"
:variable-pitch-height 1.05)))
@ -1349,8 +1351,8 @@ These are modifications to basic configuration I use on my Mac OSX machine.
(process-send-string proc text)
(process-send-eof proc))))
(setq mac-command-modifier 'meta)
(setq mac-option-modifier 'alt)
;;(setq mac-command-modifier 'meta)
;;(setq mac-option-modifier 'alt)
(setq interprogram-cut-function #'paste-to-osx)
(setq interprogram-paste-function #'copy-from-osx)
;; Work around a bug on OS X where system-name is a fully qualified
@ -2308,6 +2310,20 @@ My old custom functions file.
(set-window-buffer-start-and-point w1 b2 s2 p2)
(set-window-buffer-start-and-point w2 b1 s1 p1)))))))
(defun my-update-env (fn)
(let ((str
(with-temp-buffer
(insert-file-contents fn)
(buffer-string))) lst)
(setq lst (split-string str "\000"))
(while lst
(setq cur (car lst))
(when (string-match "^\\(.*?\\)=\\(.*\\)" cur)
(setq var (match-string 1 cur))
(setq value (match-string 2 cur))
(setenv var value))
(setq lst (cdr lst)))))
(provide 'nebkor-functions)
#+end_src
@ -4900,12 +4916,14 @@ colors (you can use tree-sitter to do *syntactic* highlighting, but that's diffe
lsp-eldoc-render-all t
lsp-idle-delay 0.2
lsp-enable-snippet t
lsp-file-watch-threshold 3000
read-process-output-max (* 1024 1024))
:hook
(
(lsp-mode . lsp-enable-which-key-integration)
(lsp-mode . subword-mode)
(lsp-completion-mode . my/lsp-mode-setup-completion)
(go-ts-mode . lsp-mode)
;;(before-save . lsp-format-buffer)
))
#+end_src
@ -5232,6 +5250,45 @@ for this to continue.
:config (add-hook 'geiser-repl-mode-hook #'macrostep-geiser-setup))
#+end_src
** The =nebkor-langs.el= section for Go
:PROPERTIES:
:ID: 3EE09964-FF3B-43BC-A09D-7CA94A245D25
:END:
#+begin_src emacs-lisp :tangle "nebkor-modules/nebkor-langs.el"
(use-package go-ts-mode
:ensure nil
:hook
(go-ts-mode . go-format-on-save-mode)
(go-ts-mode . (lambda () (set (make-local-variable 'tab-width) 2)))
:custom
(go-mode-indent-offset 2)
:init
(add-to-list 'treesit-language-source-alist '(go "https://github.com/tree-sitter/tree-sitter-go"))
(add-to-list 'treesit-language-source-alist '(gomod "https://github.com/camdencheek/tree-sitter-go-mod"))
(add-to-list 'auto-mode-alist '("\\.go\\'" . go-ts-mode))
(add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode))
:config
(reformatter-define go-format
:program "goimports"
:args '("/dev/stdin")))
(use-package flycheck-golangci-lint
:ensure t
:hook
(go-ts-mode . flycheck-golangci-lint-setup))
#+end_src
** The =nebkor-langs.el= section for Terrform
:PROPERTIES:
:ID: 43DB91FB-9B4E-4D6A-AF89-CDCD22469C3A
:END:
#+begin_src emacs-lisp :tangle "nebkor-modules/nebkor-langs.el"
(use-package terraform-mode
:ensure t)
#+end_src
** The =nebkor-langs.el= section for Emacs Lisp
:PROPERTIES:

View file

@ -166,8 +166,8 @@ word. Fall back to regular `expreg-expand'."
(process-send-string proc text)
(process-send-eof proc))))
(setq mac-command-modifier 'meta)
(setq mac-option-modifier 'alt)
;;(setq mac-command-modifier 'meta)
;;(setq mac-option-modifier 'alt)
(setq interprogram-cut-function #'paste-to-osx)
(setq interprogram-paste-function #'copy-from-osx)
;; Work around a bug on OS X where system-name is a fully qualified

View file

@ -71,4 +71,18 @@
(set-window-buffer-start-and-point w1 b2 s2 p2)
(set-window-buffer-start-and-point w2 b1 s1 p1)))))))
(defun my-update-env (fn)
(let ((str
(with-temp-buffer
(insert-file-contents fn)
(buffer-string))) lst)
(setq lst (split-string str "\000"))
(while lst
(setq cur (car lst))
(when (string-match "^\\(.*?\\)=\\(.*\\)" cur)
(setq var (match-string 1 cur))
(setq value (match-string 2 cur))
(setenv var value))
(setq lst (cdr lst)))))
(provide 'nebkor-functions)

View file

@ -192,12 +192,14 @@
lsp-eldoc-render-all t
lsp-idle-delay 0.2
lsp-enable-snippet t
lsp-file-watch-threshold 3000
read-process-output-max (* 1024 1024))
:hook
(
(lsp-mode . lsp-enable-which-key-integration)
(lsp-mode . subword-mode)
(lsp-completion-mode . my/lsp-mode-setup-completion)
(go-ts-mode . lsp-mode)
;;(before-save . lsp-format-buffer)
))
@ -363,6 +365,31 @@ NS is the namespace information passed into the function by cider."
:after geiser-repl
:config (add-hook 'geiser-repl-mode-hook #'macrostep-geiser-setup))
(use-package go-ts-mode
:ensure nil
:hook
(go-ts-mode . go-format-on-save-mode)
(go-ts-mode . (lambda () (set (make-local-variable 'tab-width) 2)))
:custom
(go-mode-indent-offset 2)
:init
(add-to-list 'treesit-language-source-alist '(go "https://github.com/tree-sitter/tree-sitter-go"))
(add-to-list 'treesit-language-source-alist '(gomod "https://github.com/camdencheek/tree-sitter-go-mod"))
(add-to-list 'auto-mode-alist '("\\.go\\'" . go-ts-mode))
(add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode))
:config
(reformatter-define go-format
:program "goimports"
:args '("/dev/stdin")))
(use-package flycheck-golangci-lint
:ensure t
:hook
(go-ts-mode . flycheck-golangci-lint-setup))
(use-package terraform-mode
:ensure t)
;;; Settings for Interaction mode for Emacs-Lisp
(use-package ielm
:ensure nil

View file

@ -112,7 +112,7 @@
(t
;; See the fontaine manual for the technicalities:
;; <https://protesilaos.com/emacs/fontaine>.
:default-family "Noto Sans Mono"
:default-family "Menlo"
:default-weight normal
:variable-pitch-family "Iosevka"
:variable-pitch-height 1.05)))