blob: 0368008fcf70ff62e7d74e021117007576b1951c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
|
;; -*- lexical-binding: t -*-
;; Copyright © 2018-2025 Uko Koknevics
;; Make sure early-init has been loaded.
(unless (boundp 'loaded-early-init)
(load (expand-file-name "early-init" (file-name-directory load-file-name)) nil t))
(when (version< emacs-version "29.1")
(error "Using %s. Minimum supported version is 29.1."
(emacs-version)))
(setq-default user-full-name "Uko Kokņevičs"
user-email-address "perkontevs@gmail.com")
(defconst +emacs29+ (version< emacs-version "30.0"))
(defconst +linux+ (eq system-type 'gnu/linux))
(defconst +mac+ (eq system-type 'darwin))
(defconst +bsd+ (or +mac+ (eq system-type 'berkeley-unix)))
(defconst +windows+ (memq system-type '(cygwin windows-nt ms-dos)))
(defconst base-dir user-emacs-directory)
(defconst local-dir (expand-file-name "local" base-dir))
(defconst local-config-dir (expand-file-name "config" local-dir))
(defconst tmp-dir (expand-file-name "tmp" local-dir))
(defconst shared-dir (expand-file-name "shared" base-dir))
;; Early configurations
(setq shared-game-score-directory (expand-file-name "shared-game-score" shared-dir))
(use-package cus-edit
:defer t
:custom
(custom-file (expand-file-name "custom.el" shared-dir)))
(defun $adv-write-to-sane-paths (fn &rest args)
"Write 3rd party files to `local-config-dir` to keep `user-emacs-directory` clean."
(let ((user-emacs-directory local-config-dir)
(user-init-file custom-file))
(apply fn args)))
(use-package files
:defer t
:custom
(auto-mode-case-fold nil)
(auto-save-file-name-transforms `((".*" ,tmp-dir t)))
(backup-directory-alist `((".*" . ,tmp-dir)))
(major-mode-remap-alist '((c-mode . c-ts-mode)
(c-or-c++-mode . c-or-c++-ts-mode)
(c++-mode . c++-ts-mode)
(cmake-mode . cmake-ts-mode)
(csharp-mode . csharp-ts-mode)
(css-mode . css-ts-mode)
(dockerfile-mode . dockerfile-ts-mode)
(go-mode . go-ts-mode)
(go-mod-mode . go-mod-ts-mode)
(html-mode . mhtml-mode)
(java-mode . java-ts-mode)
(js-mode . js-ts-mode)
(json-mode . json-ts-mode)
(python-mode . python-ts-mode)
(ruby-mode . ruby-ts-mode)
(rust-mode . rust-ts-mode)
(yaml-mode . yaml-ts-mode)
(toml-mode . toml-ts-mode)
(tsx-mode . tsx-ts-mode)
(typescript-mode . typescript-ts-mode)))
:config
(advice-add #'locate-user-emacs-file :around #'$adv-write-to-sane-paths))
(when (file-exists-p custom-file)
(load custom-file))
(add-to-list 'load-path (expand-file-name "arkta" user-emacs-directory))
(use-package novice
:defer t
:config
(advice-add #'enable-command :around #'$adv-write-to-sane-paths)
(advice-add #'disable-command :around #'$adv-write-to-sane-paths))
;; Improve Emacs security somewhat
(setq gnutls-min-prime-bits 3072
gnutls-verify-error (and (fboundp 'gnutls-available-p)
(gnutls-available-p)
(not (getenv-internal "INSECURE")))
tls-checktrust gnutls-verify-error
tls-program '("openssl s_client -connect %h:%p -CAfile %t -nbio -no_ssl3 -no_tls1 -no_tls1_1 -ign_eof"
"gnutls-cli -p %p --dh-bits=3072 --ocsp --x509cafile=%t --strict-tofu --priority='SECURE128:+SECURE192:-VERS-ALL:+VERS-TLS1.2:+VERS-TLS1.3' %h"
"gnutls-cli -p %p %h"))
(when (boundp 'libgnutls-version)
(setq gnutls-algorithm-priority
(concat "SECURE128:+SECURE192:-VERS-ALL"
(if (and (not +windows+)
(>= libgnutls-version 30605))
":+VERS-TLS1.3"
":+VERS-TLS1.2"))))
(use-package auth-source
:defer t
:custom
;; Make sure authinfo is GPG'd
(auth-sources (list (expand-file-name "authinfo.gpg" local-config-dir)
"~/.authinfo.gpg")))
(use-package ffap
:defer t
:custom
;; Don't ping random stuff
(ffap-machine-p-known 'reject))
(use-package startup
:defer t
:custom
(inhibit-default-init t)
(inhibit-startup-echo-area-message user-login-name)
(inhibit-startup-screen t)
(initial-major-mode 'fundamental-mode)
(initial-scratch-message nil))
;; Don't draw stuff in other windows.
(setq-default cursor-in-non-selected-windows nil)
(setq highlight-nonselected-windows nil)
;; Faster scrolling
(setq fast-but-imprecise-scrolling t)
;; Inhibit frame resizing
(setq frame-inhibit-implied-resize t)
;; Don’t compact font caches during GC.
(setq inhibit-compacting-font-caches t)
(setq read-process-output-max (* 64 1024))
;; Don't fontify if stuck on reading input
(setq redisplay-skip-fontification-on-input t)
(when +windows+
(setq w32-get-true-file-attributes nil
w32-pipe-read-delay 0
w32-pipe-buffer-size read-process-output-max))
;; Install straight.el
(defvar bootstrap-version)
(let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 6))
(unless (file-exists-p bootstrap-file)
(message "This might take a long time...")
(with-current-buffer
(url-retrieve-synchronously "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file))
(defun arkta/update-packages ()
(interactive)
(straight-pull-all)
(straight-freeze-versions))
(defun arkta/fix-versions ()
(interactive)
;; Thaw & freeze to make sure we also freeze new stuff
(straight-thaw-versions)
(straight-freeze-versions))
;; use-package
;; TODO: Check how to do add smth like `:advice (fn :around advice)` sometime
(use-package use-package)
;; compat
(use-package compat-30
:if +emacs29+
:straight 'compat)
;; Helper functions
(defmacro defsetter (name &rest emacs-names)
(let ((name (intern (concat "set-" (symbol-name name)))))
`(defun ,name (value &optional default)
(if default
(progn
,@(mapcar (lambda (name) `(setq-default ,name value)) emacs-names))
,@(mapcar (lambda (name) `(setq ,name value)) emacs-names)))))
(defsetter fill-width fill-column)
(defsetter tab-usage indent-tabs-mode)
(defsetter tab-width c-basic-offset nasm-offset standard-indent tab-width)
;; Miscellany
(set-fill-width 120 t)
(set-tab-usage nil t)
(set-tab-width 4 t)
;; HIC SVNT DRACONES
(use-package ace-window
:straight t
:bind (([remap other-window] . ace-window)
("C-x o" . ace-window)))
(use-package amx
:straight t
:config
(amx-mode +1))
(use-package ansi-color
:hook (compilation-filter . ansi-color-compilation-filter)
:custom
(ansi-color-for-compilation-mode t))
(use-package c-ts-mode
:after treesit
:straight '(c-ts-mode :type built-in)
:mode ("\\.c\\'"
("\\.cpp\\'" . c++-ts-mode))
:init
(defun arkta/c-setup ()
(set-tab-usage t)
(set-tab-width c-ts-mode-indent-offset))
:hook (c-ts-base-mode . arkta/c-setup)
:custom
(c-ts-mode-indent-offset 8)
(c-ts-mode-indent-style (lambda ()
`(((node-is ")") parent-bol 0)
((node-is "}") parent-bol 0)
((node-is "access_specifier") parent-bol 0)
((parent-is "argument_list") parent-bol c-ts-mode-indent-offset)
((parent-is "parameter_list") parent-bol c-ts-mode-indent-offset)
((parent-is "field_declaration_list") parent-bol c-ts-mode-indent-offset)
,@(alist-get 'linux (c-ts-mode--indent-styles 'c))))))
(use-package centaur-tabs
:straight t
:demand t
:init
(defun arkta/disable-centaur-tabs-mode ()
(centaur-tabs-local-mode +1))
:hook (dashboard-mode . arkta/disable-centaur-tabs-mode)
:bind (("C-x <C-right>" . centaur-tabs-forward)
("C-x <right>" . centaur-tabs-forward)
("C-x <C-left>" . centaur-tabs-backward)
("C-x <left>" . centaur-tabs-backward))
:custom
(centaur-tabs-style "alternate")
(centaur-tabs-height 35)
(centaur-tabs-icon-type 'nerd-icons)
(centaur-tabs-set-icons t)
(centaur-tabs-gray-out-icons 'buffer)
(centaur-tabs-set-bar 'over)
(centaur-tabs-set-close-button nil)
(centaur-tabs-set-modified-marker t)
(centaur-tabs-modified-marker "●")
(centaur-tabs-cycle-scope 'tabs)
:config
(centaur-tabs-mode +1))
(use-package cmake-ts-mode
:after treesit
:straight '(cmake-ts-mode :type built-in)
:mode ("CMakeLists\\.txt\\'"
"\\.cmake\\'"))
(use-package company
:straight t
:custom
(company-format-margin-function #'company-text-icons-margin)
(company-text-face-extra-attributes '(:weight bold))
(company-text-icons-add-background t)
(company-tooltip-flip-when-above nil)
(company-tooltip-limit 6)
(company-tooltip-minimum 6)
(company-tooltip-offset-display 'lines)
:config
(global-company-mode +1))
(use-package compile
:straight '(compile :type built-in)
:bind (("C-c k" . compile)))
(use-package copyright
:straight '(copyright :type built-in)
:init
(defun arkta/maybe-fix-copyright ()
(save-mark-and-excursion
(copyright-update)
(copyright-fix-years)))
:hook (before-save . arkta/maybe-fix-copyright)
:custom
(copyright-names-regexp "Eris\\|Ukko\\|Uko\\|Free Software")
(copyright-year-ranges t))
(use-package counsel
:straight t
:after amx
:config
(counsel-mode +1))
(use-package csharp-mode
:after treesit
:straight '(csharp-mode :type built-in)
:mode "\\.cs\\'")
(use-package css-mode
:after treesit
:straight '(css-mode :type built-in)
:mode "\\.css\\'")
(use-package dart-mode
:straight t
:mode "\\.dart\\'")
(use-package dashboard
:straight t
:demand t
:hook (server-after-make-frame . dashboard-open)
:custom
(dashboard-center-content nil)
(dashboard-startup-banner (expand-file-name "logo.png" user-emacs-directory))
(dashboard-items '((projects . 5) (recents . 5) (bookmarks . 5)))
(dashboard-projects-backend 'project-el)
(dashboard-set-heading-icons t)
(dashboard-set-file-icons t)
(dashboard-set-init-info t)
:config
(dashboard-setup-startup-hook))
(use-package display-fill-column-indicator
:straight '(display-fill-column-indicator :type built-in)
:demand t
:init
(defun arkta/disable-dfci ()
(display-fill-column-indicator-mode -1))
:hook (dashboard-mode . arkta/disable-dfci)
:config
(global-display-fill-column-indicator-mode +1))
(use-package display-line-numbers
:straight '(display-line-numbers :type built-in)
:demand t
:init
(defun arkta/disable-dln ()
(display-line-numbers-mode -1))
:hook ((dashboard-mode help-mode) . arkta/disable-dln)
:config
(global-display-line-numbers-mode +1))
(use-package dockerfile-ts-mode
:after treesit
:straight '(dockerfile-ts-mode :type built-in)
:mode "Dockerfile\\'")
(use-package doom-modeline
:straight t
:custom
(doom-modeline-bar-width 4)
(doom-modeline-battery t)
(doom-modeline-buffer-file-true-name t)
(doom-modeline-height 25)
(doom-modeline-hud t)
(doom-modeline-hud-min-height 6)
(doom-modeline-icon t)
(doom-modeline-percent-position nil)
(doom-modeline-project-detection 'project)
(doom-modeline-total-line-number t)
:config
(doom-modeline-mode +1))
(use-package ebuild-mode
:straight t
:mode ("\\.ebuild\\'"
"\\.eclass\\'"))
(use-package editorconfig
:straight t
:config
(editorconfig-mode +1))
(use-package eglot
:straight '(eglot :type built-in)
:hook ((gdscript-mode go-ts-mode) . eglot-ensure)
:custom
(eglot-ignored-server-capabilities '(:documentFormattingProvider
:documentRangeFormattingProvider
:documentOnTypeFormattingProvider))
(eglot-autoshutdown t))
(use-package elisp-mode
:straight '(elisp-mode :type built-in)
:mode ("\\.el\\'" . emacs-lisp-mode)
:init
(use-package auto-compile
:straight t
:hook ((emacs-lisp-mode . auto-compile-on-load-mode)
(emacs-lisp-mode . auto-compile-on-save-mode))))
(use-package elixir-mode
:straight t
:mode "\\.exs?\\'"
:init
(defun arkta/elixir-setup ()
(add-hook 'before-save-hook #'elixir-format nil t))
:hook (elixir-mode . arkta/elixir-setup))
(use-package emojify
:straight t
:config
(global-emojify-mode +1))
(use-package elpher
:straight t
:commands (elpher)
:custom (elpher-default-url-type "gemini"))
(use-package envrc
:straight t
;; This actually has to be hooked to after-init to be one of the first minor modes enabled
:hook (after-init . envrc-global-mode))
(use-package faces
:straight '(faces :type built-in)
:custom-face
(default ((t (:weight medium
:slant normal
:width normal
:font "Input Mono"
:height 130)))))
(use-package gcmh
:straight t
:custom
(gcmh-idle-delay 'auto)
(gcmh-auto-idle-delay-factor 10)
(gcmh-high-cons-threshold (* 16 1024 1024))
:config
(gcmh-mode +1))
(use-package gdscript-mode
:straight t
:mode "\\.gd\\'")
(use-package git-gutter
:straight t
:config
(global-git-gutter-mode +1))
(use-package go-ts-mode
:after treesit
:straight '(go-ts-mode :type built-in)
:mode "\\.go\\'"
:init
(defun arkta/go-setup ()
(add-hook 'before-save-hook #'gofmt-before-save nil t)
(set-tab-usage t)
(set-tab-width go-ts-mode-indent-offset))
:hook (go-ts-mode . arkta/go-setup))
(use-package groovy-mode
:straight t
:mode ("Jenkinsfile\\'"
"\\.gradle\\'"
"\\.groovy\\'"))
(use-package haskell-mode
:straight t
:mode "\\.hs\\'")
(use-package hl-line
:straight '(hl-line :type built-in)
:config
(global-hl-line-mode +1))
(use-package hl-todo
:straight t
:config
(global-hl-todo-mode +1))
(use-package ibuffer
:straight '(ibuffer :type built-in)
:bind (("C-x C-b" . ibuffer)
([remap list-buffers] . ibuffer)))
(use-package ivy
:after (counsel swiper)
:straight t
:demand t
:bind (("C-c r" . ivy-resume)
("C-c v" . ivy-push-view)
("C-c V" . ivy-pop-view))
:custom
(ivy-use-virtual-buffers t)
(ivy-count-format "(%d/%d) ")
:config
(ivy-mode +1))
(use-package java-ts-mode
:after treesit
:straight '(java-ts-mode :type built-in)
:mode "\\.java\\'")
(use-package js
:after treesit
:straight '(js :type built-in)
:mode ("\\.js\\'" . js-ts-mode))
(use-package json-ts-mode
:after treesit
:straight '(json-ts-mode :type built-in)
:mode "\\.json\\'")
(use-package lisp-mode
:straight '(lisp-mode :type built-in)
:mode "\\.lisp\\'"
:init
(use-package slime
:straight t
:after lisp-mode
:commands slime
:custom
(inferior-lisp-program (executable-find "sbcl"))))
(use-package lua-mode
:straight t
:custom
(lua-indent-level 4)
:mode ("\\.lua\\'" "\\.rockspec\\'"))
(use-package magit
;; TODO: Do some proper setup
:straight t)
(use-package make-mode
:straight '(make-mode :type built-in)
:mode (("Makefile\\'" . makefile-gmake-mode)
"GNUmakefile\\'"
"\\.mk\\(\\.template\\)?\\'"))
(use-package markdown-mode
:straight t
:mode ("\\.md\\'" . gfm-mode))
(use-package modus-themes
:straight t
:config
(load-theme 'modus-operandi))
(use-package nasm-mode
:straight t
:mode ("\\.asm\\'"
"\\.inc\\'")
:init
(defun arkta/nasm-setup ()
(set-tab-width 4))
:hook (nasm-mode . arkta/nasm-setup))
(use-package nerd-icons
:straight t
:init
(defun arkta/nerd-icons-maybe-install-fonts ()
(when (and (display-graphic-p)
(not (find-font (font-spec :family nerd-icons-font-family))))
;; TODO: Maybe also reinstall them every month or so
(nerd-icons-install-fonts t)))
:hook ((after-init server-after-make-frame) . arkta/nerd-icons-maybe-install-fonts))
(use-package nix-mode
:straight t
:mode "\\.nix\\'")
(use-package nxml-mode
:straight '(nxml-mode :type built-in)
:mode ("\\.xml\\'"
"\\.plist\\'"
"\\.svg\\'"))
(use-package org
:straight '(org :type built-in)
:bind (("C-c l" . org-store-link)
("C-c a" . org-agenda))
:mode ("\\.org\\'" . org-mode)
:init
(use-package htmlize
:straight t)
:custom
(org-agenda-files '("~/TODO.org"))
(org-log-done t))
(use-package php-mode
:straight t
:mode "\\.php\\'")
(use-package pico8-mode
:straight '(pico8-mode :host github
:repo "Kaali/pico8-mode")
:mode "\\.p8\\'")
;; use-package project
(require 'arkta-project)
(use-package prolog
:straight '(prolog :type built-in)
:mode ("\\.pl\\'" . prolog-mode))
(use-package python
:after treesit
:straight '(python :type built-in)
:mode ("\\.py\\'" . python-ts-mode))
(use-package rainbow-delimiters
:straight t
:hook ((emacs-lisp-mode lisp-mode scheme-mode) . rainbow-delimiters-mode))
(use-package rainbow-mode
:straight t
:init
(defun arkta/enable-rainbow ()
(rainbow-mode +1))
:hook (prog-mode . arkta/enable-rainbow))
(use-package ruby-ts-mode
:after treesit
:straight '(ruby-ts-mode :type built-in)
:mode "\\.rb\\'")
(use-package rust-ts-mode
:after treesit
:straight '(rust-ts-mode :type built-in)
:mode "\\.rs\\'")
(use-package scala-mode
:straight t
:mode "\\.scala\\'")
(use-package scheme
:straight '(scheme :type built-in)
:commands scheme-mode
:mode ("\\.scm\\'" . scheme-mode)
:config
(put 'module 'scheme-indent-function 2))
(use-package scroll-bar
:straight '(scroll-bar :type built-in)
:defer t
:config
(scroll-bar-mode -1))
(use-package server
:config
(setq server-socket-dir (expand-file-name local-dir "server")))
(use-package simple
:straight (simple :type built-in)
:hook ((text-mode . turn-on-auto-fill)
(before-save . delete-trailing-whitespace))
:custom
(backward-delete-char-untabify-method nil))
(use-package smalltalk-mode
:straight t
:mode "\\.st\\'")
(use-package sml-mode
:straight t
:mode "\\.sml\\'"
:init
(use-package company-mlton
:after company
:straight '(company-mlton :host github
:repo "MatthewFluet/company-mlton")
:hook (sml-mode . company-mlton-init)))
(use-package solaire-mode
:straight t
:config
(solaire-global-mode +1))
(use-package svelte-mode
:straight t
:mode ("\\.svelte\\'" "\\.svx\\'"))
(use-package swiper
:straight t
:bind (([remap isearch-forward] . swiper-isearch)
([remap isearch-backward] . swiper-isearch-backward)
("C-s" . swiper-isearch)
("C-r" . swiper-isearch-backward)))
(use-package time
:straight '(time :type built-in)
:custom
(display-time-default-load-average nil)
:config
(display-time-mode +1))
(use-package toml-ts-mode
:after treesit
:straight '(toml-ts-mode :type built-in)
:mode "\\.toml\\'")
(use-package tool-bar
:straight '(tool-bar :type built-in)
:defer t
:config
(tool-bar-mode -1))
(use-package treemacs
:straight t
:commands (treemacs treemacs-select-window)
:custom
(treemacs-select-when-already-in-treemacs 'next-or-back)
:bind (("C-c SPC" . treemacs-select-window)
("C-c C-SPC" . treemacs-select-window)))
(use-package treesit
:straight '(treesit :type built-in)
:config
(setq treesit-extra-load-path
(list (expand-file-name "tree-sitter" local-config-dir)))
(setq treesit-language-source-alist
'((c "https://github.com/tree-sitter/tree-sitter-c.git")
(cmake "https://github.com/uyha/tree-sitter-cmake.git")
(cpp "https://github.com/tree-sitter/tree-sitter-cpp.git")
(c-sharp "https://github.com/tree-sitter/tree-sitter-c-sharp.git")
(css "https://github.com/tree-sitter/tree-sitter-css.git")
(dockerfile "https://github.com/camdencheek/tree-sitter-dockerfile.git")
(go "https://github.com/tree-sitter/tree-sitter-go.git")
(gomod "https://github.com/camdencheek/tree-sitter-go-mod.git")
(java "https://github.com/tree-sitter/tree-sitter-java.git")
(javascript "https://github.com/tree-sitter/tree-sitter-javascript.git")
(json "https://github.com/tree-sitter/tree-sitter-json.git")
(python "https://github.com/tree-sitter/tree-sitter-python.git")
(ruby "https://github.com/tree-sitter/tree-sitter-ruby.git")
(rust "https://github.com/tree-sitter/tree-sitter-rust.git")
(toml "https://github.com/ikatyang/tree-sitter-toml.git")
(tsx "https://github.com/tree-sitter/tree-sitter-typescript.git" nil "tsx/src")
(typescript "https://github.com/tree-sitter/tree-sitter-typescript.git" nil "typescript/src")
(yaml "https://github.com/ikatyang/tree-sitter-yaml.git")))
(mapc (lambda (spec)
(let ((name (car spec)))
(unless (treesit-language-available-p name)
(treesit-install-language-grammar name))))
treesit-language-source-alist))
(use-package typescript-ts-mode
:after treesit
:straight '(typescript-ts-mode :type built-in)
:mode "\\.ts\\'")
(use-package typst-mode
:straight t
:mode "\\.typ\\'")
(use-package yaml-ts-mode
:after treesit
:straight '(yaml-ts-mode :type built-in)
:mode "\\.ya?ml\\'")
(use-package zig-mode
:straight t
:mode "\\.zig\\'")
|