remove copilot, treesitter

This commit is contained in:
Gabriel Simmer 2024-04-08 14:51:49 +01:00
parent 8e6f9fb0b2
commit 0d232eb22e
Signed by: arch
SSH key fingerprint: SHA256:m3OEcdtrnBpMX+2BDGh/byv3hrCekCLzDYMdvGEKPPQ
3 changed files with 39 additions and 113 deletions

View file

@ -81,31 +81,8 @@
(null-device . "/dev/null"))))
'(custom-enabled-themes '(modus-vivendi-tinted))
'(custom-safe-themes
'("28d61ac6f26030e3c649e9f75b6ebd93dbf7f5f7b2f13e14cb1fe101e8cf4737" "d015f7295925398145c42285e2ea4bb438d449d36e2b10ba0650024862ec93a8" "64947f83c308d1101f20c6ff86c308497c4d032acb75d8e9dcbc4012d9a3b36e" "277a5bce12d6957dbabb43a2f55ee2b6371388b749cbb29fd251df19334a1f0b" "4b92d689600e9851d098c73951f7075f8fd0bb705b4d68806305cf3e4f001c9e" "75441a94fb5e6943320ce21aa5acf9cb24c3f87915666800f3906af8e85e0892" "f82e68d489e6c21c9552c4e8e35a03d126d9eba632a8e7b4f9329d1374b4a19c" "d395c1793e0d64797d711c870571a0033174ca321ed48444efbe640bf692bf4f" "11873c4fbf465b956889adfa9182495db3bf214d9a70c0f858f07f6cc91cbd47" "eb7cd622a0916358a6ef6305e661c6abfad4decb4a7c12e73d6df871b8a195f8" "fb83a50c80de36f23aea5919e50e1bccd565ca5bb646af95729dc8c5f926cbf3" "e7820b899036ae7e966dcaaec29fd6b87aef253748b7de09e74fdc54407a7a02" "1781e8bccbd8869472c09b744899ff4174d23e4f7517b8a6c721100288311fa5" default))
'(elfeed-feeds
'("https://news.ycombinator.com/rss" "https://lobste.rs/rss" "http://rss.slashdot.org/slashdot/slashdotMain" "https://www.carrot.blog/feed.xml" "https://cendyne.dev/feed.xml" "https://christine.website/blog.rss" "https://daniel.haxx.se/blog/feed/" "https://soatok.blog/feed/" "https://drewdevault.com/blog/index.xml" "https://eli.thegreenplace.net/feeds/all.atom.xml" "https://emnudge.dev/blog.xml" "https://fasterthanli.me/index.xml" "https://www.fosskers.ca/en/rss" "https://blog.gabrielsimmer.com/posts/index.xml" "https://grumpygamer.com/rss2.0" "https://www.inconsistent.software/feed.xml" "https://inessential.com/xml/rss.xml" "https://www.jefftk.com/news.rss" "https://jvns.ca/atom.xml" "https://kofi.sexy/feed.xml" "https://www.lastweekinaws.com/feed/" "https://www.masteringemacs.org/feed" "https://nullrouted.space/feed/" "https://www.netmeister.org/blog/rss.xml" "https://tailscale.dev/feed.xml" "https://www.tbray.org/ongoing/ongoing.atom" "https://twi.github.io/blog/atom.xml" "https://vivekhaldar.com/index.xml" "https://what-if.xkcd.com/feed.atom" "https://www.ansible.com/blog/rss.xml" "https://tailscale.com/blog/index.xml" "https://kubernetes.io/feed.xml" "https://blog.cloudflare.com/rss/" "https://fly.io/blog/feed.xml" "https://webkit.org/feed/" "https://feeds.arstechnica.com/arstechnica/technology-lab" "https://sachachua.com/blog/category/emacs-news/feed/" "https://emnudge.dev/reads.xml" "https://www.gamersnexus.net/news/feed" "https://lwn.net/headlines/rss" "https://webzine.snowflake.ovh/atom.xml" "http://syndication.thedailywtf.com/TheDailyWtf" "https://github.com/louislam/uptime-kuma/releases.atom" "https://github.com/dani-garcia/vaultwarden/releases.atom" "https://www.commitstrip.com/en/feed/" "https://jensorensen.com/feed/" "https://loadingartist.com/index.xml" "https://www.monkeyuser.com/feed.xml" "https://www.oglaf.com/feeds/rss/" "https://www.smbc-comics.com/comic/rss" "https://theoatmeal.com/feed/rss" "https://www.youtube.com/feeds/videos.xml?channel_id=UCs4fQRyl1TJvoeOdekW6lYA" "https://www.youtube.com/feeds/videos.xml?channel_id=UCXuqSBlHAE6Xw-yeJA0Tunw" "https://www.youtube.com/feeds/videos.xml?channel_id=UC0Eqb484X8EiNrFLSUQVsaA" "https://www.youtube.com/feeds/videos.xml?channel_id=UCBa659QWEk1AI4Tg--mrJ2A"))
'(safe-local-variable-values
'((eval modify-syntax-entry 43 "'")
(eval modify-syntax-entry 36 "'")
(eval modify-syntax-entry 126 "'")
(eval let
((root-dir-unexpanded
(locate-dominating-file default-directory ".dir-locals.el")))
(when root-dir-unexpanded
(let*
((root-dir
(expand-file-name root-dir-unexpanded))
(root-dir*
(directory-file-name root-dir)))
(unless
(boundp 'geiser-guile-load-path)
(defvar geiser-guile-load-path 'nil))
(make-local-variable 'geiser-guile-load-path)
(require 'cl-lib)
(cl-pushnew root-dir* geiser-guile-load-path :test #'string-equal))))
(eval setq-local guix-directory
(locate-dominating-file default-directory ".dir-locals.el"))))
'(warning-suppress-log-types '((comp))))
'("b40f11c174e7e475508f1e2c1cfca354d37212494c143a494f27239c7d71a294" "88cb0f9c0c11dbb4c26a628d35eb9239d1cf580cfd28e332e654e7f58b4e721b" "44bb32e37eb2b0573021d5a0ddca17ec2ad437aec14d95fe96e59d1af06c044f" "28d61ac6f26030e3c649e9f75b6ebd93dbf7f5f7b2f13e14cb1fe101e8cf4737" "d015f7295925398145c42285e2ea4bb438d449d36e2b10ba0650024862ec93a8" "64947f83c308d1101f20c6ff86c308497c4d032acb75d8e9dcbc4012d9a3b36e" "277a5bce12d6957dbabb43a2f55ee2b6371388b749cbb29fd251df19334a1f0b" "4b92d689600e9851d098c73951f7075f8fd0bb705b4d68806305cf3e4f001c9e" "75441a94fb5e6943320ce21aa5acf9cb24c3f87915666800f3906af8e85e0892" "f82e68d489e6c21c9552c4e8e35a03d126d9eba632a8e7b4f9329d1374b4a19c" "d395c1793e0d64797d711c870571a0033174ca321ed48444efbe640bf692bf4f" "11873c4fbf465b956889adfa9182495db3bf214d9a70c0f858f07f6cc91cbd47" "eb7cd622a0916358a6ef6305e661c6abfad4decb4a7c12e73d6df871b8a195f8" "fb83a50c80de36f23aea5919e50e1bccd565ca5bb646af95729dc8c5f926cbf3" "e7820b899036ae7e966dcaaec29fd6b87aef253748b7de09e74fdc54407a7a02" "1781e8bccbd8869472c09b744899ff4174d23e4f7517b8a6c721100288311fa5" default))
'(org-export-backends '(ascii html icalendar latex md odt)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.

View file

@ -27,15 +27,13 @@
(interactive)
(setq buffer-face-mode-face '(:family "Noto Sans" :height 120))
(setq line-spacing 0.3)
(buffer-face-mode)
)
(buffer-face-mode))
(defun me/code ()
"Custom mode optimised for coding shit."
(interactive)
(setq buffer-face-mode-face '(:family "Jetbrains Mono" :height 120))
(setq line-spacing nil)
(buffer-face-mode)
)
(buffer-face-mode))
(global-set-key (kbd "C-c r") 'me/read)
(global-set-key (kbd "C-c d") 'me/code)

View file

@ -2,8 +2,10 @@
(setq inhibit-startup-message t)
(setq auto-save-default nil)
(setq make-backup-files nil)
(cond ((find-font (font-spec :name "Berkeley Mono"))
(set-face-attribute 'default nil :font "Berkeley Mono" :height 120)))
(set-face-attribute 'default nil :font "Berkeley Mono-13")))
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
(scroll-bar-mode -1)
(tool-bar-mode -1)
@ -95,54 +97,17 @@
(use-package direnv :straight t)
(direnv-mode)
;; Fancy tabs
(use-package centaur-tabs :straight t
:config
(setq centaur-tabs-style "bar"
centaur-tabs-height 32
centaur-tabs-set-icons t
centaur-tabs-set-modified-marker t
centaur-tabs-show-navigation-buttons t
centaur-tabs-set-bar 'under
x-underline-at-descent-line t)
(centaur-tabs-headline-match)
(setq uniquify-separator "/")
(setq uniquify-buffer-name-style 'forward)
:bind ("C-<prior>" . centaur-tabs-backward)
("C-<next>" . centaur-tabs-forward))
(use-package org-modern :straight t)
(add-hook 'org-mode-hook #'org-modern-mode)
(add-hook 'org-agenda-finalize-hook #'org-modern-agenda)
(setq
;; Edit settings
;;org-auto-align-tags nil
;;org-tags-column 0
org-catch-invisible-edits 'show-and-error
org-special-ctrl-a/e t
org-insert-heading-respect-content t
;; Org styling, hide markup etc.
org-hide-emphasis-markers t
org-pretty-entities t
org-ellipsis ""
;; Agenda styling
org-agenda-tags-column 0
org-agenda-block-separator ?─
org-agenda-time-grid
'((daily today require-timed)
(800 1000 1200 1400 1600 1800 2000)
" ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄")
org-agenda-current-time-string
"⭠ now ─────────────────────────────────────────────────")
;; lsp-mode stuff
(use-package eglot :straight t
:config (add-hook 'go-mode-hook 'eglot-ensure)
(add-hook 'terraform-mode-hook 'eglot-ensure)
(add-hook 'rust-ts-mode 'eglot-ensure)
(add-to-list 'eglot-server-programs '(terraform-mode . ("terraform-ls" "serve"))))
(use-package flymake :straight t)
(use-package company :straight t
:config
(add-hook 'after-init-hook 'global-company-mode)
@ -163,58 +128,44 @@
:hook (k8s-mode . yas-minor-mode))
(use-package kubernetes :straight t)
(use-package rust-mode :straight t)
(add-hook 'rust-mode-hook
(lambda () (setq indent-tabs-mode nil)))
(add-hook 'rust-ts-mode-hook
(lambda () (setq indent-tabs-mode nil)))
(use-package tree-sitter :straight t)
(use-package tree-sitter-indent :straight t)
(use-package markdown-mode :straight t)
(use-package olivetti :straight t)
(use-package copilot
:straight (:host github :repo "zerolfx/copilot.el" :files ("dist" "*.el"))
:ensure t)
; complete by copilot first, then company-mode
(defun my-tab ()
(interactive)
(or (copilot-accept-completion)
(company-indent-or-complete-common nil)))
(use-package elfeed :straight t)
(use-package chatgpt-shell
:straight t)
; modify company-mode behaviors
(with-eval-after-load 'company
; disable inline previews
(delq 'company-preview-if-just-one-frontend company-frontends)
; enable tab completion
(define-key company-mode-map (kbd "C-<tab>") 'my-tab)
(define-key company-mode-map (kbd "C-TAB") 'my-tab)
(define-key company-active-map (kbd "C-<tab>") 'my-tab)
(define-key company-active-map (kbd "C-TAB") 'my-tab))
(setq treesit-language-source-alist
'((bash "https://github.com/tree-sitter/tree-sitter-bash")
(cmake "https://github.com/uyha/tree-sitter-cmake")
(css "https://github.com/tree-sitter/tree-sitter-css")
(elisp "https://github.com/Wilfred/tree-sitter-elisp")
(go "https://github.com/tree-sitter/tree-sitter-go")
(html "https://github.com/tree-sitter/tree-sitter-html")
(javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src")
(json "https://github.com/tree-sitter/tree-sitter-json")
(make "https://github.com/alemuller/tree-sitter-make")
(markdown "https://github.com/ikatyang/tree-sitter-markdown")
(python "https://github.com/tree-sitter/tree-sitter-python")
(toml "https://github.com/tree-sitter/tree-sitter-toml")
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")
(yaml "https://github.com/ikatyang/tree-sitter-yaml")))
'((bash "https://github.com/tree-sitter/tree-sitter-bash")
(cmake "https://github.com/uyha/tree-sitter-cmake")
(css "https://github.com/tree-sitter/tree-sitter-css")
(elisp "https://github.com/Wilfred/tree-sitter-elisp")
(go "https://github.com/tree-sitter/tree-sitter-go")
(html "https://github.com/tree-sitter/tree-sitter-html")
(javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src")
(json "https://github.com/tree-sitter/tree-sitter-json")
(make "https://github.com/alemuller/tree-sitter-make")
(markdown "https://github.com/ikatyang/tree-sitter-markdown")
(python "https://github.com/tree-sitter/tree-sitter-python")
(toml "https://github.com/tree-sitter/tree-sitter-toml")
(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")
(yaml "https://github.com/ikatyang/tree-sitter-yaml")))
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode))
(setq major-mode-remap-alist
'((yaml-mode . yaml-ts-mode)
(bash-mode . bash-ts-mode)
(js2-mode . js-ts-mode)
(typescript-mode . typescript-ts-mode)
(json-mode . json-ts-mode)
(css-mode . css-ts-mode)
(python-mode . python-ts-mode)))
'((yaml-mode . yaml-ts-mode)
(bash-mode . bash-ts-mode)
(js2-mode . js-ts-mode)
(typescript-mode . typescript-ts-mode)
(json-mode . json-ts-mode)
(css-mode . css-ts-mode)
(python-mode . python-ts-mode)))
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
;; Adapted from https://github.com/Slackwise/dotfiles/blob/master/emacs/slackwise.el
(setq-default