emacs 29 config
use-package, treesitter, elixir-ts, eglot
This commit is contained in:
100
.emacs
Normal file
100
.emacs
Normal file
@ -0,0 +1,100 @@
|
||||
(use-package emacs
|
||||
:ensure nil
|
||||
:custom
|
||||
(treesit-language-source-alist
|
||||
'((heex "https://github.com/phoenixframework/tree-sitter-heex")
|
||||
(elixir "https://github.com/elixir-lang/tree-sitter-elixir")))
|
||||
|
||||
(major-mode-remap-alist
|
||||
'((elixir-mode . elixir-ts-mode))))
|
||||
|
||||
(use-package eglot
|
||||
:ensure nil
|
||||
:config
|
||||
(add-to-list 'eglot-server-programs
|
||||
`((elixir-ts-mode heex-ts-mode) .
|
||||
,(if (and (fboundp 'w32-shell-dos-semantics)
|
||||
(w32-shell-dos-semantics))
|
||||
'("language_server.bat")
|
||||
(eglot-alternatives
|
||||
'("language_server.sh"
|
||||
"/home/marmalade/dev/stuff/3rdparty/lexical/_build/dev/package/lexical/bin/start_lexical.sh"))))))
|
||||
|
||||
(use-package elixir-ts-mode
|
||||
:ensure t
|
||||
:hook
|
||||
(elixir-ts-mode . eglot-ensure)
|
||||
(elixir-ts-mode
|
||||
.
|
||||
(lambda ()
|
||||
(push '(">=" . ?\u2265) prettify-symbols-alist)
|
||||
(push '("<=" . ?\u2264) prettify-symbols-alist)
|
||||
(push '("!=" . ?\u2260) prettify-symbols-alist)
|
||||
(push '("==" . ?\u2A75) prettify-symbols-alist)
|
||||
(push '("=~" . ?\u2245) prettify-symbols-alist)
|
||||
(push '("<-" . ?\u2190) prettify-symbols-alist)
|
||||
(push '("->" . ?\u2192) prettify-symbols-alist)
|
||||
(push '("<-" . ?\u2190) prettify-symbols-alist)
|
||||
(push '("|>" . ?\u25B7) prettify-symbols-alist)))
|
||||
(before-save . eglot-format))
|
||||
|
||||
(use-package exec-path-from-shell
|
||||
:if (memq window-system '(mac ns x))
|
||||
:ensure t
|
||||
:init
|
||||
(setq exec-path-from-shell-variables '("PATH" "MANPATH"))
|
||||
:config
|
||||
(exec-path-from-shell-initialize))
|
||||
|
||||
(use-package rainbow-delimiters
|
||||
:ensure t)
|
||||
|
||||
(use-package prog-mode
|
||||
:ensure nil
|
||||
:hook ((prog-mode . rainbow-delimiters-mode)))
|
||||
|
||||
(use-package projectile
|
||||
:ensure t
|
||||
:bind-keymap ("s-p" . projectile-command-map)
|
||||
:init
|
||||
(setq projectile-mode-line-function '(lambda () (format " [%s]" (projectile-project-name))))
|
||||
:config
|
||||
(projectile-mode +1))
|
||||
|
||||
(use-package company
|
||||
:ensure t
|
||||
:delight company-mode
|
||||
:demand t
|
||||
:init
|
||||
(setq company-idle-delay 0.1
|
||||
company-minimum-prefix-length 1)
|
||||
:bind (:map company-active-map
|
||||
("C-n" . company-select-next)
|
||||
("C-p". company-select-previous))
|
||||
:config
|
||||
(global-company-mode))
|
||||
|
||||
(use-package paredit
|
||||
:ensure t)
|
||||
|
||||
(add-to-list 'package-archives
|
||||
'("melpa" . "https://melpa.org/packages/") t)
|
||||
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(custom-enabled-themes '(leuven))
|
||||
'(inhibit-startup-screen t)
|
||||
'(initial-scratch-message nil)
|
||||
'(package-selected-packages
|
||||
'(company projectile rainbow-delimiters exec-path-from-shell elixir-mode elixir-ts-mode paredit par-edit use-package org))
|
||||
'(scroll-bar-mode nil)
|
||||
'(tool-bar-mode nil))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(default ((t (:family "Inconsolata" :foundry "PfEd" :slant normal :weight medium :height 158 :width normal)))))
|
Reference in New Issue
Block a user