Compare commits
No commits in common. "0de79998679ebb2468d3a1ecb41afe4f5baa9e55" and "fdbddfc8ebf154455e40ad54199e4801530ae9c5" have entirely different histories.
0de7999867
...
fdbddfc8eb
1 changed files with 14 additions and 54 deletions
|
|
@ -306,44 +306,6 @@
|
||||||
(add-hook 'ispell-minor-mode-hook 'my--fix-aspell)
|
(add-hook 'ispell-minor-mode-hook 'my--fix-aspell)
|
||||||
(add-hook 'flyspell-mode-hook 'my--fix-aspell)
|
(add-hook 'flyspell-mode-hook 'my--fix-aspell)
|
||||||
|
|
||||||
|
|
||||||
;; =================================================================
|
|
||||||
;; Tree Sitter
|
|
||||||
;; =================================================================
|
|
||||||
;; https://www.masteringemacs.org/article/how-to-get-started-tree-sitter
|
|
||||||
;;
|
|
||||||
;; 2023-08-26 Wow, like what am I even doing? This goes at the top of the
|
|
||||||
;; various things because we're going to be playing with modes and whatnot.
|
|
||||||
|
|
||||||
(when (functionp 'tree-sitter-mode)
|
|
||||||
(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")
|
|
||||||
(rust "https://github.com/tree-sitter/tree-sitter-rust")
|
|
||||||
(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 'major-mode-remap-alist '(rust-mode . rust-ts-mode))
|
|
||||||
)
|
|
||||||
|
|
||||||
;; Install them all:
|
|
||||||
;; (mapc #'treesit-install-language-grammar (mapcar #'car treesit-language-source-alist))
|
|
||||||
|
|
||||||
;; 2023-08-28 Maybe I like line numbers everywhere? Who can say?
|
|
||||||
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
|
|
||||||
|
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Text mode configuration.
|
;; Text mode configuration.
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
|
|
@ -361,12 +323,10 @@
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package company :ensure t
|
(use-package company :ensure t
|
||||||
:commands company-mode
|
:commands company-mode
|
||||||
:init
|
|
||||||
;; 2023-08-26: Enable comapny mode globally.
|
|
||||||
(global-company-mode t)
|
|
||||||
:config
|
:config
|
||||||
;; 2023-08-26: Enable comapny mode globally.
|
;; 2023-08-26: Enable comapny mode globally.
|
||||||
(setq company-idle-delay 0.3)
|
(setq company-idle-delay 0.3)
|
||||||
|
(global-company-mode t)
|
||||||
)
|
)
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
|
|
@ -405,13 +365,12 @@
|
||||||
(use-package eglot :ensure
|
(use-package eglot :ensure
|
||||||
:commands (eglot-ensure eglot)
|
:commands (eglot-ensure eglot)
|
||||||
:hook
|
:hook
|
||||||
(python-mode . eglot-ensure)
|
(python-mode . eglot-ensure)
|
||||||
(rust-mode . eglot-ensure)
|
(rust-mode . eglot-ensure)
|
||||||
(rust-ts-mode . eglot-ensure) ;; 2023-08-26 Add eglot for tree-sitter rust?
|
(c++-mode . eglot-ensure)
|
||||||
(c++-mode . eglot-ensure)
|
(c-mode . eglot-ensure)
|
||||||
(c-mode . eglot-ensure)
|
(go-mode . eglot-ensure) ;; 2022-07-29 Add eglot for go
|
||||||
(go-mode . eglot-ensure) ;; 2022-07-29 Add eglot for go
|
(before-save . eglot-format) ;; 2023-05-25 Format buffers on save
|
||||||
(before-save . eglot-format) ;; 2023-05-25 Format buffers on save
|
|
||||||
:bind
|
:bind
|
||||||
("C-c r" . eglot-rename) ;; 2022-08-23 Make rename more accessible
|
("C-c r" . eglot-rename) ;; 2022-08-23 Make rename more accessible
|
||||||
("C-c \\" . eglot-code-actions) ;; 2022-07-29 I want to make code actions easier.
|
("C-c \\" . eglot-code-actions) ;; 2022-07-29 I want to make code actions easier.
|
||||||
|
|
@ -812,14 +771,14 @@ Or, uh, Objective C, I guess."
|
||||||
;; JavaScript Support
|
;; JavaScript Support
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; (require 'rjsx-mode)
|
;; (require 'rjsx-mode)
|
||||||
;; (require 'flycheck-flow)
|
(require 'flycheck-flow)
|
||||||
;; (require 'flow-minor-mode)
|
(require 'flow-minor-mode)
|
||||||
|
|
||||||
;; disable jshint since we prefer eslint checking
|
;; disable jshint since we prefer eslint checking
|
||||||
;; (setq-default flycheck-disabled-checkers
|
(setq-default flycheck-disabled-checkers
|
||||||
;; (append flycheck-disabled-checkers
|
(append flycheck-disabled-checkers
|
||||||
;; '(javascript-jshint)))
|
'(javascript-jshint)))
|
||||||
;; (flycheck-add-next-checker 'javascript-eslint 'javascript-flow)
|
(flycheck-add-next-checker 'javascript-eslint 'javascript-flow)
|
||||||
|
|
||||||
;; (add-to-list 'auto-mode-alist '("\\.js$" . rjsx-mode))
|
;; (add-to-list 'auto-mode-alist '("\\.js$" . rjsx-mode))
|
||||||
;; (add-to-list 'auto-mode-alist '("\\.jsx$" . rjsx-mode))
|
;; (add-to-list 'auto-mode-alist '("\\.jsx$" . rjsx-mode))
|
||||||
|
|
@ -1263,4 +1222,5 @@ Or, uh, Objective C, I guess."
|
||||||
(use-package earthfile-mode :ensure
|
(use-package earthfile-mode :ensure
|
||||||
:mode ("\\.earth\\'" "Earthfile\\'"))
|
:mode ("\\.earth\\'" "Earthfile\\'"))
|
||||||
|
|
||||||
|
|
||||||
;;; init.el ends here
|
;;; init.el ends here
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue