nixvim: add undofile, scrolloff, wrap, yank highlight, j/k optimization

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
2026-03-11 21:07:32 +09:00
co-authored by Claude Sonnet 4.6
parent 29461677b3
commit 4e2a9c4809
4 changed files with 32 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
{...}: {
programs.nixvim.autoCmd = [
{
event = "TextYankPost";
callback.__raw = "function() vim.highlight.on_yank() end";
}
];
}
+1
View File
@@ -6,6 +6,7 @@
imports = [
inputs.nixvim.homeModules.nixvim
./options.nix
./autocmds.nix
./keymaps.nix
./language.nix
./colorscheme.nix
+17
View File
@@ -19,6 +19,23 @@
};
in {
programs.nixvim.keymaps = [
# Search
(mk "<Esc>" "<cmd>nohlsearch<CR>" "検索ハイライトを解除")
# Screen line movement
{
mode = "n";
key = "j";
action.__raw = "vim.v.count == 0 and 'gj' or 'j'";
options = { silent = true; expr = true; desc = "下へ移動(画面行優先)"; };
}
{
mode = "n";
key = "k";
action.__raw = "vim.v.count == 0 and 'gk' or 'k'";
options = { silent = true; expr = true; desc = "上へ移動(画面行優先)"; };
}
# LSP
(mkRaw "K" "vim.lsp.buf.hover" "LSPエラーのホバー表示")
(mk "gd" "<cmd>Glance definitions<CR>" "定義へ移動")
+6
View File
@@ -11,6 +11,12 @@
mouse = "a";
clipboard = "unnamedplus";
updatetime = 200;
timeoutlen = 300;
undofile = true;
# display
wrap = false;
scrolloff = 8;
# search
ignorecase = true;