fix typo
This commit is contained in:
parent
d90dcb2078
commit
33d97f85b2
1 changed files with 81 additions and 45 deletions
126
init.org
126
init.org
|
@ -739,6 +739,8 @@ See the excellent documentation on [[https://github.com/minad/consult][Minad's c
|
||||||
** Evil Vim Keybindings
|
** Evil Vim Keybindings
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(keymap-global-set "C-c v" vc-prefix-map)
|
||||||
|
(keymap-global-set "C-c p" project-prefix-map)
|
||||||
(when snm-enable-evil
|
(when snm-enable-evil
|
||||||
;; load evil
|
;; load evil
|
||||||
(use-package evil
|
(use-package evil
|
||||||
|
@ -761,11 +763,9 @@ See the excellent documentation on [[https://github.com/minad/consult][Minad's c
|
||||||
;; make vc commands available via leader key
|
;; make vc commands available via leader key
|
||||||
(evil-define-key 'normal 'global
|
(evil-define-key 'normal 'global
|
||||||
(kbd "<leader>v") vc-prefix-map)
|
(kbd "<leader>v") vc-prefix-map)
|
||||||
(keymap-global-set "C-c v" vc-prefix-map)
|
|
||||||
;; make project commands available via leader key
|
;; make project commands available via leader key
|
||||||
(evil-define-key 'normal 'global
|
(evil-define-key 'normal 'global
|
||||||
(kbd "<leader>p") project-prefix-map)
|
(kbd "<leader>p") project-prefix-map)
|
||||||
(keymap-global-set "C-c p" project-prefix-map)
|
|
||||||
|
|
||||||
(evil-define-key 'normal 'global
|
(evil-define-key 'normal 'global
|
||||||
(kbd "<leader>ff") #'find-file
|
(kbd "<leader>ff") #'find-file
|
||||||
|
@ -1157,50 +1157,82 @@ Enables and configures Yasnippet, a template system for Emacs:
|
||||||
|
|
||||||
|
|
||||||
*** Use Treesitter parser support
|
*** Use Treesitter parser support
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
|
|
||||||
;; set locations for treesitter grammars
|
Recently with verion 0.25 the treesitter library changed ABI version
|
||||||
(use-package treesit
|
to 15. Newer parsers will complain about a version mismatch if the
|
||||||
:config
|
installed library used by emacs is lower than this version. This ABI
|
||||||
(setq treesit-language-source-alist
|
version was introduced in the 0.25 branch of treesitter.
|
||||||
'((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")
|
|
||||||
(gomod "https://github.com/camdencheek/tree-sitter-go-mod.git")
|
|
||||||
(haskell "https://github.com/tree-sitter/tree-sitter-haskell" "master" "src" nil nil)
|
|
||||||
(html "https://github.com/tree-sitter/tree-sitter-html")
|
|
||||||
(java "https://github.com/tree-sitter/tree-sitter-java.git")
|
|
||||||
(javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src")
|
|
||||||
(json "https://github.com/tree-sitter/tree-sitter-json")
|
|
||||||
(lua "https://github.com/tjdevries/tree-sitter-lua")
|
|
||||||
(make "https://github.com/alemuller/tree-sitter-make")
|
|
||||||
(markdown "https://github.com/ikatyang/tree-sitter-markdown")
|
|
||||||
(ocaml "https://github.com/tree-sitter/tree-sitter-ocaml" nil "ocaml/src")
|
|
||||||
(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")))
|
|
||||||
|
|
||||||
:hook
|
The best course of action till lib treesitter is updated is to pin
|
||||||
((prog . treesit-inspect-mode)))
|
the version of the parser to the last version supporting ABI 14.
|
||||||
|
|
||||||
(use-package treesit-auto
|
With the new ABI 15 version, parsers are required to provide a
|
||||||
:ensure t
|
~treesitter.json~ file with additional metadata which can be used as
|
||||||
:defer 5
|
proxy to find a version which still supports ABI-14, i.e. the commit
|
||||||
:custom
|
before that.
|
||||||
(treesit-auto-install 'prompt)
|
|
||||||
(treesit-auto-langs '(awk bash c c-sharp clojure cmake commonlisp cpp css
|
A lot of the parsers are provided by the treesitter project as sub
|
||||||
dart dockerfile elixir go gomod html java
|
repos, and they follow the same version convention as the library,
|
||||||
javascript json julia kotlin lua make markdown nix nu
|
selecting the last tag before the 0.25 tag is a good way to find a
|
||||||
org perl proto python r ruby rust scala sql toml tsx
|
compatible version.
|
||||||
typescript vue yaml)) ; reduced langs list somewhat
|
|
||||||
:config
|
This branch can be added after the repo url in the
|
||||||
(treesit-auto-add-to-auto-mode-alist 'all)
|
~treesit-language-source-alist~ variable. Note that if you use
|
||||||
(global-treesit-auto-mode))
|
~treesit-auto-install-all~ to get it over with, you have to probably
|
||||||
#+END_SRC
|
restart your emacs as treesit-auto apparently caches the value
|
||||||
|
during iniitialisation and changes are not picked up.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
|
||||||
|
;; set locations for treesitter grammars
|
||||||
|
(use-package treesit
|
||||||
|
:config
|
||||||
|
(setq treesit-language-source-alist
|
||||||
|
'((bash "https://github.com/tree-sitter/tree-sitter-bash" "v0.23.3")
|
||||||
|
(c "https://github.com/tree-sitter/tree-sitter-c" "v0.23.6")
|
||||||
|
(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")
|
||||||
|
(gomod "https://github.com/camdencheek/tree-sitter-go-mod.git")
|
||||||
|
(haskell "https://github.com/tree-sitter/tree-sitter-haskell" "master" "src" nil nil)
|
||||||
|
(html "https://github.com/tree-sitter/tree-sitter-html")
|
||||||
|
(java "https://github.com/tree-sitter/tree-sitter-java.git")
|
||||||
|
(javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src")
|
||||||
|
(json "https://github.com/tree-sitter/tree-sitter-json")
|
||||||
|
(lua "https://github.com/tjdevries/tree-sitter-lua")
|
||||||
|
(make "https://github.com/alemuller/tree-sitter-make")
|
||||||
|
(markdown "https://github.com/ikatyang/tree-sitter-markdown")
|
||||||
|
(ocaml "https://github.com/tree-sitter/tree-sitter-ocaml" nil "ocaml/src")
|
||||||
|
(rust "https://github.com/tree-sitter/tree-sitter-rust" "v0.23.3")
|
||||||
|
(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")))
|
||||||
|
|
||||||
|
:hook
|
||||||
|
((prog . treesit-inspect-mode)))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Treesit-auto automatically configures things behind the scenes to use
|
||||||
|
the treesitter modes and download them if needed. \
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package treesit-auto
|
||||||
|
:ensure t
|
||||||
|
:defer 5
|
||||||
|
:custom
|
||||||
|
(treesit-auto-install 'prompt)
|
||||||
|
(treesit-auto-langs '(awk bash c c-sharp clojure cmake commonlisp cpp css
|
||||||
|
dart dockerfile elixir go gomod html java
|
||||||
|
javascript json julia kotlin lua make markdown nix
|
||||||
|
org perl proto python r ruby rust scala sql toml tsx
|
||||||
|
typescript vue yaml)) ; reduced langs list somewhat
|
||||||
|
:config
|
||||||
|
(treesit-auto-add-to-auto-mode-alist 'all)
|
||||||
|
(global-treesit-auto-mode))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
: [nil 26284 45426 709595 nil elpaca-process-queues nil nil 734000 nil]
|
: [nil 26284 45426 709595 nil elpaca-process-queues nil nil 734000 nil]
|
||||||
|
@ -2300,7 +2332,7 @@ exporter manual.]]
|
||||||
(add-to-list 'org-capture-templates
|
(add-to-list 'org-capture-templates
|
||||||
'("m" "Manual Cookbook" entry (file "~/org/cookbook.org")
|
'("m" "Manual Cookbook" entry (file "~/org/cookbook.org")
|
||||||
"* %^{Recipe title: }\n :PROPERTIES:\n :source-url:\n :servings:\n :prep-time:\n :cook-time:\n :ready-in:\n :END:\n** Ingredients\n %?\n** Directions\n\n")))
|
"* %^{Recipe title: }\n :PROPERTIES:\n :source-url:\n :servings:\n :prep-time:\n :cook-time:\n :ready-in:\n :END:\n** Ingredients\n %?\n** Directions\n\n")))
|
||||||
:bind (("<leader>X" . org-capture)))
|
:bind (("C-c C" . org-capture)))
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
@ -2645,7 +2677,11 @@ We can add a list of queries
|
||||||
(org-todo-keywords '((sequence "TODO(t)" "NEXT(n)" "WAITING(w)" "SOMEDAY(s)" "PROJ(p)"
|
(org-todo-keywords '((sequence "TODO(t)" "NEXT(n)" "WAITING(w)" "SOMEDAY(s)" "PROJ(p)"
|
||||||
"|" "DONE(d)" "CANCELED(c)")))
|
"|" "DONE(d)" "CANCELED(c)")))
|
||||||
(org-todo-keywords-for-agenda '((sequence "NEXT(n)" "TODO(t)" "WAITING(w)" "SOMEDAY(s)" "PROJ(p)" "|" "DONE(d)" "CANCELED(c)")))
|
(org-todo-keywords-for-agenda '((sequence "NEXT(n)" "TODO(t)" "WAITING(w)" "SOMEDAY(s)" "PROJ(p)" "|" "DONE(d)" "CANCELED(c)")))
|
||||||
(org-agenda-files (list "~/Nextcloud/org/" "~/org/snamellit/" "~/org/customer/" "~/org/personal/"))
|
(org-agenda-files (list
|
||||||
|
"~/Nextcloud/org/"
|
||||||
|
"~/org/snamellit/"
|
||||||
|
;"~/org/customer/"
|
||||||
|
"~/org/personal/"))
|
||||||
(org-refile-targets '(
|
(org-refile-targets '(
|
||||||
(org-agenda-files . (:level . 1))
|
(org-agenda-files . (:level . 1))
|
||||||
("~/org/personal/bijen.org" . (:level . 1))
|
("~/org/personal/bijen.org" . (:level . 1))
|
||||||
|
|
Loading…
Add table
Reference in a new issue