mirror of
https://github.com/smg1024/nix-darwin.git
synced 2026-05-22 20:32:59 +09:00
feat: home-manager config files implemented
build not tested
This commit is contained in:
parent
248170c877
commit
54297f94fd
44 changed files with 852 additions and 60 deletions
11
home/nvf/core/augroups.nix
Executable file
11
home/nvf/core/augroups.nix
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
[
|
||||
# augroups
|
||||
{
|
||||
enable = true;
|
||||
name = "LastCursorGroup";
|
||||
}
|
||||
{
|
||||
enable = true;
|
||||
name = "HighlightYank";
|
||||
}
|
||||
]
|
||||
33
home/nvf/core/autocmds.nix
Executable file
33
home/nvf/core/autocmds.nix
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
{lib, ...}: [
|
||||
# autocmds
|
||||
{
|
||||
enable = true;
|
||||
event = ["BufReadPost"];
|
||||
desc = "Return to last cursor position";
|
||||
group = "LastCursorGroup";
|
||||
callback = lib.generators.mkLuaInline ''
|
||||
function()
|
||||
local mark = vim.api.nvim_buf_get_mark(0, '"')
|
||||
local line_count = vim.api.nvim_buf_line_count(0)
|
||||
if mark[1] > 0 and mark[1] <= line_count then
|
||||
pcall(vim.api.nvim_win_set_cursor, 0, mark)
|
||||
end
|
||||
end
|
||||
'';
|
||||
}
|
||||
{
|
||||
enable = true;
|
||||
event = ["TextYankPost"];
|
||||
desc = "Highlight yanks on copy";
|
||||
group = "HighlightYank";
|
||||
pattern = ["*"];
|
||||
callback = lib.generators.mkLuaInline ''
|
||||
function()
|
||||
vim.hl.on_yank({
|
||||
higroup = "IncSearch",
|
||||
timeout = 250,
|
||||
})
|
||||
end
|
||||
'';
|
||||
}
|
||||
]
|
||||
8
home/nvf/core/clipboard.nix
Executable file
8
home/nvf/core/clipboard.nix
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
# clipboard
|
||||
enable = true;
|
||||
registers = "unnamedplus";
|
||||
providers = {
|
||||
wl-copy.enable = true;
|
||||
};
|
||||
}
|
||||
81
home/nvf/core/keymaps.nix
Executable file
81
home/nvf/core/keymaps.nix
Executable file
|
|
@ -0,0 +1,81 @@
|
|||
[
|
||||
# Keymaps
|
||||
{
|
||||
key = "<leader>ff";
|
||||
mode = "n";
|
||||
action = "<Cmd>FzfLua files<CR>";
|
||||
desc = "[F]ind files";
|
||||
}
|
||||
{
|
||||
key = "<leader>fg";
|
||||
mode = "n";
|
||||
action = "<Cmd>FzfLua live_grep_native<CR>";
|
||||
desc = "Live [G]rep";
|
||||
}
|
||||
{
|
||||
key = "<leader><leader>";
|
||||
mode = "n";
|
||||
action = "<Cmd>FzfLua buffers<CR>";
|
||||
desc = "Buffers";
|
||||
}
|
||||
{
|
||||
key = "<leader>fh";
|
||||
mode = "n";
|
||||
action = "<Cmd>FzfLua help_tags<CR>";
|
||||
desc = "[H]elp Tags";
|
||||
}
|
||||
{
|
||||
key = "<leader>fx";
|
||||
mode = "n";
|
||||
action = "<Cmd>FzfLua diagnostics_document<CR>";
|
||||
desc = "Diagnostics Document";
|
||||
}
|
||||
{
|
||||
key = "<leader>fX";
|
||||
mode = "n";
|
||||
action = "<Cmd>FzfLua diagnostics_workspace<CR>";
|
||||
desc = "Diagnostics Workspace";
|
||||
}
|
||||
{
|
||||
key = "<leader>fs";
|
||||
mode = "n";
|
||||
action = "<Cmd>FzfLua lsp_document_symbols<CR>";
|
||||
desc = "Document [S]ymbols";
|
||||
}
|
||||
{
|
||||
key = "<leader>fS";
|
||||
mode = "n";
|
||||
action = "<Cmd>FzfLua lsp_workspace_symbols<CR>";
|
||||
desc = "Workspace [S]ymbols";
|
||||
}
|
||||
{
|
||||
key = "<leader>fk";
|
||||
mode = "n";
|
||||
action = "<Cmd>FzfLua keymaps<CR>";
|
||||
desc = "[K]eymaps";
|
||||
}
|
||||
{
|
||||
key = "<leader>fb";
|
||||
mode = "n";
|
||||
action = "<Cmd>FzfLua builtin<CR>";
|
||||
desc = "[B]uiltin FZF";
|
||||
}
|
||||
{
|
||||
key = "<leader>fr";
|
||||
mode = "n";
|
||||
action = "<Cmd>FzfLua resume<CR>";
|
||||
desc = "[R]esume";
|
||||
}
|
||||
{
|
||||
key = "<leader>fo";
|
||||
mode = "n";
|
||||
action = "<Cmd>FzfLua oldfiles<CR>";
|
||||
desc = "[O]ld Files";
|
||||
}
|
||||
{
|
||||
key = "<leader>-";
|
||||
mode = "n";
|
||||
action = "<Cmd>Oil --float<CR>";
|
||||
desc = "Open Current Directory";
|
||||
}
|
||||
]
|
||||
12
home/nvf/core/options.nix
Executable file
12
home/nvf/core/options.nix
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
# options
|
||||
cursorlineopt = "line";
|
||||
wrap = false;
|
||||
cmdheight = 1;
|
||||
tabstop = 2;
|
||||
shiftwidth = 2;
|
||||
autoindent = true;
|
||||
termguicolors = true;
|
||||
splitbelow = true;
|
||||
splitright = true;
|
||||
}
|
||||
5
home/nvf/core/spellcheck.nix
Executable file
5
home/nvf/core/spellcheck.nix
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
# spellcheck
|
||||
enable = true;
|
||||
languages = [ "en" ];
|
||||
}
|
||||
4
home/nvf/core/undoFile.nix
Executable file
4
home/nvf/core/undoFile.nix
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
# undoFile
|
||||
enable = true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue