Compare commits

..

3 commits

3 changed files with 45 additions and 39 deletions

View file

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

View file

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

View file

@ -78,8 +78,8 @@ in
bind-key e select-pane -U bind-key e select-pane -U
bind-key i select-pane -R bind-key i select-pane -R
bind-key -r C-h select-window -t :- bind-key -r C-h select-window -t previous-window
bind-key -r C-i select-window -t :+ bind-key -r C-i select-window -t next-window
bind-key -r H resize-pane -L 5 bind-key -r H resize-pane -L 5
bind-key -r N resize-pane -D 5 bind-key -r N resize-pane -D 5