adding tree-sitter back in
This commit is contained in:
parent
1711f8088f
commit
cc34d2e8ee
6 changed files with 111 additions and 79 deletions
89
bindings.el
89
bindings.el
|
@ -4,6 +4,7 @@
|
|||
|
||||
(map! :leader
|
||||
"`" nil
|
||||
(:prefix ("m" . "<localleader>")) ; bound locally
|
||||
(:prefix-map ("!" . "checkers")) ; bound by flycheck
|
||||
|
||||
:desc "M-x" ":" #'execute-extended-command
|
||||
|
@ -12,8 +13,8 @@
|
|||
|
||||
(:prefix-map ("w" . "window")
|
||||
:desc "ace-window" "w" #'ace-window
|
||||
:desc "split horizontally" "h" #'split-window-below
|
||||
:desc "split vertically" "v" #'split-window-below
|
||||
:desc "split horizontally" "h" #'split-window-horizontally
|
||||
:desc "split vertically" "v" #'split-window-vertically
|
||||
:desc "make taller" "+" #'enlarge-window
|
||||
:desc "make taller" "-" #'shrink-window
|
||||
:desc "make wider" ">" #'enlarge-window-horizontally
|
||||
|
@ -310,39 +311,54 @@
|
|||
:desc "Pull request" "p" #'forge-create-pullreq)))
|
||||
|
||||
(:prefix-map ("c" . "code")
|
||||
(:when (and (modulep! :tools lsp) (not (modulep! :tools lsp +eglot)))
|
||||
:desc "LSP Execute code action" "a" #'lsp-execute-code-action
|
||||
:desc "LSP Organize imports" "o" #'lsp-organize-imports
|
||||
:desc "Jump to symbol in current workspace" "j" #'consult-lsp-symbols
|
||||
:desc "Jump to symbol in any workspace" "J" (cmd!! #'consult-lsp-symbols 'all-workspaces)
|
||||
(:when (modulep! :ui treemacs +lsp)
|
||||
:desc "Errors list" "X" #'lsp-treemacs-errors-list
|
||||
:desc "Incoming call hierarchy" "y" #'lsp-treemacs-call-hierarchy
|
||||
:desc "Outgoing call hierarchy" "Y" (cmd!! #'lsp-treemacs-call-hierarchy t)
|
||||
:desc "References tree" "R" (cmd!! #'lsp-treemacs-references t)
|
||||
:desc "Symbols" "S" #'lsp-treemacs-symbols)
|
||||
:desc "LSP" "l" #'+default/lsp-command-map
|
||||
:desc "LSP Rename" "r" #'lsp-rename)
|
||||
(:when (modulep! :tools lsp +eglot)
|
||||
:desc "LSP Execute code action" "a" #'eglot-code-actions
|
||||
:desc "LSP Rename" "r" #'eglot-rename
|
||||
:desc "LSP Find declaration" "j" #'eglot-find-declaration
|
||||
(:when (modulep! :completion vertico)
|
||||
:desc "Jump to symbol in current workspace" "j" #'consult-eglot-symbols))
|
||||
:desc "Compile" "c" #'compile
|
||||
:desc "Recompile" "C" #'recompile
|
||||
:desc "Jump to definition" "d" #'+lookup/definition
|
||||
:desc "Jump to references" "D" #'+lookup/references
|
||||
:desc "Evaluate buffer/region" "e" #'+eval/buffer-or-region
|
||||
:desc "Evaluate & replace region" "E" #'+eval:replace-region
|
||||
:desc "Format buffer/region" "f" #'+format/region-or-buffer
|
||||
:desc "Find implementations" "i" #'+lookup/implementations
|
||||
:desc "Jump to documentation" "k" #'+lookup/documentation
|
||||
:desc "Send to repl" "s" #'+eval/send-region-to-repl
|
||||
:desc "Find type definition" "t" #'+lookup/type-definition
|
||||
:desc "Delete trailing whitespace" "w" #'delete-trailing-whitespace
|
||||
:desc "Delete trailing newlines" "W" #'doom/delete-trailing-newlines
|
||||
:desc "List errors" "x" #'+default/diagnostics)
|
||||
(:when (and (modulep! :tools lsp) (not (modulep! :tools lsp +eglot)))
|
||||
:desc "LSP Execute code action" "a" #'lsp-execute-code-action
|
||||
:desc "LSP Organize imports" "o" #'lsp-organize-imports
|
||||
:desc "Jump to symbol in current workspace" "j" #'consult-lsp-symbols
|
||||
:desc "Jump to symbol in any workspace" "J" (cmd!! #'consult-lsp-symbols 'all-workspaces)
|
||||
(:when (modulep! :ui treemacs +lsp)
|
||||
:desc "Errors list" "X" #'lsp-treemacs-errors-list
|
||||
:desc "Incoming call hierarchy" "y" #'lsp-treemacs-call-hierarchy
|
||||
:desc "Outgoing call hierarchy" "Y" (cmd!! #'lsp-treemacs-call-hierarchy t)
|
||||
:desc "References tree" "R" (cmd!! #'lsp-treemacs-references t)
|
||||
:desc "Symbols" "S" #'lsp-treemacs-symbols)
|
||||
:desc "LSP" "l" #'+default/lsp-command-map
|
||||
:desc "LSP Rename" "r" #'lsp-rename)
|
||||
(:when (modulep! :tools lsp +eglot)
|
||||
:desc "LSP Execute code action" "a" #'eglot-code-actions
|
||||
:desc "LSP Rename" "r" #'eglot-rename
|
||||
:desc "LSP Find declaration" "j" #'eglot-find-declaration
|
||||
(:when (modulep! :completion vertico)
|
||||
:desc "Jump to symbol in current workspace" "j" #'consult-eglot-symbols))
|
||||
:desc "Compile" "c" #'compile
|
||||
:desc "Recompile" "C" #'recompile
|
||||
:desc "Jump to definition" "d" #'+lookup/definition
|
||||
:desc "Jump to references" "D" #'+lookup/references
|
||||
:desc "Evaluate buffer/region" "e" #'+eval/buffer-or-region
|
||||
:desc "Evaluate & replace region" "E" #'+eval:replace-region
|
||||
:desc "Format buffer/region" "f" #'+format/region-or-buffer
|
||||
:desc "Find implementations" "i" #'+lookup/implementations
|
||||
:desc "Jump to documentation" "k" #'+lookup/documentation
|
||||
:desc "Send to repl" "s" #'+eval/send-region-to-repl
|
||||
:desc "Find type definition" "t" #'+lookup/type-definition
|
||||
:desc "Delete trailing whitespace" "w" #'delete-trailing-whitespace
|
||||
:desc "Delete trailing newlines" "W" #'doom/delete-trailing-newlines
|
||||
:desc "List errors" "x" #'+default/diagnostics)
|
||||
|
||||
;;; <leader> q --- quit/restart
|
||||
(:prefix-map ("q" . "quit/session")
|
||||
:desc "Restart emacs server" "d" #'+default/restart-server
|
||||
:desc "Delete frame" "f" #'delete-frame
|
||||
:desc "Clear current frame" "F" #'doom/kill-all-buffers
|
||||
:desc "Kill Emacs (and daemon)" "K" #'save-buffers-kill-emacs
|
||||
:desc "Quit Emacs" "q" #'kill-emacs
|
||||
:desc "Save and quit Emacs" "Q" #'save-buffers-kill-terminal
|
||||
:desc "Quick save current session" "s" #'doom/quicksave-session
|
||||
:desc "Restore last session" "l" #'doom/quickload-session
|
||||
:desc "Save session to file" "S" #'doom/save-session
|
||||
:desc "Restore session from file" "L" #'doom/load-session
|
||||
:desc "Restart & restore Emacs" "r" #'doom/restart-and-restore
|
||||
:desc "Restart Emacs" "R" #'doom/restart)
|
||||
)
|
||||
|
||||
(map! "s-c" #'kill-ring-save
|
||||
|
@ -358,7 +374,8 @@
|
|||
;; "M-s-<down>" #'forward-paragraph
|
||||
"s-<up>" #'beginning-of-buffer
|
||||
"s-<down>" #'end-of-buffer
|
||||
"M-s-v" #'consult-yank-from-kill-ring)
|
||||
"M-s-v" #'consult-yank-from-kill-ring
|
||||
"s-<return>" #'split-window-below)
|
||||
|
||||
(after! which-key
|
||||
(let ((prefix-re (regexp-opt (list doom-leader-key doom-leader-alt-key))))
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
"s-M-<right>" 'centaur-tabs-forward
|
||||
"s-M-<left>" 'centaur-tabs-backward))
|
||||
|
||||
(setq default-frame-alist '( (left . 0) (top . 0) (height . 48) (width . 150) ))
|
||||
(setq default-frame-alist '( (left . 0) (top . 0) (height . 48) (width . 160) ))
|
||||
|
||||
;; use kitty for terminal-here
|
||||
(setq terminal-here-mac-terminal-command '("kitty"))
|
||||
|
@ -155,7 +155,7 @@
|
|||
(setq sly-lisp-implementations
|
||||
'((sbcl ("sbcl"))
|
||||
(ciel ("sbcl" "--core" "/Users/emenel/quicklisp/local-projects/CIEL/ciel-core" "--eval" "(in-package :ciel-user)"))))
|
||||
(setq sly-default-lisp 'ciel)
|
||||
(setq sly-default-lisp 'sbcl)
|
||||
(setq sly-complete-symbol-function 'sly-flex-completions))
|
||||
|
||||
;; make esc close completion from corfu
|
||||
|
|
14
custom.el
14
custom.el
|
@ -7,7 +7,9 @@
|
|||
'(column-number-mode t)
|
||||
'(context-menu-mode t)
|
||||
'(size-indication-mode t)
|
||||
'(tool-bar-mode nil))
|
||||
'(tool-bar-mode nil)
|
||||
'(warning-suppress-log-types '((lsp-mode) (lsp-mode) (lsp-mode) (defvaralias)))
|
||||
'(warning-suppress-types '((lsp-mode) (lsp-mode) (defvaralias))))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
|
@ -28,3 +30,13 @@
|
|||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
|
|
30
init.el
30
init.el
|
@ -60,10 +60,10 @@
|
|||
fold ; (nigh) universal code folding
|
||||
format ; automated prettiness
|
||||
;;god ; run Emacs commands without modifier keys
|
||||
;; lispy ; vim for lisp, for people who don't like vim
|
||||
lispy ; vim for lisp, for people who don't like vim
|
||||
;; multiple-cursors ; editing in many places at once
|
||||
;; objed ; text object editing for the innocent
|
||||
parinfer ; turn lisp into python, sort of
|
||||
;; parinfer ; turn lisp into python, sort of
|
||||
;;rotate-text ; cycle region at point between text candidates
|
||||
snippets ; my elves. They type so I don't have to
|
||||
word-wrap ; soft wrapping with language-aware indent
|
||||
|
@ -107,7 +107,7 @@
|
|||
;;taskrunner ; taskrunner for all your projects
|
||||
;;terraform ; infrastructure as code
|
||||
;;tmux ; an API for interacting with tmux
|
||||
;; tree-sitter ; syntax and parsing, sitting in a tree...
|
||||
tree-sitter ; syntax and parsing, sitting in a tree...
|
||||
;;upload ; map local to remote projects via ssh/ftp
|
||||
|
||||
:os
|
||||
|
@ -117,9 +117,9 @@
|
|||
:lang
|
||||
;;agda ; types of types of types of types...
|
||||
;;beancount ; mind the GAAP
|
||||
(cc +lsp) ; java with a lisp
|
||||
(cc +lsp +tree-sitter) ; java with a lisp
|
||||
common-lisp ; if you've seen one lisp, you've seen them all
|
||||
(clojure +lsp)
|
||||
(clojure +lsp +tree-sitter)
|
||||
;;coq ; proofs-as-programs
|
||||
;;crystal ; ruby at the speed of c
|
||||
;;csharp ; unity, .NET, and mono shenanigans
|
||||
|
@ -139,19 +139,19 @@
|
|||
;;gdscript ; the language you waited for
|
||||
;;(go +lsp) ; the hipster dialect
|
||||
;;(graphql +lsp) ; Give queries a REST
|
||||
(haskell +lsp) ; a language that's lazier than I am
|
||||
(haskell +lsp +tree-sitter) ; a language that's lazier than I am
|
||||
;;hy ; readability of scheme w/ speed of python
|
||||
;;idris ; a language you can depend on
|
||||
(json +lsp) ; At least it ain't XML
|
||||
(java +lsp) ; the poster child for carpal tunnel syndrome
|
||||
(javascript +lsp) ; 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 ; 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
|
||||
(markdown +tree-sitter) ; writing docs for people to ignore
|
||||
;;nim ; python + lisp at the speed of c
|
||||
;;nix ; I hereby declare "nix geht mehr!"
|
||||
;;ocaml ; an objective camel
|
||||
|
@ -159,14 +159,14 @@
|
|||
php ; perl's insecure younger brother
|
||||
;;plantuml ; diagrams for confusing people more
|
||||
purescript ; javascript, but functional
|
||||
(python +lsp) ; beautiful is better than ugly
|
||||
(python +lsp +tree-sitter) ; beautiful is better than ugly
|
||||
qt ; the 'cutest' gui framework ever
|
||||
(racket +lsp) ; 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
|
||||
|
@ -174,8 +174,8 @@
|
|||
;;solidity ; do you need a blockchain? No.
|
||||
;;swift ; who asked for emoji variables?
|
||||
;;terra ; Earth and Moon in alignment for performance.
|
||||
(web +lsp)
|
||||
yaml ; JSON, but readable
|
||||
(web +lsp +tree-sitter)
|
||||
(yaml +tree-sitter) ; JSON, but readable
|
||||
;;zig ; C, but simpler
|
||||
|
||||
:email
|
||||
|
|
|
@ -6,18 +6,18 @@
|
|||
(defun meow/setup-leader ()
|
||||
(map! :leader
|
||||
:desc "Meow Cheatsheet"
|
||||
"?" #'meow-cheatsheet))
|
||||
;; "/" #'meow-keypad-describe-key))
|
||||
;; "1" #'meow-digit-argument
|
||||
;; "2" #'meow-digit-argument
|
||||
;; "3" #'meow-digit-argument
|
||||
;; "4" #'meow-digit-argument
|
||||
;; "5" #'meow-digit-argument
|
||||
;; "6" #'meow-digit-argument
|
||||
;; "7" #'meow-digit-argument
|
||||
;; "8" #'meow-digit-argument
|
||||
;; "9" #'meow-digit-argument
|
||||
;; "0" #'meow-digit-argument))
|
||||
"?" #'meow-cheatsheet
|
||||
"/" #'meow-keypad-describe-key
|
||||
"1" #'meow-digit-argument
|
||||
"2" #'meow-digit-argument
|
||||
"3" #'meow-digit-argument
|
||||
"4" #'meow-digit-argument
|
||||
"5" #'meow-digit-argument
|
||||
"6" #'meow-digit-argument
|
||||
"7" #'meow-digit-argument
|
||||
"8" #'meow-digit-argument
|
||||
"9" #'meow-digit-argument
|
||||
"0" #'meow-digit-argument))
|
||||
|
||||
;; Keypad
|
||||
(defun meow/setup-keypad ()
|
||||
|
@ -327,6 +327,7 @@
|
|||
(meow/setup-leader))
|
||||
(t (meow/setup-keypad)))
|
||||
(pushnew! meow-mode-state-list '(sly-db-mode . motion))
|
||||
(pushnew! meow-mode-state-list '(sly-inspector-mode . motion))
|
||||
(map! :map meow-keymap [remap describe-key] #'helpful-key))
|
||||
|
||||
(if (modulep! :editor evil)
|
||||
|
@ -334,3 +335,5 @@
|
|||
(defun meow-init-local-var-hooks-disable-evil ()
|
||||
(remove-hook 'doom-after-modules-config-hook 'evil-mode)
|
||||
(evil-mode -1))))
|
||||
|
||||
;; REVIEW look into better ways to manage key binds, and see if general.el can support meow modes instead of evil modes
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
;;; editor/meow/init.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; Rewriting the doom-localleader-key! macro to add support for meow mode
|
||||
;; (when (featurep! :editor meow +leader))
|
||||
;; (defmacro define-localleader-key! (&rest args)
|
||||
;; `(progn
|
||||
;; (general-define-key
|
||||
;; :keymaps '(meow-normal-state-keymap meow-motion-state-keymap)
|
||||
;; :major-modes t
|
||||
;; :prefix doom-localleader-key
|
||||
;; ,@args)
|
||||
;; (general-define-key
|
||||
;; :keymaps 'meow-insert-state-keymap
|
||||
;; :major-modes t
|
||||
;; :prefix doom-localleader-alt-key
|
||||
;; ,@args))))
|
||||
;; (when (modulep! :editor meow +leader)
|
||||
;; (defmacro define-localleader-key! (&rest args)
|
||||
;; `(progn
|
||||
;; (general-define-key
|
||||
;; :keymaps '(meow-normal-state-keymap meow-motion-state-keymap)
|
||||
;; :major-modes t
|
||||
;; :prefix doom-localleader-key
|
||||
;; ,@args)
|
||||
;; (general-define-key
|
||||
;; :keymaps 'meow-insert-state-keymap
|
||||
;; :major-modes t
|
||||
;; :prefix doom-localleader-alt-key
|
||||
;; ,@args))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue