update notlua

This commit is contained in:
chayleaf 2023-03-19 00:36:49 +07:00
parent 75b50759ae
commit e05588fa93
3 changed files with 11 additions and 27 deletions

View file

@ -16,10 +16,10 @@
programs.neovim = let programs.neovim = let
notlua = config.notlua; notlua = config.notlua;
notlua-nvim = notlua.neovim { inherit (config.programs.neovim) plugins extraLuaPackages; }; notlua-nvim = notlua.neovim { inherit (config.programs.neovim) plugins extraLuaPackages; };
inherit (notlua.keywords) CALL RAW PROP SET LET DEFUN IF APPLY OR EQ RETURN ELSE ATTR MCALL LETREC; inherit (notlua.keywords) CALL RAW PROP SET LET DEFUN IF APPLY OR EQ RETURN ELSE IDX MCALL LETREC;
inherit (notlua.utils) compile; inherit (notlua.utils) compile;
inherit (notlua-nvim.stdlib) vim string require print; inherit (notlua-nvim.stdlib) vim string require print;
inherit (notlua-nvim.keywords) REQ REQ' REQLET; inherit (notlua-nvim.keywords) REQ REQ';
in let in let
vimcmd = name: CALL (RAW "vim.cmd.${name}"); vimcmd = name: CALL (RAW "vim.cmd.${name}");
vimg = name: PROP vim.g name; vimg = name: PROP vim.g name;
@ -178,7 +178,7 @@
{ plugin = ps.nvim-web-devicons; { plugin = ps.nvim-web-devicons;
config = compile "nvim_web_devicons" ((REQ "nvim-web-devicons").setup {}); } config = compile "nvim_web_devicons" ((REQ "nvim-web-devicons").setup {}); }
{ plugin = ps.nvim-tree-lua; { plugin = ps.nvim-tree-lua;
config = compile "nvim_tree_lua" (REQLET "nvim-tree" "nvim-tree.api" (nvim-tree: nvim-tree-api: [ config = compile "nvim_tree_lua" (LET (REQ "nvim-tree") (REQ "nvim-tree.api") (nvim-tree: nvim-tree-api: [
(SET (vimg "loaded_netrw") 1) (SET (vimg "loaded_netrw") 1)
(SET (vimg "loaded_netrwPlugin") 1) (SET (vimg "loaded_netrwPlugin") 1)
(SET vim.o.termguicolors true) (SET vim.o.termguicolors true)
@ -204,7 +204,7 @@
[ "" name ] [ "" name ]
[ "" name ] [ "" name ]
]); ]);
in compile "nvim_cmp" (REQLET "cmp" "lspkind" (cmp: lspkind: in compile "nvim_cmp" (LET (REQ "cmp") (REQ "lspkind") (cmp: lspkind:
# call is required because cmp.setup is a table # call is required because cmp.setup is a table
(CALL cmp.setup { (CALL cmp.setup {
snippet = { snippet = {
@ -222,7 +222,7 @@
}; };
formatting = { formatting = {
format = _: vim_item: let kind = PROP vim_item "kind"; in [ format = _: vim_item: let kind = PROP vim_item "kind"; in [
(SET kind (string.format "%s %s" (ATTR lspkind kind) kind)) (SET kind (string.format "%s %s" (IDX lspkind kind) kind))
(RETURN vim_item) (RETURN vim_item)
]; ];
}; };
@ -230,7 +230,7 @@
"<C-p>" = cmp.mapping.select_prev_item {}; "<C-p>" = cmp.mapping.select_prev_item {};
"<C-n>" = cmp.mapping.select_next_item {}; "<C-n>" = cmp.mapping.select_next_item {};
"<C-space>" = cmp.mapping.complete {}; "<C-space>" = cmp.mapping.complete {};
"<C-e>" = cmp.mapping.close {}; "<C-e>" = CALL cmp.mapping.close;
"<cr>" = cmp.mapping.confirm { "<cr>" = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace; behavior = cmp.ConfirmBehavior.Replace;
select = false; select = false;
@ -270,7 +270,7 @@
ps.cmp_luasnip ps.cmp_luasnip
ps.cmp-nvim-lsp ps.cmp-nvim-lsp
{ plugin = ps.nvim-autopairs; { plugin = ps.nvim-autopairs;
config = compile "nvim_autopairs" (REQLET "nvim-autopairs.completion.cmp" "nvim-autopairs" (cmp-autopairs: nvim-autopairs: [ config = compile "nvim_autopairs" (LET (REQ "nvim-autopairs.completion.cmp") (REQ "nvim-autopairs") (cmp-autopairs: nvim-autopairs: [
(nvim-autopairs.setup { (nvim-autopairs.setup {
disable_filetype = [ "TelescopePrompt" "vim" ]; disable_filetype = [ "TelescopePrompt" "vim" ];
}) })

View file

@ -1,20 +1,5 @@
{ {
"nodes": { "nodes": {
"flake-utils": {
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -71,17 +56,16 @@
}, },
"notlua": { "notlua": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1679082335, "lastModified": 1679159882,
"narHash": "sha256-x6InD4OI2ACS2j53g0j/ogUFn4q7ZkbhDHd+H/CDWZ4=", "narHash": "sha256-sE3MPfc6nM+8Wha9/nO7esg14HX5FJhyrBoZfS/Fe5I=",
"owner": "chayleaf", "owner": "chayleaf",
"repo": "notlua", "repo": "notlua",
"rev": "3e1f540ea069861d5f0973a340aabc02e88e9f6c", "rev": "432a968debd969ef84d78d64bc6e0f31cb54a153",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -29,7 +29,7 @@
"user@nixmsi" = home-manager.lib.homeManagerConfiguration { "user@nixmsi" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux"; pkgs = nixpkgs.legacyPackages."x86_64-linux";
modules = [ modules = [
notlua.nixosModules.x86_64-linux.default notlua.nixosModules.default
nur.nixosModules.nur nur.nixosModules.nur
{ nixpkgs.overlays = [ { nixpkgs.overlays = [
nix-gaming.overlays.default nix-gaming.overlays.default