Skip to content

Commit

Permalink
some emacs 29 fixes and tweaks
Browse files Browse the repository at this point in the history
- some ts-mode healing (opt out for python and json, heal clang-format binding)
- missing ensure in diminish
- use symbol not string for gptel model
- tidy up duplicate native-comp setting i already had in early-init.el
- initial frame start maximized
  • Loading branch information
PalaceChan authored and PalaceChan committed Dec 10, 2024
1 parent 69dcc9a commit 1c3c99f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
14 changes: 12 additions & 2 deletions config.org
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,11 @@ from [[https://gist.github.com/karthink/af013ffd77fe09e67360f040b57b4c7b][karthi
:defer t
:config
(bind-key "C-c b" #'clang-format-buffer c-mode-base-map))

(use-package c-ts-mode
:defer t
:config
(bind-key "C-c b" #'clang-format-buffer c++-ts-mode-map))
#+END_SRC
** company
*** company
Expand Down Expand Up @@ -1003,7 +1008,7 @@ https://github.com/karthink/gptel
(setq-local gptel--system-message (alist-get 'default gptel-directives)))
:hook (gptel-mode . ava/init-gptel-mode)
:custom
(gptel-model "gpt-4o")
(gptel-model 'gpt-4o)
(gptel-default-mode 'org-mode)
(gptel-track-media t)
(gptel-directives '((default . "You are a helpful assistant living inside Emacs. The user is a computer programmer. Your responses are always concise, succinct, and to the point. You never apologize for confusions as that wastes time. If you generate blocks using three backticks inspect your response and add the appropriate programming language after the opening backticks.")
Expand Down Expand Up @@ -1658,7 +1663,12 @@ as per https://github.com/jorgenschaefer/elpy/issues/1729)
:if (version<= "29" emacs-version)
:ensure nil
:custom
(treesit-font-lock-level 4))
(treesit-font-lock-level 4)
:config
; opt out for these
(setq major-mode-remap-alist
'((python-ts-mode python-mode) ; issues with elpy
(json-ts-mode json-mode)))) ; issues with json

(use-package treesit-auto
:if (version<= "29" emacs-version)
Expand Down
3 changes: 2 additions & 1 deletion early-init.el
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

(setq frame-resize-pixelwise t
fast-but-imprecise-scrolling t
frame-inhibit-implied-resize t)
frame-inhibit-implied-resize t
initial-frame-alist '((fullscreen . maximized)))

(when (native-comp-available-p)
(setq package-native-compile t
Expand Down
6 changes: 2 additions & 4 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
(package-install 'use-package))

(require 'use-package)
(use-package diminish)
(use-package diminish
:ensure t)
(use-package bind-key)
(setq use-package-enable-imenu-support t)

Expand All @@ -32,9 +33,6 @@
(time-subtract after-init-time before-init-time)))
gcs-done)))

(when (native-comp-available-p)
(setq native-comp-async-report-warnings-errors 'silent))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; LITERATE CONFIG
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand Down

0 comments on commit 1c3c99f

Please sign in to comment.