mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
dendritic: rewrote entire config
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
{ inputs, ... }: {
|
||||
flake.hostModules.micro = { pkgs-unstable, ... }: {
|
||||
programs.micro = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.micro-full;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
home.file.".config/micro/plug/vivify" = {
|
||||
enable = true;
|
||||
source = inputs.microPlugins-vivify;
|
||||
recursive = true;
|
||||
force = true;
|
||||
};
|
||||
home.file.".config/micro/init.lua" = {
|
||||
enable = true;
|
||||
force = true;
|
||||
text = ''
|
||||
local buffer = import("micro/buffer")
|
||||
local shell = import("micro/shell")
|
||||
|
||||
function vivifyOpen(buf)
|
||||
local cursor = buf:GetActiveCursor()
|
||||
local line = cursor.Loc.Y + 1
|
||||
|
||||
shell.ExecCommand("viv", string.format("%s:%d", buf.AbsPath, line))
|
||||
end
|
||||
|
||||
function onBufferOpen(buf)
|
||||
if os.getenv("MICRO_VIVIFY") ~= "1" then
|
||||
return
|
||||
end
|
||||
|
||||
-- only run for real files (not help/log/etc)
|
||||
if buf.Type.Kind == buffer.BTDefault then
|
||||
vivifyOpen(buf)
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user