Compare commits

..

No commits in common. "4baaaadf02411584dffa41d1aa20c01b6ced7963" and "39f8a4510b9ffa37b84d707da1a343c459f1e0dd" have entirely different histories.

2 changed files with 41 additions and 16 deletions

View File

@ -1,7 +1,7 @@
#+title: Emacs — Keybinding Managers #+title: Emacs — Keybinding Managers
#+setupfile: ../headers #+setupfile: ../headers
#+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code #+property: header-args:emacs-lisp :mkdirp yes :lexical t :exports code
#+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/keybinding-managers.el #+property: header-args:emacs-lisp+ :tangle ~/.config/emacs/lisp/keybinding-managemers.el
#+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export #+property: header-args:emacs-lisp+ :mkdirp yes :noweb no-export
* Keybinding Managers * Keybinding Managers

View File

@ -20,8 +20,7 @@ variables to install grammars for different languages.
json-ts-mode rust-ts-mode tsx-ts-mode python-ts-mode json-ts-mode rust-ts-mode tsx-ts-mode python-ts-mode
css-ts-mode yaml-ts-mode) . lsp-deferred) css-ts-mode yaml-ts-mode) . lsp-deferred)
:init :init
(setq treesit-font-lock-level 4 (setq treesit-language-source-alist
treesit-language-source-alist
'((astro "https://github.com/virchau13/tree-sitter-astro") '((astro "https://github.com/virchau13/tree-sitter-astro")
(bash "https://github.com/tree-sitter/tree-sitter-bash") (bash "https://github.com/tree-sitter/tree-sitter-bash")
(c "https://github.com/tree-sitter/tree-sitter-c") (c "https://github.com/tree-sitter/tree-sitter-c")
@ -289,7 +288,6 @@ You can find the keybinds of Treemacs here.
[remap xref-find-apropos] #'consult-lsp-symbols)) [remap xref-find-apropos] #'consult-lsp-symbols))
#+end_src #+end_src
*** dap-mode
~dap-mode~ is an advanced debugging mode that works through LSP. Note ~dap-mode~ is an advanced debugging mode that works through LSP. Note
that currently, ~dap-firefox~ and ~dap-chrome~ dont work correctly due to that currently, ~dap-firefox~ and ~dap-chrome~ dont work correctly due to
[[https://github.com/emacs-lsp/dap-mode/issues/547][this issue]]. A workaround can be found in [[https://github.com/emacs-lsp/dap-mode/issues/554#issuecomment-1171256089][this comment]] though. [[https://github.com/emacs-lsp/dap-mode/issues/547][this issue]]. A workaround can be found in [[https://github.com/emacs-lsp/dap-mode/issues/554#issuecomment-1171256089][this comment]] though.
@ -1671,16 +1669,43 @@ Tide enabled interactivity with Typescript.
"roi" #'tide-organize-imports)) "roi" #'tide-organize-imports))
#+end_src #+end_src
**** Vue *** Zig
There isnt really any configuration in this heading, but an important [[https://ziglang.org/][Zig]] is to C kind of what Rust is to C++: a modern replacement without
note concerning the usage of LSP with Vue. If the packages =typescript= sacrificing performance. It is much safer than C while providing
and =vue-tsc= are not in the =package.json= of a project, =volar= (or interop with it. Plus, its [[https://ziglang.org/documentation/master/std/][standard library]] is pretty complete.
=vue-semantic-server= according to =lsp-mode=) wont start properly. The
simplest fix is to run the following command:
#+begin_src sh
npm install --save-dev vue-tsc typescript
#+end_src
Or replace =npm= with whichever package manager you prefer.
If you want to work with Vue in Emacs, =web-mode= is more than enough First, here is its major mode.
when paired with an LSP server. #+begin_src emacs-lisp
(use-package zig-mode
:defer t
:straight (:build t)
:after flycheck
:hook (zig-mode . lsp-deferred)
:config
;; This is from DoomEmacs
(flycheck-define-checker zig
"A zig syntax checker using the zig-fmt interpreter."
:command ("zig" "fmt" (eval (buffer-file-name)))
:error-patterns
((error line-start (file-name) ":" line ":" column ": error: " (message) line-end))
:modes zig-mode)
(add-to-list 'flycheck-checkers 'zig)
:general
(phundrak/major-leader-key
:keymaps 'zip-mode-map
:packages 'lsp-mode
"l" '(:keymap lsp-command-map :which-key "lsp"))
(phundrak/major-leader-key
:packages 'zig-mode
:keymaps 'zig-mode-map
"c" #'zig-compile
"f" #'zig-format-buffer
"r" #'zig-run
"t" #'zig-test-buffer))
#+end_src
For LSP to work, we need ~zls~ to be installed. In my case, as I am on
Arch Linux, I can install it from the AUR, and my AUR helper is ~paru~.
#+begin_src fish :results raw :wrap "src text" :exports code
paru --skipreview --noconfirm -S zls-bin 2>&1
#+end_src