nixd + ty

This commit is contained in:
Aleksandr Lebedev 2025-07-26 10:32:00 +02:00
parent c256cbb11a
commit 34035d410d
2 changed files with 24 additions and 4 deletions

View file

@ -541,7 +541,7 @@ Emacs Dashboard is an extensible startup screen showing you recent files, bookma
(bookmarks . "nf-oct-book"))) (bookmarks . "nf-oct-book")))
:config :config
(dashboard-setup-startup-hook)) (dashboard-setup-startup-hook))
(setq dashboard-startup-banner "~/.emacs.d/nixmacs.xpm") ;; use custom image as banner (setq dashboard-startup-banner '("~/.emacs.d/nixmacs.xpm" 'logo))
#+end_src #+end_src
* Diminish * Diminish
This package implements hiding or abbreviation of the modeline displays (lighters) of minor-modes. With this package installed, you can add :diminish to any use-package block to hide that particular mode in the modeline. This package implements hiding or abbreviation of the modeline displays (lighters) of minor-modes. With this package installed, you can add :diminish to any use-package block to hide that particular mode in the modeline.
@ -1502,7 +1502,17 @@ Emacs has built-in programming language modes for Lisp, Scheme, DSSSL, Ada, ASM,
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package nix-ts-mode (use-package nix-ts-mode
:ensure t :ensure t
:mode "\\.nix\\'") :mode "\\.nix\\'"
:hook
(nix-ts-mode . lsp-deferred) ;; So that envrc mode will work
:custom
(lsp-disabled-clients '((nix-ts-mode . nix-nil))) ;; Disable nil so that nixd will be used as lsp-server
:config
(setq lsp-nix-nixd-server-path "nixd"
lsp-nix-nixd-formatting-command [ "alejandra" ]
lsp-nix-nixd-nixpkgs-expr "import <nixpkgs> { }"
lsp-nix-nixd-nixos-options-expr "(builtins.getFlake \"github:kylekrein/nixos-config\".nixosConfigurations.kylekrein-homepc.options"
lsp-nix-nixd-home-manager-options-expr "(builtins.getFlake \"github:kylekrein/nixos-config\".nixosConfigurations.kylekrein-homepc.options.home-manager.users.type.getSubOptions []"))
#+end_src #+end_src
[[https://github.com/emacs-twist/nix3.el][nix3.el]] [[https://github.com/emacs-twist/nix3.el][nix3.el]]
@ -1595,6 +1605,14 @@ Emacs has built-in programming language modes for Lisp, Scheme, DSSSL, Ada, ASM,
. ("csharp-ls"))) . ("csharp-ls")))
(add-hook 'csharp-ts-mode-hook #'eglot-ensure)) (add-hook 'csharp-ts-mode-hook #'eglot-ensure))
#+end_src #+end_src
*** Python
#+begin_src emacs-lisp
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'(python-ts-mode
. ("ty")))
(add-hook 'python-ts-mode-hook #'eglot-ensure))
#+end_src
*** Lobster *** Lobster
Made from [[https://github.com/lite-xl/lite-xl-plugins/blob/master/plugins/language_lobster.lua]] Made from [[https://github.com/lite-xl/lite-xl-plugins/blob/master/plugins/language_lobster.lua]]
#+begin_src emacs-lisp #+begin_src emacs-lisp

View file

@ -7,7 +7,7 @@
preTangledFile = pkgs.writeText "config.org" '' preTangledFile = pkgs.writeText "config.org" ''
${builtins.readFile ./config.org} ${builtins.readFile ./config.org}
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq dashboard-startup-banner "${./nixmacs.xpm}") (setq dashboard-startup-banner '("${./nixmacs.xpm}" 'logo))
#+end_src #+end_src
''; '';
configFile = pkgs.tangleOrgBabelFile "default.el" preTangledFile { configFile = pkgs.tangleOrgBabelFile "default.el" preTangledFile {
@ -93,7 +93,9 @@
csharp-ls csharp-ls
clang-tools clang-tools
cmake-language-server cmake-language-server
nil nixd
alejandra
ty
]); ]);
# Optionally override derivations. # Optionally override derivations.