diff --git a/.emacs.d/custom.el b/.emacs.d/custom.el index 3b5a74e..da3be99 100644 --- a/.emacs.d/custom.el +++ b/.emacs.d/custom.el @@ -58,7 +58,7 @@ '(org-odd-levels-only t) '(org-todo-keywords '((sequence "TODO" "|" "DONE" "ABANDONED" "DEFERRED"))) '(package-selected-packages - '(sql-indent eglot-java vterm lsp-pyright blacken nyan-mode earthfile-mode compat adaptive-wrap terraform-mode deadgrep protobuf-mode bazel howm python-mode color-theme-sanityinc-solarized monokai-theme rust-mode tide typescript-mode modus-themes tree-sitter flycheck-rust eglot ink-mode prettier-js zig-mode esup gnu-elpa-keyring-update lsp-hack hack-mode filladapt lsp-ui yaml-mode wgrep fsharp-mode company-lsp cquery mustache-mode clang-format projectile dash-functional mocha add-node-modules-path rjsx-mode xref-js2 js2-refactor company geiser cider clojure-mode graphviz-dot-mode multi-term xterm-color thrift markdown-mode tuareg merlin ag use-package flycheck dockerfile-mode js2-mode web-mode tss switch-window paredit magit lua-mode go-mode go-autocomplete exec-path-from-shell color-theme-monokai auto-complete auto-complete-nxml flymake flyspell json-mode popup ruby-mode company-jedi elm-mode monky color-theme-sanityinc-tomorrow)) + '(vterm lsp-pyright blacken nyan-mode earthfile-mode compat adaptive-wrap terraform-mode deadgrep protobuf-mode bazel howm python-mode color-theme-sanityinc-solarized monokai-theme rust-mode tide typescript-mode modus-themes tree-sitter flycheck-rust eglot ink-mode prettier-js zig-mode esup gnu-elpa-keyring-update lsp-hack hack-mode filladapt lsp-ui yaml-mode wgrep fsharp-mode company-lsp cquery mustache-mode clang-format projectile dash-functional mocha add-node-modules-path rjsx-mode xref-js2 js2-refactor company geiser cider clojure-mode graphviz-dot-mode multi-term xterm-color thrift markdown-mode tuareg merlin ag use-package flycheck dockerfile-mode js2-mode web-mode tss switch-window paredit magit lua-mode go-mode go-autocomplete exec-path-from-shell color-theme-monokai auto-complete auto-complete-nxml flymake flyspell json-mode popup ruby-mode company-jedi elm-mode monky color-theme-sanityinc-tomorrow)) '(reb-re-syntax 'string) '(rmail-mail-new-frame t) '(safe-local-variable-values diff --git a/.emacs.d/init.el b/.emacs.d/init.el index fd57b6b..ecce961 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -323,7 +323,6 @@ (elisp "https://github.com/Wilfred/tree-sitter-elisp") (go "https://github.com/tree-sitter/tree-sitter-go") (html "https://github.com/tree-sitter/tree-sitter-html") - (java "https://github.com/tree-sitter/tree-sitter-java" "master" "src") (javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src") (json "https://github.com/tree-sitter/tree-sitter-json") (make "https://github.com/alemuller/tree-sitter-make") @@ -335,13 +334,11 @@ (typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src") (yaml "https://github.com/ikatyang/tree-sitter-yaml"))) - (add-to-list 'major-mode-remap-alist '(rust-mode . rust-ts-mode)) + ;; (add-to-list 'major-mode-remap-alist '(rust-mode . rust-ts-mode)) ) -(defun install-known-tree-sitter-grammars () - "Install all known tree-sitter grammars." - (interactive) - (mapc #'treesit-install-language-grammar (mapcar #'car treesit-language-source-alist))) +;; Install them all: +;; (mapc #'treesit-install-language-grammar (mapcar #'car treesit-language-source-alist)) ;; 2023-08-28 Maybe I like line numbers everywhere? Who can say? (add-hook 'prog-mode-hook 'display-line-numbers-mode) @@ -415,7 +412,6 @@ :commands (eglot-ensure eglot) :hook (python-mode . eglot-ensure) - (python-ts-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) @@ -549,7 +545,7 @@ Or, uh, Objective C, I guess." (add-hook 'c-mode-hook 'my-c-mode-hook) (add-hook 'c++-mode-hook 'my-c-mode-hook) -;; (add-hook 'java-mode-hook 'my-c-mode-hook) +(add-hook 'java-mode-hook 'my-c-mode-hook) (add-hook 'objc-mode-hook 'my-c-mode-hook) (defconst jd-more-keywords @@ -792,14 +788,14 @@ Or, uh, Objective C, I guess." (string-match-p "TARGETS" (buffer-file-name))) (blacken-mode))) -;; (use-package python-mode :ensure -;; :init -;; ;; NOTE: Not using :mode here because it implies :defer which... doesn't -;; ;; work with python-mode because it fights the built-in python mode. -;; (add-to-list 'auto-mode-alist '("\\.py$" . python-mode)) -;; :config -;; (add-to-list 'interpreter-mode-alist '("python" . python-mode)) -;; (add-hook 'python-mode-hook 'my-python-mode-hook)) +(use-package python-mode :ensure + :init + ;; NOTE: Not using :mode here because it implies :defer which... doesn't + ;; work with python-mode because it fights the built-in python mode. + (add-to-list 'auto-mode-alist '("\\.py$" . python-mode)) + :config + (add-to-list 'interpreter-mode-alist '("python" . python-mode)) + (add-hook 'python-mode-hook 'my-python-mode-hook)) (use-package blacken :ensure :commands (blacken-mode) @@ -1285,18 +1281,4 @@ Or, uh, Objective C, I guess." (use-package earthfile-mode :ensure :mode ("\\.earth\\'" "Earthfile\\'")) -;; ================================================================= -;; Java -;; ================================================================= -(use-package eglot-java :ensure - :after (eglot) - :hook - (java-mode . eglot-java-mode)) - -;; ================================================================= -;; SQL? -;; ================================================================= -(use-package sql-indent :ensure) - - ;;; init.el ends here