Compare commits

..

No commits in common. "e89d20735acae48bc3e8ed40e2ca2afc752ca1a0" and "a7cdc18134d425018cec41b856c192c6229c063b" have entirely different histories.

3 changed files with 39 additions and 45 deletions

View file

@ -716,7 +716,7 @@ Use =corfu= with =dabbrev= (included with emacs)
("M-/" 'dabbrev-completion)
("C-M-/" 'dabbrev-expand)
:custom
(dabbrev-ignored-buffer-regexps '((rx ".(?:pdf|jpe?g|png)" eos))))
(dabbrev-ignored-buffer-regexps '("\\.\\(?:pdf\\|jpe?g\\|png\\)\\'")))
#+end_src
*** Misc
@ -1049,13 +1049,17 @@ Automatically use the =<lang>-ts-mode= when it is available
(fset #'json--log-event #'ignore) ;; Performance boost by not logging every event
(add-to-list 'eglot-server-programs
'((toml-mode toml-ts-mode conf-toml-mode) . ("taplo" "lsp" "stdio")))
;; (add-to-list 'eglot-server-programs
;; `((elixir-mode elixir-ts-mode heex-ts-mode) .
;; ,(eglot-alternatives '(("nextls" "--stdio=true"
;; :initializationOptions (:experimental (:completions (:enable t))))
;; "elixir-ls"))))
;;
(add-to-list 'eglot-server-programs
`((elixir-ts-mode heex-ts-mode) .
,(eglot-alternatives '("lexical" "elixir-ls"))))
(add-to-list 'eglot-server-programs
'(dhall-mode . ("dhall-lsp-server")))
(add-to-list 'eglot-server-programs
'((html-mode mhtml-mode) . ("superhtml" "lsp")))
(add-to-list 'eglot-stay-out-of 'flymake)
(setq eglot-autoshutdown t
eldoc-echo-area-use-multiline-p 0.1)
@ -1128,8 +1132,8 @@ Indent 2 spaces
(use-package js2-mode
:after eglot
:mode
((rx ".mjs" eos) . js2-mode)
((rx ".jsx?" eos) . js2-jsx-mode)
("\\.mjs\\'" . js2-mode)
("\\.jsx?\\'" . js2-jsx-mode)
:hook
(js2-mode . eglot-ensure)
(js2-jsx-mode . eglot-ensure))
@ -1150,7 +1154,7 @@ TypeScript stuff
(use-package typescript-mode
:after eglot
:mode
((rx ".tsx?" eos) . typescript-mode)
("\\.tsx?\\'" . typescript-mode)
:hook (typescript-mode . eglot-ensure))
#+end_src
@ -1166,7 +1170,7 @@ Prefer local packages from =node_modules= to global ones
#+begin_src emacs-lisp
(use-package web-mode
:mode (rx ".svelte" eos)
:mode "\\.svelte\\'"
:after eglot
:config
(setq web-mode-markup-indent-offset 2
@ -1177,12 +1181,12 @@ Prefer local packages from =node_modules= to global ones
web-mode-enable-current-element-highlight t
web-mode-enable-current-column-highlight t)
(add-to-list 'web-mode-engines-alist '(("elixir" . (rx ".html.heex" eos))
("jinja2" . (rx ".jinja2" eos))
("python" . (rx ".pt" eos)) ; Chameleon templates
("svelte" . (rx ".svelte" eos))))
(add-to-list 'web-mode-engines-alist '(("elixir" . "\\.html.heex\\'")
("jinja2" . "\\.jinja2\\'")
("python" . "\\.pt\\'")
("svelte" . "\\.svelte\\'")))
:hook
((mhtml-mode css-mode web-mode) . eglot-ensure))
((html-mode css-mode web-mode) . eglot-ensure))
#+end_src
*** Markdown
@ -1193,9 +1197,9 @@ Prefer local packages from =node_modules= to global ones
(use-package markdown-mode
:after eglot
:mode
(((rx "README.md" eos) . gfm-mode)
((rx ".md" eos) . markdown-mode)
((rx ".markdown" eos) . markdown-mode))
(("README\\.md\\'" . gfm-mode)
("\\.md\\'" . markdown-mode)
("\\.markdown\\'" . markdown-mode))
:init
(setq markdown-command "multimarkdown")
:hook
@ -1230,7 +1234,7 @@ Add support for Elixir with [[https://github.com/elixir-editors/emacs-elixir][el
:after eglot
:hook ((elixir-mode . eglot-ensure))
:config
(add-to-list 'auto-mode-alist '((rx ".[hl]eex") . elixir-mode)))
(add-to-list 'auto-mode-alist '("\\.[hl]eex\\'" . elixir-mode)))
#+end_src
#+begin_src emacs-lisp
@ -1252,9 +1256,9 @@ Add a [[https://github.com/ayrat555/mix.el][mix]] minor mode to call =mix= tasks
#+begin_src emacs-lisp
(use-package erlang
:mode
((rx ".P" eos) . erlang-mode)
((rx ".E" eos) . erlang-mode)
((rx ".S" eos) . erlang-mode)
("\\.P\\'" . erlang-mode)
("\\.E\\'" . erlang-mode)
("\\.S\\'" . erlang-mode)
:config
(require 'erlang-start))
#+end_src
@ -1328,7 +1332,7 @@ Support for TOML files with [[https://github.com/dryman/toml-mode.el][toml-mode]
#+begin_src emacs-lisp :tangle no
(use-package toml-mode
:mode ((rx ".toml" eos) . conf-toml-mode))
:mode ("\\.toml\\'" . conf-toml-mode))
#+end_src
*** Docker
@ -1413,7 +1417,7 @@ Add QML mode
#+begin_src emacs-lisp
(use-package qml-mode
:mode (rx ".qml" eos))
:mode "\\.qml\\'")
#+end_src
Enable and configure =auto-insert-mode= for Horus projects
@ -1425,7 +1429,7 @@ Enable and configure =auto-insert-mode= for Horus projects
(when (file-executable-p my/generate-cpp-file-executable)
(define-auto-insert
(rx ".[ch]pp" eos)
"\\.[ch]pp\\'"
(lambda nil (call-process my/generate-cpp-file-executable nil t nil buffer-file-name))))
@ -1446,7 +1450,7 @@ Add [[https://github.com/NixOS/nix-mode][nix-mode]]
#+begin_src emacs-lisp
(use-package nix-mode
:after eglot
:mode (rx ".nix" eos)
:mode "\\.nix\\'"
:hook (nix-mode . eglot-ensure))
#+end_src
@ -1472,7 +1476,7 @@ Common Lisp does not use =lsp-mode=, but has it's own environment: [[https://git
:config
(slime-setup '(slime-fancy slime-quicklisp slime-asdf))
:mode
(((rx ".cl" eos) . lisp-mode))
(("\\.cl\\'" . lisp-mode))
:hook
(lisp-mode . (lambda () (slime-mode t)))
(inferior-lisp-mode . (lambda () (inferior-slime-mode t))))
@ -1483,7 +1487,7 @@ Common Lisp does not use =lsp-mode=, but has it's own environment: [[https://git
#+begin_src emacs-lisp
(use-package sly
:mode
(((rx ".cl" eos) . lisp-mode))
(("\\.cl\\'" . lisp-mode))
:config
(setq sly-lisp-implementations
'((sbcl ("sbcl") :coding-system utf-8-unix))
@ -1571,7 +1575,7 @@ It's better than nothing.
(use-package feature-mode
:config
(setq feature-use-docker-compose nil)
:mode (rx ".feature" eos))
:mode "\\.feature\\'")
#+end_src
*** Protobuf
@ -1632,7 +1636,7 @@ Dhall is a programmable configuration language that you can think of as: JSON +
#+begin_src emacs-lisp
(use-package dhall-mode
:mode (rx ".dhall" eos))
:mode "\\.dhall\\'")
#+end_src
*** nushell
@ -1689,16 +1693,7 @@ Gleam has an official emacs mode: [[https://github.com/gleam-lang/gleam-mode][gl
#+begin_src emacs-lisp
(use-package gleam-ts-mode
:mode (rx ".gleam" eos)
:hook (gleam-ts-mode . eglot-ensure))
#+end_src
Configure eglot to use the Gleam LSP server
#+begin_src emacs-lisp
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'(gleam-ts-mode . ("gleam" "lsp"))))
:mode (rx ".gleam" eos))
#+end_src
* Org
@ -1766,7 +1761,7 @@ Configuration
#+name: org-config
#+begin_src emacs-lisp :tangle no
(add-to-list 'auto-mode-alist '((rx ".org" eos) . org-mode))
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(dolist (face '((org-level-1 . 1.2)
(org-level-2 . 1.1)
(org-level-3 . 1.05)

View file

@ -62,7 +62,6 @@ let
tree-sitter-embedded-template
tree-sitter-erlang
tree-sitter-fish
tree-sitter-gleam
tree-sitter-glsl
tree-sitter-go
tree-sitter-gomod

View file

@ -78,8 +78,8 @@ in
bind-key e select-pane -U
bind-key i select-pane -R
bind-key -r C-h select-window -t previous-window
bind-key -r C-i select-window -t next-window
bind-key -r C-h select-window -t :-
bind-key -r C-i select-window -t :+
bind-key -r H resize-pane -L 5
bind-key -r N resize-pane -D 5
@ -89,10 +89,10 @@ in
bind-key C-[ swap-window -t -1
bind-key C-] swap-window -t +1
bind-key -T copy-mode-vi h send-keys -X cursor-left
bind-key -T copy-mode-vi n send-keys -X cursor-down
bind-key -T copy-mode-vi e send-keys -X cursor-up
bind-key -T copy-mode-vi i send-keys -X cursor-right
bind-key -T copy-mode-vi h send-keys -X cursor-left
bind-key -T copy-mode-vi n send-keys -X cursor-down
bind-key -T copy-mode-vi e send-keys -X cursor-up
bind-key -T copy-mode-vi i send-keys -X cursor-right
set -g mouse on
bind-key -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"