62 lines
1.2 KiB
Nix
62 lines
1.2 KiB
Nix
{ pkgs, lib, ... }:
|
|
let
|
|
deps = with pkgs; [
|
|
lua
|
|
|
|
# Language Servers
|
|
rust-analyzer
|
|
nil
|
|
pyright
|
|
bash-language-server
|
|
lua-language-server
|
|
zls
|
|
typescript
|
|
nodePackages_latest.typescript-language-server
|
|
|
|
kdePackages.qtdeclarative # QML formatter
|
|
|
|
# Formatter
|
|
python311Packages.black # Python formatter
|
|
clang-tools
|
|
nodePackages_latest.prettier # JSON, JS, TS formatter
|
|
yamlfmt # YAML formatter
|
|
taplo # TOML formatter
|
|
rustfmt # Rust formatter
|
|
shfmt # Shell, Bash etc.
|
|
nixfmt-rfc-style
|
|
stylua # lua formatter
|
|
|
|
# Misc
|
|
ripgrep
|
|
rustc
|
|
cargo
|
|
nodejs_22
|
|
clang
|
|
tree-sitter
|
|
fd
|
|
luajitPackages.luarocks
|
|
wl-clipboard
|
|
];
|
|
in
|
|
pkgs.writeTextFile {
|
|
name = "nvim";
|
|
executable = true;
|
|
destination = "/bin/nvim";
|
|
text = ''
|
|
#!${pkgs.bash}/bin/bash
|
|
export PATH=${lib.makeBinPath deps}:$PATH
|
|
|
|
CONF="${../.}"
|
|
|
|
export LUA_PATH="$CONF/lua/?.lua";
|
|
export CONFIG_LOC="$CONF/init.lua"
|
|
|
|
${pkgs.neovim-unwrapped}/bin/nvim -u $CONFIG_LOC $@
|
|
'';
|
|
checkPhase = ''
|
|
${pkgs.stdenv.shellDryRun} "$target"
|
|
'';
|
|
meta = pkgs.neovim.meta // {
|
|
mainProgram = "nvim";
|
|
};
|
|
}
|