2024-06-05 16:12:13 +02:00
|
|
|
# homepage: https://github.com/AstroNvim/astrocore
|
2024-06-07 17:07:38 +02:00
|
|
|
{ helpers, icons, lib, pkgs, ... }:
|
2024-06-03 23:45:15 +02:00
|
|
|
|
2024-06-07 17:07:38 +02:00
|
|
|
let
|
|
|
|
|
diagnostics = import ./diagnostics.nix { inherit icons; };
|
|
|
|
|
features = import ./features.nix;
|
2024-06-07 22:51:48 +02:00
|
|
|
options = import ./options.nix;
|
2024-06-07 17:07:38 +02:00
|
|
|
rooter = import ./rooter.nix;
|
|
|
|
|
sessions = import ./sessions.nix;
|
|
|
|
|
in
|
2024-06-03 23:45:15 +02:00
|
|
|
{
|
2024-06-04 20:59:45 +02:00
|
|
|
extra = {
|
|
|
|
|
packages = [
|
|
|
|
|
(import ./package { inherit lib pkgs; })
|
|
|
|
|
];
|
|
|
|
|
|
2024-06-06 08:06:53 +02:00
|
|
|
config = ''
|
2024-06-07 18:33:13 +02:00
|
|
|
require("astrocore").setup({
|
2024-06-07 17:07:38 +02:00
|
|
|
diagnostics = ${helpers.toLuaObject diagnostics},
|
|
|
|
|
features = ${helpers.toLuaObject features},
|
2024-06-07 22:51:48 +02:00
|
|
|
options = ${helpers.toLuaObject options},
|
2024-06-07 17:07:38 +02:00
|
|
|
rooter = ${helpers.toLuaObject rooter},
|
|
|
|
|
sessions = ${helpers.toLuaObject sessions},
|
|
|
|
|
on_keys = {
|
|
|
|
|
auto_hlsearch = {
|
|
|
|
|
function(char)
|
|
|
|
|
if vim.fn.mode() == "n" then
|
|
|
|
|
local new_hlsearch = vim.tbl_contains({ "<CR>", "n", "N", "*", "#", "?", "/" }, vim.fn.keytrans(char))
|
|
|
|
|
if vim.opt.hlsearch:get() ~= new_hlsearch then vim.opt.hlsearch = new_hlsearch end
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
},
|
2024-06-06 08:06:53 +02:00
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
'';
|
2024-06-04 20:59:45 +02:00
|
|
|
};
|
2024-06-03 23:45:15 +02:00
|
|
|
}
|