feat: emacs - enable lsp & tree-sitter

This commit is contained in:
Ryan Yin
2024-01-01 13:53:18 +08:00
parent e2295f350b
commit dbac1b8bd7
3 changed files with 35 additions and 22 deletions

View File

@@ -0,0 +1,9 @@
# Emacs Editor
- Framework: <https://github.com/doomemacs/doomemacs>
- Chinese(rime) support: <https://github.com/DogLooksGood/emacs-rime>
- modal editing:
- <https://github.com/emacs-evil/evil>: evil mode, enabled by default in doom-emacs.
- <https://github.com/meow-edit/meow>

View File

@@ -37,7 +37,11 @@ in {
binutils # native-comp needs 'as', provided by this
# 28.2 + native-comp
((emacsPackagesFor emacs-unstable-nox).emacsWithPackages
(epkgs: [epkgs.vterm]))
(epkgs: [
epkgs.vterm
epkgs.rime
epkgs.meow
]))
emacs-all-the-icons-fonts
## Doom dependencies

View File

@@ -16,7 +16,7 @@
(doom! :input
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
;;chinese
(chinese +rime)
;;japanese
;;layout ; auie,ctsrnm is the superior home row
@@ -32,7 +32,7 @@
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂
(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
;;indent-guides ; highlighted indent columns
@@ -88,9 +88,9 @@
;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;collab ; buffers with friends
;;debugger ; FIXME stepping through code, to help you add bugs
;; debugger ; FIXME stepping through code, to help you add bugs
;;direnv
;;docker
(docker +lsp)
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
@@ -104,19 +104,19 @@
;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects
terraform ; infrastructure as code
(terraform +lsp) ; infrastructure as code
;;tmux ; an API for interacting with tmux
tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp
:os
(:if IS-MAC macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience
tty ; improve the terminal Emacs experience
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
(cc +lsp) ; C > C++ == 1
(cc +lsp +tree-sitter) ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
@@ -136,45 +136,45 @@
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
(go +lsp) ; the hipster dialect
(go +lsp +tree-sitter) ; the hipster dialect
;;(graphql +lsp) ; Give queries a REST
;;(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
json ; At least it ain't XML
(java +lsp) ; the poster child for carpal tunnel syndrome
javascript ; all(hope(abandon(ye(who(enter(here))))))
(json +lsp +tree-sitter) ; At least it ain't XML
(java +lsp +tree-sitter) ; the poster child for carpal tunnel syndrome
(javascript +lsp +tree-sitter) ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
latex ; writing papers in Emacs has never been so fun
(latex +lsp) ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
(lua +lsp +tree-sitter) ; one-based indices? one-based indices
(markdown +grip) ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
nix ; I hereby declare "nix geht mehr!"
(nix +lsp +tree-sitter) ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
org ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
python ; beautiful is better than ugly
(python +lsp +tree-sitter +pyright) ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
(rust +lsp +tree-sitter) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
(sh +lsp +tree-sitter) ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
;;web ; the tubes
yaml ; JSON, but readable
(web +lsp +tree-sitter) ; support for various web languages, including HTML5, CSS, SASS/SCSS, Pug/Jade/Slim, and more
(yaml +lsp +tree-sitter) ; JSON, but readable
;;zig ; C, but simpler
:email