1
Fork 0
satellite/modules/applications/neovim.nix

88 lines
2.7 KiB
Nix
Raw Permalink Normal View History

{ pkgs, lib, paths, ... }:
2022-01-30 20:19:35 +01:00
let
2022-12-26 20:07:10 +01:00
teal = pkgs.fetchFromGitHub {
owner = "teal-language";
repo = "tl";
rev = "526fe3640fe6265706541c251e984c033a1a5ec9";
sha256 = "0l31qj492iaiadpp4s0wflfb7vn6zzxwhbiyczisdgpd9ydj20gf";
};
theme = pkgs.myThemes.current;
2022-03-10 20:59:18 +01:00
extraPackages = with pkgs; [
# Language servers
nodePackages.typescript-language-server # typescript
easy-purescript-nix.purescript-language-server # purescript
sumneko-lua-language-server # lua
rnix-lsp # nix
haskell-language-server # haskell
tectonic # also latex something?
texlab # latex
2022-12-26 20:07:10 +01:00
nodePackages_latest.vscode-langservers-extracted
2022-03-10 20:59:18 +01:00
# Formatters
luaformatter # lua
2022-12-26 20:07:10 +01:00
stylua # lua
ormolu # haskell
2022-07-19 20:19:36 +02:00
easy-purescript-nix.purs-tidy
2022-12-26 20:07:10 +01:00
nodePackages_latest.prettier_d_slim
2022-01-30 19:10:57 +01:00
# Others
2022-07-27 10:00:25 +02:00
nodePackages.typescript # typescript
wakatime # time tracking
fd # file finder
ripgrep # grep rewrite (I think?)
update-nix-fetchgit # useful for nix stuff
tree-sitter # syntax highlighting
2022-07-19 20:19:36 +02:00
libstdcxx5 # required by treesitter aparently
2022-12-14 03:20:59 +01:00
zathura # pdf reader
xdotool # for zathura reverse search or whatever it's called
2022-12-26 20:07:10 +01:00
lua # for repls and whatnot
glow # md preview in terminal
pandoc # md processing
libsForQt5.falkon # aparently needed for md preview
luajitPackages.luarocks # lua package manager
2022-01-30 19:10:57 +01:00
texlive.combined.scheme-full # latex stuff
python38Packages.pygments # required for latex syntax highlighting
];
2022-01-31 21:54:22 +01:00
2022-12-26 20:07:10 +01:00
wrapClient = { base, name }:
pkgs.symlinkJoin {
inherit (base) name meta;
paths = [ base ];
nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = ''
2022-12-26 20:07:10 +01:00
wrapProgram $out/bin/${name} \
--prefix PATH : ${lib.makeBinPath extraPackages} \
2022-12-27 20:45:43 +01:00
--set LAZY_NVIM_PATH ${lazy-nvim} \
--set INSIDE_NEOVIDE ${if name == "neovide" then "1" else "0"}
'';
};
2022-12-14 03:20:59 +01:00
2022-12-26 20:07:10 +01:00
neovim = wrapClient { base = pkgs.neovim-nightly; name = "nvim"; };
neovide = wrapClient { base = pkgs.neovide; name = "neovide"; };
2022-12-14 03:20:59 +01:00
nixPlugins = ".local/share/nvim/site/pack/nix";
in
{
2022-12-14 03:20:59 +01:00
home-manager.users.adrielus = { config, ... }:
let simlink = config.lib.file.mkOutOfStoreSymlink; in
{
2022-12-26 20:07:10 +01:00
home.file."${nixPlugins}/start/paq-nvim".source = paq;
2022-12-14 03:20:59 +01:00
home.file."${nixPlugins}/start/theming/lua/my/theme.lua".source = theme.neovim.theme;
2022-12-26 20:07:10 +01:00
home.file."${nixPlugins}/start/teal/lua".source = teal; # teal (typed lua)
2022-12-14 03:20:59 +01:00
home.file."${nixPlugins}/start/snippets".source = simlink "${paths.dotfiles}/vscode-snippets";
2022-12-27 20:45:43 +01:00
home.file.".config/nvim".source = simlink "${paths.dotfiles}/neovim";
# home.file.".config/nvim".source = ../../dotfiles/neovim;
2022-06-18 23:09:21 +02:00
2022-07-19 20:19:36 +02:00
programs.neovim.enable = false;
home.packages = [
neovim
2022-12-26 20:07:10 +01:00
neovide
];
};
2022-01-30 19:10:57 +01:00
}