Compare commits
No commits in common. "2150285aea1df36c8f351334347c9a2f5f21a3b1" and "b9559eabe09657fdb80bc50b38f48c7df072cf2d" have entirely different histories.
2150285aea
...
b9559eabe0
16 changed files with 376 additions and 359 deletions
393
elpaca.lock
393
elpaca.lock
File diff suppressed because it is too large
Load diff
|
|
@ -73,11 +73,9 @@
|
||||||
(setopt create-lockfiles nil)
|
(setopt create-lockfiles nil)
|
||||||
|
|
||||||
;; Enable line numbers and show cursors position
|
;; Enable line numbers and show cursors position
|
||||||
(dolist (mode '(prog-mode-hook
|
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
|
||||||
text-mode-hook
|
(add-hook 'text-mode-hook 'display-line-numbers-mode)
|
||||||
conf-mode-hook))
|
(add-hook 'conf-mode-hook 'display-line-numbers-mode)
|
||||||
(add-hook mode 'display-line-numbers-mode))
|
|
||||||
|
|
||||||
;; (global-display-line-numbers-mode t)
|
;; (global-display-line-numbers-mode t)
|
||||||
(column-number-mode t)
|
(column-number-mode t)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
;; These packages are foundational dependency and possibly can be blocking.
|
;; These packages are foundational dependency and possibly can be blocking.
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
;; Nice menus
|
|
||||||
(use-package transient :ensure t)
|
(use-package transient :ensure t)
|
||||||
|
(use-package company :ensure t)
|
||||||
|
|
||||||
;; Finally, wait for installation of these four packages.
|
;; Finally, wait for installation of these four packages.
|
||||||
(if (fboundp 'elpaca-wait)
|
(if (fboundp 'elpaca-wait)
|
||||||
|
|
|
||||||
97
lisp/icejam-company-yasnippet.el
Normal file
97
lisp/icejam-company-yasnippet.el
Normal file
|
|
@ -0,0 +1,97 @@
|
||||||
|
;;; icejam-company-yasnippet.el -- summary -*- lexical-binding: t; -*-
|
||||||
|
;;; Commentary:
|
||||||
|
;;; Company completion framework configuration
|
||||||
|
;;; Code:
|
||||||
|
(require 'icejam-blocking)
|
||||||
|
|
||||||
|
(use-package yasnippet :ensure t :defer t
|
||||||
|
:hook ((elpaca-after-init . yas-global-mode))
|
||||||
|
:config
|
||||||
|
(unbind-key "C-c & C-n" yas-minor-mode-map)
|
||||||
|
(unbind-key "C-c & C-s" yas-minor-mode-map)
|
||||||
|
(unbind-key "C-c & C-v" yas-minor-mode-map))
|
||||||
|
|
||||||
|
(use-package yasnippet-snippets :ensure t :after (yasnippet))
|
||||||
|
|
||||||
|
(use-package kind-icon
|
||||||
|
:ensure t
|
||||||
|
:after company
|
||||||
|
:config
|
||||||
|
(let* ((kind-func (lambda (candidate) (company-call-backend 'kind candidate)))
|
||||||
|
(formatter (kind-icon-margin-formatter `((company-kind . ,kind-func)))))
|
||||||
|
(defun icejam-company-kind-icon-margin (candidate _selected)
|
||||||
|
(funcall formatter candidate))
|
||||||
|
(setopt company-format-margin-function #'icejam-company-kind-icon-margin)))
|
||||||
|
|
||||||
|
(with-eval-after-load 'company
|
||||||
|
(global-company-mode t)
|
||||||
|
|
||||||
|
;; Hacks for orderless
|
||||||
|
(defun just-one-face (fn &rest args)
|
||||||
|
(let ((orderless-match-faces [completions-common-part]))
|
||||||
|
(apply fn args)))
|
||||||
|
|
||||||
|
(advice-add 'company-capf--candidates :around #'just-one-face)
|
||||||
|
|
||||||
|
(defun company-completion-styles (capf-fn &rest args)
|
||||||
|
(let ((completion-styles '(partial-completion basic)))
|
||||||
|
(apply capf-fn args)))
|
||||||
|
|
||||||
|
(advice-add 'company-capf :around #'company-completion-styles)
|
||||||
|
|
||||||
|
(setq-default
|
||||||
|
company-minimum-prefix-length 3 ;; minimum prefix character number for auto complete.
|
||||||
|
company-idle-delay 0.1
|
||||||
|
company-require-match nil
|
||||||
|
company-echo-delay 0 ;;;; company-show-numbers t
|
||||||
|
company-tooltip-align-annotations t ;; align annotations to the right tooltip border.
|
||||||
|
company-tooltip-flip-when-above t
|
||||||
|
company-tooltip-limit 10 ;; tooltip candidates max limit.
|
||||||
|
company-tooltip-minimum 2 ;; minimum candidates limit.
|
||||||
|
company-tooltip-minimum-width 10 ;; The minimum width of the tooltip's inner area.
|
||||||
|
;; This doesn't include the margins and the scroll bar.
|
||||||
|
company-tooltip-margin 2 ;; width of margin columns to show around the tooltip
|
||||||
|
company-tooltip-offset-display 'lines ;; 'lines - how to show tooltip unshown candidates number.
|
||||||
|
company-show-numbers nil ;; t: show quick-access numbers for the first ten candidates.
|
||||||
|
company-selection-wrap-around t ;; loop over candidates
|
||||||
|
company-dabbrev-other-buffers t ;; Only offer dabbrev from the same major mode
|
||||||
|
company-dabbrev-downcase nil ;; Preserve case of candidates
|
||||||
|
company-format-margin-function nil
|
||||||
|
;; company-async-wait 0.03
|
||||||
|
;; company-async-timeout 2
|
||||||
|
)
|
||||||
|
|
||||||
|
;; Absolute defaults for company mode
|
||||||
|
(setopt company-backends
|
||||||
|
'((company-files ; files & directory
|
||||||
|
company-keywords ; keywords
|
||||||
|
company-capf)
|
||||||
|
(company-dabbrev company-abbrev)
|
||||||
|
))
|
||||||
|
|
||||||
|
;; Use standard emacs next and previous bindings for navigating company
|
||||||
|
;; suggestions
|
||||||
|
(define-key company-active-map (kbd "C-p") 'company-select-previous-or-abort)
|
||||||
|
(define-key company-active-map (kbd "C-n") 'company-select-next-or-abort)
|
||||||
|
|
||||||
|
(defun icejam-insert-space-and-complete ()
|
||||||
|
"Insert space before trying to complete a section."
|
||||||
|
(interactive)
|
||||||
|
(save-excursion
|
||||||
|
(insert " "))
|
||||||
|
(company-indent-or-complete-common))
|
||||||
|
|
||||||
|
;; Only use RETURN for completion in company
|
||||||
|
(unbind-key "TAB" company-active-map)
|
||||||
|
|
||||||
|
;; Yasnippet configuration
|
||||||
|
(define-key prog-mode-map (kbd "C-c y") 'company-yasnippet)
|
||||||
|
(define-key prog-mode-map (kbd "<f13>") 'icejam-insert-space-and-complete)
|
||||||
|
(define-key prog-mode-map (kbd "TAB") 'company-indent-or-complete-common)
|
||||||
|
|
||||||
|
(define-key text-mode-map (kbd "C-c y") 'company-yasnippet)
|
||||||
|
(define-key text-mode-map (kbd "<f13>") 'icejam-insert-space-and-complete)
|
||||||
|
(define-key text-mode-map (kbd "TAB") 'company-indent-or-complete-common))
|
||||||
|
|
||||||
|
(provide 'icejam-company-yasnippet)
|
||||||
|
;;; icejam-company-yasnippet.el ends here
|
||||||
|
|
@ -1,64 +0,0 @@
|
||||||
;;; icejam-complete-at-point.el -- summary -*- lexical-binding: t; -*-
|
|
||||||
;;; Commentary:
|
|
||||||
;;; Company completion framework configuration
|
|
||||||
;;; Code:
|
|
||||||
(require 'icejam-blocking)
|
|
||||||
|
|
||||||
(use-package yasnippet :ensure t :defer t
|
|
||||||
:hook ((elpaca-after-init . yas-global-mode))
|
|
||||||
:config
|
|
||||||
(unbind-key "C-c & C-n" yas-minor-mode-map)
|
|
||||||
(unbind-key "C-c & C-s" yas-minor-mode-map)
|
|
||||||
(unbind-key "C-c & C-v" yas-minor-mode-map))
|
|
||||||
|
|
||||||
(use-package yasnippet-snippets :ensure t :after (yasnippet))
|
|
||||||
|
|
||||||
|
|
||||||
;; Corfu is the main engine for displaying suggestions.
|
|
||||||
(use-package corfu :ensure t :defer t
|
|
||||||
:hook ((elpaca-after-init . global-corfu-mode)
|
|
||||||
(global-corfu-mode . corfu-popupinfo-mode))
|
|
||||||
:config
|
|
||||||
;; Go up to go the the last item on the list
|
|
||||||
(setopt corfu-cycle t)
|
|
||||||
|
|
||||||
;; Show 20 corfu
|
|
||||||
(setopt corfu-count 20)
|
|
||||||
|
|
||||||
;; Max width of the corfu frame
|
|
||||||
(setopt corfu-max-width 120)
|
|
||||||
|
|
||||||
(setopt corfu-right-margin-width 0.5)
|
|
||||||
(setopt corfu-left-margin-width 0.5)
|
|
||||||
(setopt corfu-bar-width 0.5)
|
|
||||||
(setopt corfu-auto-delay 0.2)
|
|
||||||
(setopt corfu-popupinfo-delay '(0.4 . 0.2))
|
|
||||||
(setopt corfu-auto t)
|
|
||||||
(setopt corfu-quit-no-match 'separator))
|
|
||||||
|
|
||||||
;; Allow corfu to work in terminal
|
|
||||||
(use-package corfu-terminal :ensure t :defer t
|
|
||||||
:if (not (display-graphic-p))
|
|
||||||
:hook ((elpaca-after-init . corfu-terminal-mode)))
|
|
||||||
|
|
||||||
;; These are actual completions
|
|
||||||
(use-package cape :ensure t :after corfu
|
|
||||||
:config
|
|
||||||
;; Set default completion values:
|
|
||||||
(set-default 'completion-at-point-functions
|
|
||||||
(list (cape-capf-super #'lsp-completion-at-point
|
|
||||||
#'yasnippet-capf)
|
|
||||||
#'cape-dabbrev
|
|
||||||
#'cape-file)))
|
|
||||||
|
|
||||||
(use-package yasnippet-capf :ensure t :after corfu
|
|
||||||
:config (setopt yasnippet-capf-lookup-by 'name))
|
|
||||||
|
|
||||||
(use-package nerd-icons-corfu :ensure t
|
|
||||||
:after corfu
|
|
||||||
:config
|
|
||||||
(declare-function nerd-icons-corfu-formatter 'nerd-icons-corfu)
|
|
||||||
(add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter))
|
|
||||||
|
|
||||||
(provide 'icejam-complete-at-point)
|
|
||||||
;;; icejam-complete-at-point.el ends here
|
|
||||||
|
|
@ -85,59 +85,60 @@
|
||||||
(defgroup :icejam nil "My customisation group.")
|
(defgroup :icejam nil "My customisation group.")
|
||||||
|
|
||||||
;; General configuration files.
|
;; General configuration files.
|
||||||
(use-package icejam-keys-mode :ensure nil)
|
(require 'icejam-keys-mode)
|
||||||
(use-package icejam-blocking :ensure nil)
|
(require 'icejam-blocking)
|
||||||
(use-package icejam-base :ensure nil)
|
(require 'icejam-base)
|
||||||
(use-package icejam-sys-specific :ensure nil)
|
(require 'icejam-sys-specific)
|
||||||
(use-package icejam-tree-sitter :ensure nil)
|
(require 'icejam-tree-sitter)
|
||||||
(use-package icejam-completing-read :ensure nil)
|
(require 'icejam-completing-read)
|
||||||
(use-package icejam-avy :ensure nil)
|
(require 'icejam-avy)
|
||||||
(use-package icejam-transient :ensure nil)
|
(require 'icejam-transient)
|
||||||
(use-package icejam-prog-mode :ensure nil)
|
(require 'icejam-prog-mode)
|
||||||
(use-package icejam-complete-at-point :ensure nil)
|
(require 'icejam-company-yasnippet)
|
||||||
(use-package icejam-copilot :ensure nil)
|
(require 'icejam-copilot)
|
||||||
(use-package icejam-flycheck :ensure nil)
|
(require 'icejam-flycheck)
|
||||||
(use-package icejam-ispell :ensure nil)
|
(require 'icejam-ispell)
|
||||||
(use-package icejam-deft :ensure nil)
|
(require 'icejam-deft)
|
||||||
(use-package icejam-lsp :ensure nil)
|
(require 'icejam-lsp)
|
||||||
(use-package icejam-dashboard :ensure nil)
|
(require 'icejam-dashboard)
|
||||||
(use-package icejam-magit :ensure nil)
|
(require 'icejam-magit)
|
||||||
(use-package icejam-vundo :ensure nil)
|
(require 'icejam-vundo)
|
||||||
(use-package icejam-speed-type :ensure nil)
|
(require 'icejam-speed-type)
|
||||||
|
|
||||||
;; Themes
|
;; Themes
|
||||||
(use-package icejam-themes :ensure nil)
|
(require 'icejam-themes)
|
||||||
(use-package icejam-fonts :ensure nil)
|
(require 'icejam-fonts)
|
||||||
|
|
||||||
;; Actual supported languages and file syntax.
|
;; Actual supported languages and file syntax.
|
||||||
(use-package icejam-lang-clang :ensure nil)
|
(require 'icejam-lang-clang)
|
||||||
(use-package icejam-lang-clojure :ensure nil)
|
(require 'icejam-lang-clojure)
|
||||||
(use-package icejam-lang-dart :ensure nil)
|
;; (require 'icejam-lang-common-lisp)
|
||||||
(use-package icejam-lang-dhall :ensure nil)
|
(require 'icejam-lang-dart)
|
||||||
(use-package icejam-lang-elisp :ensure nil)
|
(require 'icejam-lang-dhall)
|
||||||
(use-package icejam-lang-elixir :ensure nil)
|
(require 'icejam-lang-elisp)
|
||||||
(use-package icejam-lang-erlang :ensure nil)
|
(require 'icejam-lang-elixir)
|
||||||
(use-package icejam-lang-fsharp :ensure nil)
|
(require 'icejam-lang-erlang)
|
||||||
(use-package icejam-lang-gleam :ensure nil)
|
(require 'icejam-lang-fsharp)
|
||||||
(use-package icejam-lang-golang :ensure nil)
|
(require 'icejam-lang-gleam)
|
||||||
(use-package icejam-lang-haskell :ensure nil)
|
(require 'icejam-lang-golang)
|
||||||
(use-package icejam-lang-javascript :ensure nil)
|
(require 'icejam-lang-haskell)
|
||||||
(use-package icejam-lang-kotlin :ensure nil)
|
(require 'icejam-lang-javascript)
|
||||||
(use-package icejam-lang-lean :ensure nil)
|
(require 'icejam-lang-kotlin)
|
||||||
(use-package icejam-lang-markdown :ensure nil)
|
(require 'icejam-lang-lean)
|
||||||
(use-package icejam-lang-ocaml :ensure nil)
|
(require 'icejam-lang-markdown)
|
||||||
(use-package icejam-lang-other :ensure nil)
|
(require 'icejam-lang-ocaml)
|
||||||
(use-package icejam-lang-php :ensure nil)
|
(require 'icejam-lang-other)
|
||||||
(use-package icejam-lang-purescript :ensure nil)
|
(require 'icejam-lang-php)
|
||||||
(use-package icejam-lang-python :ensure nil)
|
(require 'icejam-lang-purescript)
|
||||||
(use-package icejam-lang-ruby :ensure nil)
|
(require 'icejam-lang-python)
|
||||||
(use-package icejam-lang-rust :ensure nil)
|
(require 'icejam-lang-ruby)
|
||||||
(use-package icejam-lang-sh :ensure nil)
|
(require 'icejam-lang-rust)
|
||||||
(use-package icejam-lang-web :ensure nil)
|
(require 'icejam-lang-sh)
|
||||||
(use-package icejam-lang-ziglang :ensure nil)
|
(require 'icejam-lang-web)
|
||||||
|
(require 'icejam-lang-ziglang)
|
||||||
|
|
||||||
;; Diminish modeline litter
|
;; Diminish modeline litter
|
||||||
(use-package icejam-diminish :ensure nil)
|
(require 'icejam-diminish)
|
||||||
|
|
||||||
;; Restore GC to normal, but still high
|
;; Restore GC to normal, but still high
|
||||||
(setopt gc-cons-threshold 204800000)
|
(setopt gc-cons-threshold 204800000)
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
(flycheck flycheck-mode)
|
(flycheck flycheck-mode)
|
||||||
(rainbow-mode rainbow-mode)
|
(rainbow-mode rainbow-mode)
|
||||||
(undo-tree undo-tree-mode)
|
(undo-tree undo-tree-mode)
|
||||||
|
(company company-mode)
|
||||||
(which-key which-key-mode)
|
(which-key which-key-mode)
|
||||||
(eldoc eldoc-mode)
|
(eldoc eldoc-mode)
|
||||||
(yasnippet yas-minor-mode)
|
(yasnippet yas-minor-mode)
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@
|
||||||
;; (defconst icejam-font "Iosevka Term" "Default font.")
|
;; (defconst icejam-font "Iosevka Term" "Default font.")
|
||||||
|
|
||||||
(defconst icejam-font-family "Iosevka Comfy Motion" "Default font.")
|
(defconst icejam-font-family "Iosevka Comfy Motion" "Default font.")
|
||||||
(defconst icejam-variable-font-family "Lexica Ultralegible" "Variable pitch font.")
|
|
||||||
(defconst icejam-markdown-font-family "Iosevka Term" "Font used to render code blocks in markdown.")
|
(defconst icejam-markdown-font-family "Iosevka Term" "Font used to render code blocks in markdown.")
|
||||||
|
|
||||||
;; Require dash functions to be included:
|
;; Require dash functions to be included:
|
||||||
|
|
@ -42,11 +41,6 @@ in `icejam-set-font-to-screen`.")
|
||||||
"Current font, defaults to the one loaded in the beginning."
|
"Current font, defaults to the one loaded in the beginning."
|
||||||
:type 'string
|
:type 'string
|
||||||
:group 'icejam)
|
:group 'icejam)
|
||||||
(defcustom icejam-mut-variable-font-family
|
|
||||||
icejam-font-family
|
|
||||||
"Current variable-pitch font. Defaults to `icejam-variable-font-family`."
|
|
||||||
:type 'string
|
|
||||||
:group 'icejam)
|
|
||||||
(defcustom icejam-mut-markdown-font-family
|
(defcustom icejam-mut-markdown-font-family
|
||||||
icejam-markdown-font-family
|
icejam-markdown-font-family
|
||||||
"Current markdown font family, defaults to the one loaded in the beginning."
|
"Current markdown font family, defaults to the one loaded in the beginning."
|
||||||
|
|
@ -77,14 +71,14 @@ in `icejam-set-font-to-screen`.")
|
||||||
"Set font to FAMILY and its HEIGHT to X.
|
"Set font to FAMILY and its HEIGHT to X.
|
||||||
|
|
||||||
Not all faces will be set to this value. Some of them look better with being
|
Not all faces will be set to this value. Some of them look better with being
|
||||||
slightly smaller than the default face, by 1 point. Those are: `tooltip'.
|
slightly smaller than the default face, by 1 point. Those are: `tooltip',
|
||||||
|
`company-tooltip', `company-tooltip-annotation', `company-tooltip-mouse'.
|
||||||
|
|
||||||
Modeline faces (`mode-line' and `mode-line-inactive') look better if they are
|
Modeline faces (`mode-line' and `mode-line-inactive') look better if they are
|
||||||
two points smaller."
|
two points smaller."
|
||||||
(interactive "sNew font: \nnEnter height for %s: ")
|
(interactive "sNew font: \nnEnter height for %s: ")
|
||||||
(setopt icejam-mut-font-family family)
|
(setopt icejam-mut-font-family family)
|
||||||
(setopt icejam-mut-font-height height)
|
(setopt icejam-mut-font-height height)
|
||||||
(setopt icejam-mut-variable-font-family icejam-variable-font-family)
|
|
||||||
|
|
||||||
;; Set default font.
|
;; Set default font.
|
||||||
(set-face-attribute 'default nil
|
(set-face-attribute 'default nil
|
||||||
|
|
@ -92,14 +86,11 @@ two points smaller."
|
||||||
:height (-> height
|
:height (-> height
|
||||||
(* 10)))
|
(* 10)))
|
||||||
|
|
||||||
;; Set variable-pitch font
|
|
||||||
(set-face-attribute 'variable-pitch nil
|
|
||||||
:family icejam-mut-variable-font-family
|
|
||||||
:height (-> height
|
|
||||||
(* 10)))
|
|
||||||
|
|
||||||
;; Some font faces look better when they are 1 point smaller.
|
;; Some font faces look better when they are 1 point smaller.
|
||||||
(dolist (face '(tooltip))
|
(dolist (face '(tooltip
|
||||||
|
company-tooltip
|
||||||
|
company-tooltip-annotation
|
||||||
|
company-tooltip-mouse))
|
||||||
(set-face-attribute face nil :height (-> height
|
(set-face-attribute face nil :height (-> height
|
||||||
(- 1)
|
(- 1)
|
||||||
(* 10))))
|
(* 10))))
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
|
|
||||||
(if (memq window-system '(x mac ns))
|
(if (memq window-system '(x mac ns))
|
||||||
(enable-theme 'icejam-base16-zenburn)
|
(enable-theme 'icejam-base16-zenburn)
|
||||||
(enable-theme 'icejam-base16-zenburn)))
|
(enable-theme 'icejam-base16-zenburn)))
|
||||||
|
|
||||||
(provide 'icejam-themes)
|
(provide 'icejam-themes)
|
||||||
;;; icejam-themes.el ends here
|
;;; icejam-themes.el ends here
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,8 @@
|
||||||
("r" "Replace" vr/replace)
|
("r" "Replace" vr/replace)
|
||||||
("i" "Indent" indent-region)]
|
("i" "Indent" indent-region)]
|
||||||
["Complete"
|
["Complete"
|
||||||
|
("y" "Snippet" company-yasnippet)
|
||||||
|
("m" "Any (Company)" company-complete)
|
||||||
("g" "Ask GPT" gptel-menu)
|
("g" "Ask GPT" gptel-menu)
|
||||||
("a" "Aider" aider-transient-menu)
|
("a" "Aider" aider-transient-menu)
|
||||||
("e" "Refactor (Elysium)" elysium-query)]
|
("e" "Refactor (Elysium)" elysium-query)]
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,10 @@
|
||||||
|
|
||||||
(if (boundp 'c-default-style)
|
(if (boundp 'c-default-style)
|
||||||
(setq-local c-default-style "bsd")
|
(setq-local c-default-style "bsd")
|
||||||
(defvar c-default-style "bsd")))
|
(defvar c-default-style "bsd"))
|
||||||
|
|
||||||
|
(add-to-list (make-local-variable 'company-backends)
|
||||||
|
'(company-etags company-yasnippet)))
|
||||||
|
|
||||||
(add-hook 'c-mode-hook 'icejam-lang-activate-clang-mode)
|
(add-hook 'c-mode-hook 'icejam-lang-activate-clang-mode)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require 'icejam-prog-mode)
|
(require 'icejam-prog-mode)
|
||||||
(require 'icejam-complete-at-point)
|
(require 'icejam-company-yasnippet)
|
||||||
|
|
||||||
(use-package slime :ensure t)
|
(use-package slime :ensure t)
|
||||||
(use-package slime-company :ensure t
|
(use-package slime-company :ensure t
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,20 @@
|
||||||
;;; languages/elisp -- summary -*- lexical-binding: t; -*-
|
;;; languages/elisp -- summary -*- lexical-binding: t; -*-
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require 'icejam-prog-mode)
|
(require 'icejam-prog-mode)
|
||||||
(require 'icejam-transient)
|
(require 'icejam-transient)
|
||||||
|
|
||||||
|
;; Dash is a package that creates terse and more natural to me functions to
|
||||||
|
;; do basic things in Elisp.
|
||||||
|
(use-package dash :ensure t :defer t)
|
||||||
|
(use-package lispy :ensure t :defer t)
|
||||||
|
(use-package aggressive-indent :ensure t :defer t)
|
||||||
|
|
||||||
|
(declare-function aggressive-indent-mode "aggressive-indent")
|
||||||
(declare-function column-enforce-n "column-enforce-mode" (number))
|
(declare-function column-enforce-n "column-enforce-mode" (number))
|
||||||
(add-to-list 'auto-mode-alist '("/Eask\\'" . emacs-lisp-mode))
|
(add-to-list 'auto-mode-alist '("/Eask\\'" . emacs-lisp-mode))
|
||||||
|
|
||||||
(use-package lispy :ensure t :defer t)
|
|
||||||
|
|
||||||
(transient-define-prefix icejam-elisp-lang-menu ()
|
(transient-define-prefix icejam-elisp-lang-menu ()
|
||||||
"Elisp Buffer Commands."
|
"Elisp Buffer Commands."
|
||||||
[""
|
[""
|
||||||
|
|
@ -23,19 +29,19 @@
|
||||||
(add-to-list
|
(add-to-list
|
||||||
'icejam-language-transient-alist '(emacs-lisp-mode . icejam-elisp-lang-menu))
|
'icejam-language-transient-alist '(emacs-lisp-mode . icejam-elisp-lang-menu))
|
||||||
|
|
||||||
|
(declare-function lispy-mode "lispy")
|
||||||
(defun icejam-activate-emacs-lisp-mode ()
|
(defun icejam-activate-emacs-lisp-mode ()
|
||||||
"Goodies for editing Emacs files."
|
"Goodies for editing Emacs files."
|
||||||
|
|
||||||
(icejam-set-indent 2) ;; Default indentation of 2 characters
|
(icejam-set-indent 2) ;; Default indentation of 2 characters
|
||||||
(column-enforce-n 80) ;; Use 80 char limit.
|
(column-enforce-n 80)
|
||||||
(lispy-mode t) ;; Modal editing for Lisp
|
|
||||||
|
|
||||||
(setq-local completion-at-point-functions
|
(dash-fontify-mode t) ;; Fontify dash variables
|
||||||
(list (cape-capf-super #'elisp-completion-at-point
|
(lispy-mode t) ;; Pseudomodal editing for lisp code
|
||||||
#'yasnippet-capf)
|
(aggressive-indent-mode) ;; Indent lisp automatically
|
||||||
#'cape-dabbrev
|
|
||||||
#'cape-file
|
;; Company list override
|
||||||
#'cape-elisp-symbol)))
|
(add-to-list (make-local-variable 'company-backends)
|
||||||
|
'(company-yasnippet company-capf)))
|
||||||
|
|
||||||
(add-hook 'emacs-lisp-mode-hook 'icejam-activate-emacs-lisp-mode)
|
(add-hook 'emacs-lisp-mode-hook 'icejam-activate-emacs-lisp-mode)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,11 +43,7 @@
|
||||||
|
|
||||||
(setq-local lsp-eldoc-enable-hover nil)
|
(setq-local lsp-eldoc-enable-hover nil)
|
||||||
(setq-local lsp-completion-enable-additional-text-edit nil)
|
(setq-local lsp-completion-enable-additional-text-edit nil)
|
||||||
(setq-local completion-at-point-functions
|
(setq-local company-minimum-prefix-length 3))
|
||||||
(list (cape-capf-super #'lsp-completion-at-point
|
|
||||||
#'yasnippet-capf)
|
|
||||||
#'cape-dabbrev
|
|
||||||
#'cape-file)))
|
|
||||||
|
|
||||||
(add-hook 'heex-ts-mode-hook 'icejam-activate-elixir-ts-mode)
|
(add-hook 'heex-ts-mode-hook 'icejam-activate-elixir-ts-mode)
|
||||||
(add-hook 'elixir-ts-mode-hook 'icejam-activate-elixir-ts-mode)
|
(add-hook 'elixir-ts-mode-hook 'icejam-activate-elixir-ts-mode)
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@
|
||||||
(purescript-indentation-mode t)
|
(purescript-indentation-mode t)
|
||||||
|
|
||||||
;; Company list override
|
;; Company list override
|
||||||
)
|
(add-to-list (make-local-variable 'company-backends)
|
||||||
|
'(company-capf company-yasnippet)))
|
||||||
|
|
||||||
(add-hook 'purescript-mode-hook 'icejam-activate-purescript-mode)
|
(add-hook 'purescript-mode-hook 'icejam-activate-purescript-mode)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,11 @@
|
||||||
(column-enforce-n 99)
|
(column-enforce-n 99)
|
||||||
|
|
||||||
;; Run LSP
|
;; Run LSP
|
||||||
(lsp-deferred))
|
(lsp-deferred)
|
||||||
|
|
||||||
|
;; Company list override
|
||||||
|
(add-to-list (make-local-variable 'company-backends)
|
||||||
|
'(company-capf company-yasnippet)))
|
||||||
|
|
||||||
(add-hook 'rust-mode-hook 'icejam-activate-rust-mode)
|
(add-hook 'rust-mode-hook 'icejam-activate-rust-mode)
|
||||||
(add-hook 'rust-mode-hook 'flycheck-rust-setup)
|
(add-hook 'rust-mode-hook 'flycheck-rust-setup)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue