Switch nix formatter and lsp
Change formatter alejandra -> nixfmt (new official formatter) Change LSP nil -> nixd for more features
This commit is contained in:
parent
4f98a8cd93
commit
3e357cbe95
|
@ -3,7 +3,8 @@
|
|||
pkgs,
|
||||
fonts,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
imports = [ ../shell/default.nix ];
|
||||
services.emacs = {
|
||||
enable = true;
|
||||
|
@ -18,7 +19,8 @@
|
|||
# git clone https://git.xenia.me.uk/pixelifytica/emacs.git ~/.emacs.d
|
||||
enable = true;
|
||||
package = pkgs.emacs29-pgtk;
|
||||
extraConfig = let
|
||||
extraConfig =
|
||||
let
|
||||
fixed-font-family = "${fonts.monospace.name}";
|
||||
variable-font-family = "${fonts.sansSerif.name}";
|
||||
font-height = builtins.toString (builtins.floor (builtins.mul fonts.sizes.applications 10));
|
||||
|
@ -45,12 +47,17 @@
|
|||
'';
|
||||
};
|
||||
custom-theme-hash = builtins.hashFile "sha256" "${custom-theme}/${custom-theme-name}-theme.el";
|
||||
in ''
|
||||
in
|
||||
''
|
||||
(add-to-list 'custom-theme-load-path "${custom-theme}")
|
||||
(add-to-list 'custom-safe-themes "${custom-theme-hash}")
|
||||
(load-theme '${custom-theme-name})
|
||||
'';
|
||||
extraPackages = epkgs: with epkgs; [treesit-grammars.with-all-grammars mu4e];
|
||||
extraPackages =
|
||||
epkgs: with epkgs; [
|
||||
treesit-grammars.with-all-grammars
|
||||
mu4e
|
||||
];
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
# Emacs requirements
|
||||
|
@ -68,8 +75,18 @@
|
|||
mp3info
|
||||
|
||||
# Customised LaTeX install
|
||||
(texlive.combine
|
||||
{inherit (pkgs.texlive) scheme-medium dvisvgm dvipng wrapfig amsmath ulem hyperref capt-of;})
|
||||
(texlive.combine {
|
||||
inherit (texlive)
|
||||
scheme-medium
|
||||
dvisvgm
|
||||
dvipng
|
||||
wrapfig
|
||||
amsmath
|
||||
ulem
|
||||
hyperref
|
||||
capt-of
|
||||
;
|
||||
})
|
||||
|
||||
# Development tools
|
||||
## Code screenshots
|
||||
|
@ -86,20 +103,19 @@
|
|||
nodePackages.eslint
|
||||
|
||||
## Formatters
|
||||
alejandra
|
||||
nixfmt-rfc-style
|
||||
shfmt
|
||||
stylua
|
||||
nodePackages.prettier
|
||||
|
||||
## Language servers
|
||||
nil # Nix lsp
|
||||
nixd
|
||||
lua-language-server
|
||||
nodePackages.typescript-language-server
|
||||
|
||||
## Interpreters
|
||||
(python3.withPackages
|
||||
(ps:
|
||||
with ps; [
|
||||
(python3.withPackages (
|
||||
ps: with ps; [
|
||||
tkinter
|
||||
python-lsp-server
|
||||
mypy
|
||||
|
@ -107,9 +123,9 @@
|
|||
scipy
|
||||
xarray
|
||||
matplotlib
|
||||
]))
|
||||
(luajit.withPackages
|
||||
(ps: [(ps.callPackage ./luarocks/scilua.nix {})]))
|
||||
]
|
||||
))
|
||||
(luajit.withPackages (ps: [ (ps.callPackage ./luarocks/scilua.nix { }) ]))
|
||||
];
|
||||
xdg.configFile = {
|
||||
"ruff/pyproject.toml".source = ./ruff.toml;
|
||||
|
|
Loading…
Reference in a new issue