Fix a number of warnings and updated issues

This commit is contained in:
Howard Abrams 2026-02-10 10:10:58 -08:00
parent aed214e4eb
commit b5eade0051
3 changed files with 20 additions and 16 deletions

View file

@ -33,8 +33,9 @@ While Emacs supplies a Python editing environment, well still use =use-packag
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package python (use-package python
:after flycheck :after flycheck
:mode ("[./]flake8\\'" . conf-mode) :mode (((rx ".flake8" eol) . conf-mode)
:mode ("/Pipfile\\'" . conf-mode) ((rx "Pipfile" eol) . conf-mode)
((rx ".wsgi" eol) . python-mode))
:init :init
(setq python-indent-guess-indent-offset-verbose nil (setq python-indent-guess-indent-offset-verbose nil
flycheck-flake8-maximum-line-length 120) flycheck-flake8-maximum-line-length 120)

View file

@ -138,10 +138,10 @@ I appreciate calling =hi-lock-face-symbol-at-point= (or =highlight-symbol-at-poi
:config :config
(setq ahs-idle-interval 0.1) (setq ahs-idle-interval 0.1)
(set-face-attribute ahs-face nil :foreground nil :background nil (set-face-attribute ahs-face nil :foreground 'unspecified :background 'unspecified
:weight 'ultra-bold :slant 'italic) :weight 'ultra-bold :slant 'italic)
(set-face-attribute ahs-plugin-default-face nil :foreground nil (set-face-attribute ahs-plugin-default-face nil :foreground 'unspecified
:background nil :weight 'bold :slant 'normal)) :background 'unspecified :weight 'bold :slant 'normal))
#+end_src #+end_src
Instead of calling =global-auto-highlight-symbol-mode=, we should just hook it to the =prog-mode=: Instead of calling =global-auto-highlight-symbol-mode=, we should just hook it to the =prog-mode=:
@ -370,7 +370,7 @@ Normally, you would need to add all the projects to directory clones in =~/src=
https://github.com/tree-sitter/tree-sitter-go https://github.com/tree-sitter/tree-sitter-go
https://github.com/tree-sitter/tree-sitter-javascript https://github.com/tree-sitter/tree-sitter-javascript
https://github.com/tree-sitter/tree-sitter-templ https://github.com/tree-sitter/tree-sitter-templ
https://github.com/ikatyang/tree-sitter-yaml https://github.com/tree-sitter-grammars/tree-sitter-yaml
https://github.com/tree-sitter/tree-sitter-json https://github.com/tree-sitter/tree-sitter-json
https://github.com/tree-sitter/tree-sitter-css https://github.com/tree-sitter/tree-sitter-css
https://github.com/tree-sitter/tree-sitter-python https://github.com/tree-sitter/tree-sitter-python
@ -422,7 +422,7 @@ In most cases,the =npm install= /usually/ works, but I may work on some sort of
#+end_src #+end_src
At this point, we can now parse stuff using: =tree-sitter parse <source-code-file>= At this point, we can now parse stuff using: =tree-sitter parse <source-code-file>=
**** Emacs Part **** Emacs Part
However, Emacs already has the ability to download and install grammars, so following instructions from Mickey Petersens essay on [[https://www.masteringemacs.org/article/combobulate-structured-movement-editing-treesitter][using Tree-sitter with Combobulate]]: Note that Emacs already has the ability to download and install grammars, so following instructions from Mickey Petersens essay on [[https://www.masteringemacs.org/article/combobulate-structured-movement-editing-treesitter][using Tree-sitter with Combobulate]]:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(when (treesit-available-p) (when (treesit-available-p)
(use-package treesit (use-package treesit
@ -460,7 +460,7 @@ However, Emacs already has the ability to download and install grammars, so foll
(toml "https://github.com/tree-sitter/tree-sitter-toml") (toml "https://github.com/tree-sitter/tree-sitter-toml")
;; (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src") ;; (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")
;; (typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src") ;; (typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")
(yaml "https://github.com/ikatyang/tree-sitter-yaml"))) (yaml "https://github.com/tree-sitter-grammars/tree-sitter-yaml")))
(defun mp-setup-install-grammars () (defun mp-setup-install-grammars ()
"Install Tree-sitter grammars if they are absent." "Install Tree-sitter grammars if they are absent."

View file

@ -50,16 +50,19 @@ Will Schenk has [[https://willschenk.com/articles/2020/tramp_tricks/][a simple e
(tramp-remote-shell-args ("-i") ("-c")))) (tramp-remote-shell-args ("-i") ("-c"))))
tramp-methods) tramp-methods)
(defadvice tramp-completion-handle-file-name-all-completions (defun ha-tramp-completion-docker (orig-fun &rest args)
(around dotemacs-completion-docker activate) "Advice for `tramp-completion-handle-file-name-all-completions`.
"(tramp-completion-handle-file-name-all-completions \"\" \"/docker:\" returns Return active Docker container names when completing for `/docker:`."
a list of active Docker container names, followed by colons." (if (equal (nth 1 args) "/docker:")
(if (equal (ad-get-arg 1) "/docker:")
(let* ((command "docker ps --format '{{.Names}}:'") (let* ((command "docker ps --format '{{.Names}}:'")
(dockernames-raw (shell-command-to-string command)) (dockernames-raw (shell-command-to-string command))
(dockernames (split-string dockernames-raw "\n"))) (dockernames (split-string dockernames-raw "\n" t)))
(setq ad-return-value dockernames)) dockernames)
ad-do-it))) ;; Call the original function
(apply orig-fun args)))
(advice-add 'tramp-completion-handle-file-name-all-completions
:around #'ha-tramp-completion-docker)
#+end_src #+end_src
Keep in mind you need to /name/ your Docker session, with the =—name= option. I actually do more docker work on remote systems (as Docker seems to make my fans levitate my laptop over the desk). Granted, the =URL= is a bit lengthy, for instance: Keep in mind you need to /name/ your Docker session, with the =—name= option. I actually do more docker work on remote systems (as Docker seems to make my fans levitate my laptop over the desk). Granted, the =URL= is a bit lengthy, for instance: