diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 2583dc7..09876e5 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -250,24 +250,22 @@ cursor_blink_interval 0 #: Terminal bell {{{ -enable_audio_bell no +# enable_audio_bell yes #: Enable/disable the audio bell. Useful in environments that require #: silence. -visual_bell_duration 0.10 +# visual_bell_duration 0.0 #: Visual bell duration. Flash the screen when a bell occurs for the #: specified number of seconds. Set to zero to disable. -visual_bell_color #fff - # window_alert_on_bell yes #: Request window attention on bell. Makes the dock icon bounce on #: macOS or the taskbar flash on linux. -bell_on_tab yes +# bell_on_tab yes #: Show a bell symbol on the tab if a bell occurs in one of the #: windows in the tab and the window is not the currently focused @@ -1053,4 +1051,4 @@ macos_option_as_alt both #: }}} -# }}} +# }}} \ No newline at end of file diff --git a/.emacs.d/init.el b/.emacs.d/init.el index ecce961..81b3edd 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -362,7 +362,7 @@ (use-package company :ensure t :commands company-mode :init - ;; 2023-08-26: Enable company mode globally. + ;; 2023-08-26: Enable comapny mode globally. (global-company-mode t) :config ;; 2023-08-26: Enable comapny mode globally. @@ -402,34 +402,16 @@ (eq major-mode 'c-mode)) (eglot-signal-didChangeConfiguration server))) -(defun ts/server-program (interactive) - "Choose which server program to run." - (cond ((ts/is-deno-project) '("deno" "lsp" :initializationOptions :enable t :lint t)) - (t '("typescript-language-server" "--stdio")))) - - (use-package eglot :ensure :commands (eglot-ensure eglot) :hook - (python-mode . eglot-ensure) - (rust-mode . eglot-ensure) - (rust-ts-mode . eglot-ensure) ;; 2023-08-26 Add eglot for tree-sitter rust? - (c++-mode . eglot-ensure) - (c-mode . eglot-ensure) - (go-mode . eglot-ensure) ;; 2022-07-29 Add eglot for go - (typescript-mode . eglot-ensure) ;; 2023-09-03 Eglot for typescript - (typescript-ts-mode . eglot-ensure) ;; 2023-09-03 Eglot for typescript - - ;; 2023-09-10 Respect language-specific formatters - ;; - ;; Something inside me *yearns* for the LSP to be the authoritative - ;; formatter, and therefore to be able to just say "eglot, take care of it" - ;; but it's just not the case right now. (The inciting incident is that - ;; prettier and typescript-language-server diagree on how typescript is to - ;; be formatted, and after much soul-searching I have decided to side with - ;; prettier.) - ;; - ;; (before-save . eglot-format) + (python-mode . eglot-ensure) + (rust-mode . eglot-ensure) + (rust-ts-mode . eglot-ensure) ;; 2023-08-26 Add eglot for tree-sitter rust? + (c++-mode . eglot-ensure) + (c-mode . eglot-ensure) + (go-mode . eglot-ensure) ;; 2022-07-29 Add eglot for go + (before-save . eglot-format) ;; 2023-05-25 Format buffers on save :bind ("C-c r" . eglot-rename) ;; 2022-08-23 Make rename more accessible ("C-c \\" . eglot-code-actions) ;; 2022-07-29 I want to make code actions easier. @@ -449,9 +431,13 @@ ;; (add-to-list 'eglot-server-programs ;; `(python-mode . (,py-executable))))) - ;; 2023-09-03 Re-work the way that the JS/Deno switch is handled. + ;; 2022-04-28 Configuration for Deno. + (defclass eglot-deno (eglot-lsp-server) () + :documentation "A custom class for deno lsp.") + (cl-defmethod eglot-initialization-options ((server eglot-deno)) + (list :enable t :lint t)) (add-to-list 'eglot-server-programs - '((js-mode typescript-mode) . ts/server-program)) + '((js-mode typescript-mode) . (eglot-deno "deno" "lsp"))) ;; -- (add-hook 'eglot-managed-mode-hook 'my-disable-flycheck-on-eglot) @@ -964,23 +950,20 @@ Or, uh, Objective C, I guess." "Return non-nil if this is a deno project, otherwise nil." (locate-dominating-file (buffer-file-name) ".deno")) -;; 2023-09-03 Trying eglot instead of TIDE for now. -;; (defun ts/enable-eglot-or-tide () -;; "Enable eglot if this is a deno project, otherwise enable tide." -;; (if (ts/is-deno-project) -;; (eglot-ensure) +(defun ts/enable-eglot-or-tide () + "Enable eglot if this is a deno project, otherwise enable tide." + (if (ts/is-deno-project) + (eglot-ensure) -;; ;; Not a deno project; just enable tide and the normal -;; (tide-setup) -;; (flycheck-mode +1) -;; (tide-hl-identifier-mode) -;; (eldoc-mode +1))) + ;; Not a deno project; just enable tide and the normal + (tide-setup) + (flycheck-mode +1) + (tide-hl-identifier-mode) + (eldoc-mode +1))) (use-package typescript-mode :ensure t - ;; 2023-09-03 Trying eglot instead of TIDE for now. - ;; :config - ;; (add-hook 'typescript-mode-hook 'ts/enable-eglot-or-tide) - ) + :config + (add-hook 'typescript-mode-hook 'ts/enable-eglot-or-tide)) (use-package add-node-modules-path :ensure t :hook typescript-mode) @@ -988,8 +971,7 @@ Or, uh, Objective C, I guess." (use-package prettier-js :ensure t :hook (typescript-mode . prettier-js-mode)) -;; 2023-09-03 Trying eglot instead of TIDE for now. -;; (use-package tide :ensure t) +(use-package tide :ensure t) ;; ================================================================= ;; Archive mode for appx