Compare commits
No commits in common. "4baaaadf02411584dffa41d1aa20c01b6ced7963" and "39f8a4510b9ffa37b84d707da1a343c459f1e0dd" have entirely different histories.
4baaaadf02
...
39f8a4510b
@ -1,7 +1,7 @@
|
||||
#+title: Emacs — Keybinding Managers
|
||||
#+setupfile: ../headers
|
||||
#+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
|
||||
|
||||
* Keybinding Managers
|
||||
|
@ -20,8 +20,7 @@ variables to install grammars for different languages.
|
||||
json-ts-mode rust-ts-mode tsx-ts-mode python-ts-mode
|
||||
css-ts-mode yaml-ts-mode) . lsp-deferred)
|
||||
:init
|
||||
(setq treesit-font-lock-level 4
|
||||
treesit-language-source-alist
|
||||
(setq treesit-language-source-alist
|
||||
'((astro "https://github.com/virchau13/tree-sitter-astro")
|
||||
(bash "https://github.com/tree-sitter/tree-sitter-bash")
|
||||
(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))
|
||||
#+end_src
|
||||
|
||||
*** dap-mode
|
||||
~dap-mode~ is an advanced debugging mode that works through LSP. Note
|
||||
that currently, ~dap-firefox~ and ~dap-chrome~ don’t 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.
|
||||
@ -1671,16 +1669,43 @@ Tide enabled interactivity with Typescript.
|
||||
"roi" #'tide-organize-imports))
|
||||
#+end_src
|
||||
|
||||
**** Vue
|
||||
There isn’t really any configuration in this heading, but an important
|
||||
note concerning the usage of LSP with Vue. If the packages =typescript=
|
||||
and =vue-tsc= are not in the =package.json= of a project, =volar= (or
|
||||
=vue-semantic-server= according to =lsp-mode=) won’t 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.
|
||||
*** Zig
|
||||
[[https://ziglang.org/][Zig]] is to C kind of what Rust is to C++: a modern replacement without
|
||||
sacrificing performance. It is much safer than C while providing
|
||||
interop with it. Plus, its [[https://ziglang.org/documentation/master/std/][standard library]] is pretty complete.
|
||||
|
||||
If you want to work with Vue in Emacs, =web-mode= is more than enough
|
||||
when paired with an LSP server.
|
||||
First, here is its major mode.
|
||||
#+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
|
||||
|
Loading…
Reference in New Issue
Block a user