diff --git a/dotfiles/dot_config/fish/conf.d/fnm.fish b/dotfiles/dot_config/fish/conf.d/fnm.fish deleted file mode 100644 index bcc813e925..0000000000 --- a/dotfiles/dot_config/fish/conf.d/fnm.fish +++ /dev/null @@ -1,3 +0,0 @@ -# fnm -set PATH /home/jas/.fnm $PATH -fnm env | source diff --git a/dotfiles/dot_config/fish/config.fish b/dotfiles/dot_config/fish/config.fish index 36b6a2aa4f..0e5cd9d0e3 100644 --- a/dotfiles/dot_config/fish/config.fish +++ b/dotfiles/dot_config/fish/config.fish @@ -171,3 +171,6 @@ if type -q theme.sh # Interactively load a dark theme alias thd='theme.sh --dark -i' end + +set PATH /home/jas/.fnm $PATH +fnm env | source -- knotmirror 0.0.1 From 236aeb227621756fd7a7cb220a9b218d20f8798e Mon Sep 17 00:00:00 2001 From: Jeffrey Alan Scudder Date: Fri, 22 Mar 2024 20:25:47 -0700 Subject: [PATCH 2/2] more emacs work --- README.txt | 24 +++-- dotfiles/dot_config/emacs.el | 94 ++++++++++++++----- dotfiles/dot_config/nvim/init.vim | 4 +- package.json | 4 +- .../public/aesthetic.computer/disks/line.mjs | 2 +- 5 files changed, 87 insertions(+), 41 deletions(-) diff --git a/README.txt b/README.txt index a4b07141c6..18af3c47a3 100644 --- a/README.txt +++ b/README.txt @@ -42,24 +42,28 @@ - Jeffrey (Sat) -*** sean meeting w/ ida *** - - [] system update notification feed - - [] computer needs to say how it gets better - - [] moat of learning on the fringes - - [] ac openings can be a thing / do a feral-file opening - *** emacs fixes *** - - [] Add code-folding (check out origami or vimdiff mode?) + - [🟡] Add code-folding (check out origami or vimdiff mode?) - [] It should use `zc` and respect my #region marks. - - [] JavaScript auto-indent needs to be 2 spaces wide - - [] Make ctrl+p open instantly in a terminal mode. - - [-] Include "assets" directory in ctrl+p helm search? + - [?] JavaScript auto-indent needs to be 2 spaces wide + - [] `acr` should open emacs with a shell as well + and also pop up the web browser somehow once it's ready, + or show some kind of cool interstitial page while the platform + loads on a different port? - [] Add some kind of gpt mode for inline source replacement. + - [-] Include "assets" directory in ctrl+p helm search? + - [] Make ctrl+p open instantly in a terminal mode. + Done - [x] Javascript auto-close braces / brackets not working. - [x] Add gutter at 80 character width. - [x] Save on leave buffer / clicking out of buffer. +*** sean meeting w/ ida *** + - [] system update notification feed + - [] computer needs to say how it gets better + - [] moat of learning on the fringes + - [] ac openings can be a thing / do a feral-file opening + *** micro *** - [] Autogenerate local ssl certificates when first building / booting if they are not present in ssl-dev/. diff --git a/dotfiles/dot_config/emacs.el b/dotfiles/dot_config/emacs.el index a7ae484fd9..a069433855 100644 --- a/dotfiles/dot_config/emacs.el +++ b/dotfiles/dot_config/emacs.el @@ -4,6 +4,11 @@ ;; (add-to-list 'default-frame-alist '(fullscreen . maximized)) ;; (add-to-list 'default-frame-alist '(undecorated . t)) +(load-theme 'wombat t) + +;; Only show emergency warnings. +(setq warning-minimum-level :emergency) + (tab-bar-mode t) ;; Enable the tab bar mode. (setq tab-bar-new-tab-choice "*scratch*") (setq tab-bar-hints t) @@ -44,7 +49,7 @@ (add-hook 'focus-out-hook 'auto-save-buffer) (custom-set-faces - '(tab-bar ((t (:height 1.1))))) + '(tab-bar ((t (:height 1.0))))) (setq inhibit-startup-screen t) ;; Disable startup message. (setq eshell-banner-message "") ;; No eshell banner. @@ -53,7 +58,7 @@ (global-display-line-numbers-mode) ;; Always show line numbers. -(add-to-list 'auto-mode-alist '("\\.mjs\\'" . js-mode)) ;; Support mjs files. +(add-to-list 'auto-mode-alist '("\\.mjs\\'" . javascript-mode)) ;; Support mjs files. (defun disable-line-numbers-in-modes () "Disable line numbers in eshell and vterm." @@ -73,14 +78,19 @@ (add-to-list 'exec-path "C:/Windows/System32") ) -;; Only show emergency warnings. -(add-hook 'after-init-hook - (lambda () - (setq warning-minimum-level :emergency))) +;; (when (window-system) +;; (fringe-mode 0) ;; Disable fringe indicators. +;; (scroll-bar-mode -1)) ;; Disable scroll bar. -(when (window-system) - (fringe-mode 0) ;; Disable fringe indicators. - (scroll-bar-mode -1)) ;; Disable scroll bar. +(if (display-graphic-p) + (scroll-bar-mode -1) + (fringe-mode 0) + (add-hook 'after-make-frame-functions + (lambda (frame) + (select-frame frame) + (when (display-graphic-p) + (fringe-mode 0) + (scroll-bar-mode -1))))) (menu-bar-mode -1) ;; Disable the menu bar. (tool-bar-mode -1) ;; Disable the tool bar. @@ -119,39 +129,74 @@ (global-set-key (kbd "C-=") 'text-scale-increase) (global-set-key (kbd "C--") 'text-scale-decrease) +;; 🌳 Tree-Sitter + +;; (setq treesit-language-source-alist +;; '((bash "https://github.com/tree-sitter/tree-sitter-bash") +;; (css "https://github.com/tree-sitter/tree-sitter-css") +;; (elisp "https://github.com/Wilfred/tree-sitter-elisp") +;; (html "https://github.com/tree-sitter/tree-sitter-html") +;; (javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src") +;; (json "https://github.com/tree-sitter/tree-sitter-json") +;; (markdown "https://github.com/ikatyang/tree-sitter-markdown") +;; (toml "https://github.com/tree-sitter/tree-sitter-toml") +;; (fish "https://github.com/ram02z/tree-sitter-fish") +;; ;;(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src") +;; (typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src") +;; )) + +;; (mapc #'treesit-install-language-grammar (mapcar #'car treesit-language-source-alist)) + +;; (require 'tree-sitter-langs) +;; (add-to-list 'tree-sitter-major-mode-language-alist '(js-mode . javascript)) + ;; 🪄 Packages ;; (require 'package) ;; (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) ;; (package-initialize) - -;; Install and configure use-package +;; +;; ;; Install and configure use-package ;; (unless (package-installed-p 'use-package) ;; (package-refresh-contents) ;; (package-install 'use-package)) ;; (require 'use-package) ;; (setq use-package-always-ensure t) - +;; (setq package-enable-at-startup nil) ;; Add 'straight package manager. (defvar bootstrap-version) (let ((bootstrap-file - (expand-file-name - "straight/repos/straight.el/bootstrap.el" - (or (bound-and-true-p straight-base-dir) - user-emacs-directory))) + (expand-file-name + "straight/repos/straight.el/bootstrap.el" + (or (bound-and-true-p straight-base-dir) + user-emacs-directory))) (bootstrap-version 7)) (unless (file-exists-p bootstrap-file) (with-current-buffer - (url-retrieve-synchronously - "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" - 'silent 'inhibit-cookies) + (url-retrieve-synchronously + "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" + 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) (setq straight-use-package-by-default t) +(use-package auto-dark) +(setq auto-dark-dark-theme 'wombat + auto-dark-light-theme 'whiteboard) +(auto-dark-mode t) + +(use-package treesit-auto + :config + (global-treesit-auto-mode)) + +;; code-folding via tree-sitter +(use-package ts-fold + :straight (ts-fold :type git :host github :repo "emacs-tree-sitter/ts-fold") + :hook (tree-sitter-mode . ts-fold-mode)) + (use-package helm ;; Add helm: https://github.com/emacs-helm/helm/wiki#from-melpa ;; :straight t :config @@ -178,7 +223,7 @@ (use-package s) ;; `dockerfile-mode` depends on `s`. (use-package dockerfile-mode) ;; Dockerfile support. -(use-package fish-mode) ;; Fish shell syntax. +;; (use-package fish-mode) ;; Fish shell syntax. ;; (use-package gptel) ;; ChatGPT / LLM support. (use-package chatgpt-shell :custom @@ -217,11 +262,6 @@ (global-set-key (kbd "C-c C-o") 'browse-url-at-point) ;; Open url. -(use-package auto-dark) -(setq auto-dark-dark-theme 'wombat - auto-dark-light-theme 'whiteboard) -(auto-dark-mode t) - ;; (use-package burly) ;; This package breaks terminal rendering :( @@ -239,8 +279,10 @@ (eshell-send-input)) ;; fedora: sudo dnf install cmake libtool libvterm -;; windows: choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' +;; windows: choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' (use-package vterm) +(setq vterm-always-compile-module t) + (use-package eat) ;; (setq vterm-shell "/usr/bin/fish") ;; Use fish as the default vterm shell. diff --git a/dotfiles/dot_config/nvim/init.vim b/dotfiles/dot_config/nvim/init.vim index a1e061aa8f..7ed4da9681 100644 --- a/dotfiles/dot_config/nvim/init.vim +++ b/dotfiles/dot_config/nvim/init.vim @@ -51,8 +51,8 @@ set smartindent " sign gutter set signcolumn=yes -" auto apply chezmoi edits: https://www.chezmoi.io/docs/how-to/#use-your-preferred-editor-with-chezmoi-edit-and-chezmoi-edit-config -autocmd BufWritePost ~/.local/share/chezmoi/* ! chezmoi apply --source-path "%" +" auto apply chezmoi edits: https://www.chezmoi.io/docs/how-to/#use-your-preferred-editor-with-chezmoi-edit-and-" " " chezmoi-edit-config +" autocmd BufWritePost ~/.local/share/chezmoi/* ! chezmoi apply --source-path "%" lua << EOF -- enable lsp server diff --git a/package.json b/package.json index 267800f503..7627ddd5a2 100644 --- a/package.json +++ b/package.json @@ -6,13 +6,13 @@ "scripts": { "code": "npm run reset; npm run boot; npm run emacs;", "from-scratch": "npm run reset; npm run build-boot-and-edit", - "build-boot-and-edit": "npm run boot; nohup emacs -q --load dotfiles/dot_config/emacs.el --eval '(aesthetic-backend)' &", + "build-boot-and-edit": "npm run boot; emacsclient -e '(kill-emacs)'; emacs --daemon --load dotfiles/dot_config/emacs.el && emacsclient -c --eval '(aesthetic-backend)'", "reset": "cd micro; npm run reset", "boot": "cd micro; npm run boot", "emacs": "cd micro; npm run emacs", "upgrade": "ncu -u", "url": "node generate-local-url.js", - "ac": "npm run aesthetic", + "ac": "npm run from-scratch", "admin:udp": "ssh root@157.245.134.225", "admin:firebase": "xdg-open https://console.firebase.google.com/?pli=1", "tunnel": "ngrok http https://localhost:8888 --domain local.aesthetic.computer", diff --git a/system/public/aesthetic.computer/disks/line.mjs b/system/public/aesthetic.computer/disks/line.mjs index c6763e05de..1625f03dae 100644 --- a/system/public/aesthetic.computer/disks/line.mjs +++ b/system/public/aesthetic.computer/disks/line.mjs @@ -5,7 +5,7 @@ + Future - [] Better freehand smoothing across the board. - [] Transform hold line before committing a gesture / making the next line? - - [] More optimized rendering / shader options. + - [] More optimized rendering / shader options. + Done - [x] Full color support - [x] Adapt to new brush API.