update treesitter and nixpkgs

This commit is contained in:
Dmitriy Pleshevskiy 2022-11-19 23:59:09 +03:00
parent aa9f2ccb68
commit 7d91e495dc
Signed by: pleshevskiy
GPG Key ID: 1B59187B161C0215
3 changed files with 66 additions and 18 deletions

View File

@ -71,5 +71,6 @@ in
}).overrideAttrs (oldAttrs: {
passthru = oldAttrs.passthru // {
nix2lua = nix2lua.lib;
inherit plugins;
};
})

View File

@ -237,11 +237,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1667969101,
"narHash": "sha256-GL53T705HO7Q/KVfbb5STx8AxFs8YgaGY8pvAZC+O7U=",
"lastModified": 1668852955,
"narHash": "sha256-1ozaNW9uFRvm3cP9M6FPx+hdqyFQnf49M3HrLQ6nqrk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bbf77421ac51a7c93f5f0f760da99e4dbce614fa",
"rev": "2fb6f9fb0ef3ca727cbd9ae30b90d1ce49d5fcca",
"type": "github"
},
"original": {
@ -339,17 +339,16 @@
"nvim-treesitter": {
"flake": false,
"locked": {
"lastModified": 1664008557,
"narHash": "sha256-hZqZkXrIw9OfXLqioSqagmEPoIz8gcT+WpEhVURdeHw=",
"lastModified": 1668872733,
"narHash": "sha256-taM3HGP0BD1bOzFu4TF9iDT2EhoohV2FkXy0/TVbIDg=",
"owner": "nvim-treesitter",
"repo": "nvim-treesitter",
"rev": "a60aa7b2e1dd9219c6356f65ba48bdbd50090abd",
"rev": "24caa23402247cf03cfcdd54de8cdb8ed00690ba",
"type": "github"
},
"original": {
"owner": "nvim-treesitter",
"repo": "nvim-treesitter",
"rev": "a60aa7b2e1dd9219c6356f65ba48bdbd50090abd",
"type": "github"
}
},

View File

@ -103,7 +103,7 @@
# https://github.com/nvim-treesitter/nvim-treesitter
nvim-treesitter = {
url = "github:nvim-treesitter/nvim-treesitter?rev=a60aa7b2e1dd9219c6356f65ba48bdbd50090abd";
url = "github:nvim-treesitter/nvim-treesitter";
flake = false;
};
@ -230,6 +230,7 @@
} //
flake-utils.lib.eachDefaultSystem (system:
let
inherit (builtins) mapAttrs;
pkgs = import nixpkgs { inherit system; };
minimalNeovim = pkgs.callPackage self (mkNvimPlugins pkgs);
@ -263,23 +264,70 @@
};
});
fullNeovim = recommendedNeovim.override {
grammarFileTypes = [
"nix"
"lua"
"bash"
"yaml"
"json"
"rust"
"haskell"
"typescript"
"javascript"
"python"
"sql"
"html"
"pug"
];
plugins = recommendedNeovim.plugins // (with minimalNeovim.nix2lua; {
lspSaga.settings = {
border_style = "rounded";
symbol_in_winbar.enable = false;
code_action_lightbulb.enable = false;
code_action_keys = { quit = "<Esc>"; };
definition_action_keys = { quit = "<Esc>"; };
rename_action_quit = "<C-c>";
};
lspConfig = {
servers = {
nil_ls = { };
tsserver = { };
eslint = { };
denols = {
root_dir = mkLuaRaw "root_pattern(\"deno.json\", \"deno.jsonc\")";
};
rust_analyzer = {
settings.rust-analyzer = {
"server.path" = "rust-analyzer";
"updates.prompt" = false;
"updates.checkOnStartup" = false;
"checkOnSave.enable" = true;
"checkOnSave.command" = "clippy";
"cargo.autoreload" = true;
};
};
};
};
});
};
packages = {
default = recommendedNeovim;
recommended = recommendedNeovim;
full = fullNeovim;
minimal = minimalNeovim;
};
mkApp = drv: {
type = "app";
program = "${drv}/bin/nvim";
};
in
{
apps = {
default = mkApp recommendedNeovim;
recommended = mkApp recommendedNeovim;
minimal = mkApp minimalNeovim;
};
inherit packages;
packages = {
default = recommendedNeovim;
recommended = recommendedNeovim;
minimal = minimalNeovim;
};
apps = mapAttrs (name: mkApp) packages;
devShells.default = pkgs.mkShell {
packages = [