Skip to content

Commit

Permalink
fix: make emacs-rustic use TS modes
Browse files Browse the repository at this point in the history
  • Loading branch information
Swarsel committed Jul 11, 2024
1 parent 3cd390b commit cc00e0e
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 13 deletions.
9 changes: 8 additions & 1 deletion SwarselSystems.org
Original file line number Diff line number Diff line change
Expand Up @@ -9777,9 +9777,16 @@ This sets up rustic-mode with tree-sitter support - there is still one issue to
:init
(setq rust-mode-treesitter-derive t)
:config
(define-key rust-ts-mode-map (kbd "C-c C-c C-r") 'rustic-cargo-run)
(define-key rust-ts-mode-map (kbd "C-c C-c C-b") 'rustic-cargo-build)
(define-key rust-ts-mode-map (kbd "C-c C-c C-k") 'rustic-cargo-check)
(define-key rust-ts-mode-map (kbd "C-c C-c d") 'rustic-cargo-doc)
(define-key rust-ts-mode-map (kbd "C-c C-c a") 'rustic-cargo-add)
(setq rustic-format-on-save t)
(setq rustic-lsp-client 'eglot)
:mode ("\\.rs" . rustic-mode))


#+end_src

*** Tramp
Expand Down Expand Up @@ -9955,8 +9962,8 @@ After having tried out =lsp-mode= and =lsp-bridge= for a while each, I must say
c-ts-mode
c++-mode
c++-ts-mode
rustic-mode
rust-ts-mode
rustic-mode
tex-mode
LaTeX-mode
) . (lambda () (progn
Expand Down
94 changes: 83 additions & 11 deletions index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion programs/emacs/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,11 @@ create a new one."
:init
(setq rust-mode-treesitter-derive t)
:config
(define-key rust-ts-mode-map (kbd "C-c C-c C-r") 'rustic-cargo-run)
(define-key rust-ts-mode-map (kbd "C-c C-c C-b") 'rustic-cargo-build)
(define-key rust-ts-mode-map (kbd "C-c C-c C-k") 'rustic-cargo-check)
(define-key rust-ts-mode-map (kbd "C-c C-c d") 'rustic-cargo-doc)
(define-key rust-ts-mode-map (kbd "C-c C-c a") 'rustic-cargo-add)
(setq rustic-format-on-save t)
(setq rustic-lsp-client 'eglot)
:mode ("\\.rs" . rustic-mode))
Expand Down Expand Up @@ -1388,8 +1393,8 @@ create a new one."
c-ts-mode
c++-mode
c++-ts-mode
rustic-mode
rust-ts-mode
rustic-mode
tex-mode
LaTeX-mode
) . (lambda () (progn
Expand Down

0 comments on commit cc00e0e

Please sign in to comment.