This commit is contained in:
parent
e82ece7cba
commit
f6173d7fbd
2 changed files with 45 additions and 13 deletions
|
@ -1286,14 +1286,14 @@ Add support for Elixir with [[https://github.com/elixir-editors/emacs-elixir][el
|
|||
#+begin_src emacs-lisp
|
||||
(use-package elixir-mode
|
||||
:after eglot
|
||||
:hook ((elixir-format . (lambda ()
|
||||
(if (projectile-project-p)
|
||||
(setq elixir-format-arguments
|
||||
(list "--dot-formatter"
|
||||
(concat (locate-dominating-file buffer-file-name ".formatter.exs") ".formatter.exs")))
|
||||
(setq elixir-format-arguments nil))))
|
||||
(elixir-mode . (lambda () (add-hook 'before-save-hook 'elixir-format nil t)))
|
||||
(elixir-mode . eglot-ensure))
|
||||
:hook ((elixir-mode . eglot-ensure))
|
||||
;; ((elixir-format . (lambda ()
|
||||
;; (if (projectile-project-p)
|
||||
;; (setq elixir-format-arguments
|
||||
;; (list "--dot-formatter"
|
||||
;; (concat (locate-dominating-file buffer-file-name ".formatter.exs") ".formatter.exs")))
|
||||
;; (setq elixir-format-arguments nil))))
|
||||
;; (elixir-mode . (lambda () (add-hook 'before-save-hook 'elixir-format nil t)))
|
||||
:config
|
||||
;; (setq lsp-elixir-server-command '("elixir-ls"))
|
||||
(add-to-list 'auto-mode-alist '("\\.[hl]eex\\'" . elixir-mode)))
|
||||
|
@ -1460,6 +1460,26 @@ Enable clangd LSP for C and C++
|
|||
((c++-mode c++-ts-mode) . eglot-ensure))
|
||||
#+end_src
|
||||
|
||||
Add some flags to clangd
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(with-eval-after-load 'eglot
|
||||
(add-to-list 'eglot-server-programs
|
||||
'((c-mode c-ts-mode c++-mode c++-ts-mode)
|
||||
. ("clangd"
|
||||
"--malloc-trim"
|
||||
"--log=error"
|
||||
"--clang-tidy"
|
||||
"--completion-style=detailed"))))
|
||||
#+end_src
|
||||
|
||||
Add QML mode
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package qml-mode
|
||||
:mode "\\.qml\\'")
|
||||
#+end_src
|
||||
|
||||
Enable and configure =auto-insert-mode= for Horus projects
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
|
|
@ -38,6 +38,17 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
tree-sitter-qml = pkgs.tree-sitter.buildGrammar {
|
||||
language = "tree-sitter-qmljs";
|
||||
version = "unstable-2024-02-02";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "yuja";
|
||||
repo = "tree-sitter-qmljs";
|
||||
rev = "9fa49ff3315987f715ce5666ff979a7742fa8a98";
|
||||
sha256 = "q20gLVLs0LpqRpgo/qNRDfExbWXhICWZjM1ux4+AT6M=";
|
||||
};
|
||||
};
|
||||
|
||||
emacsWithPackages = pkgs.emacsWithPackagesFromUsePackage {
|
||||
config =
|
||||
let
|
||||
|
@ -98,6 +109,7 @@ let
|
|||
tree-sitter-nu
|
||||
tree-sitter-pioasm
|
||||
tree-sitter-python
|
||||
tree-sitter-qml
|
||||
tree-sitter-query
|
||||
tree-sitter-regex
|
||||
tree-sitter-rst
|
||||
|
|
Loading…
Reference in a new issue