54 lines
1.0 KiB
Nix
54 lines
1.0 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
impure,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.coding.editor.neovim;
|
|
in
|
|
{
|
|
options.my.coding.editor.neovim = {
|
|
enable = lib.mkEnableOption "neovim";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
# workaround
|
|
environment.sessionVariables.EDITOR = "nvim";
|
|
my.hm = {
|
|
xdg.configFile."nvim".source = impure.mkImpureLink ./nvim;
|
|
programs.neovim = {
|
|
enable = true;
|
|
defaultEditor = true;
|
|
viAlias = true;
|
|
vimAlias = true;
|
|
vimdiffAlias = true;
|
|
withPython3 = false;
|
|
withRuby = false;
|
|
sideloadInitLua = true;
|
|
extraPackages = with pkgs; [
|
|
# treesitter
|
|
tree-sitter
|
|
gnutar
|
|
curl
|
|
gcc
|
|
|
|
ripgrep # telescope
|
|
|
|
vscode-json-languageserver
|
|
vscode-langservers-extracted
|
|
# taplo
|
|
tombi
|
|
typos-lsp
|
|
# render-markdown.nvim
|
|
python3Packages.pylatexenc
|
|
];
|
|
};
|
|
};
|
|
my.persist.homeDirs = [
|
|
".local/share/nvim"
|
|
];
|
|
};
|
|
}
|