188 current 2025-01-10 22:32:32 25.05.20241217.d3c42f1 6.6.66 *
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
# ref: https://github.com/vimjoyer/nvim-nix-video/blob/main/home.nix
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.neovim = {
|
||||
programs.neovim = let
|
||||
toLua = str: "lua << EOF\n${str}\nEOF\n";
|
||||
toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n";
|
||||
in {
|
||||
enable = true;
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
@@ -13,6 +18,21 @@
|
||||
${builtins.readFile ./init.lua}
|
||||
'';
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
lua-language-server
|
||||
# rnix-lsp
|
||||
|
||||
xclip
|
||||
wl-clipboard
|
||||
];
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = goyo-vim;
|
||||
config = toLuaFile ./plugins/goyo.lua;
|
||||
}
|
||||
];
|
||||
|
||||
# extraConfig = lib.fileContents ./init.vim;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -122,8 +122,8 @@ vim.api.nvim_set_keymap("n", "<C-t>", ":term<CR>A", { noremap = true, silent = f
|
||||
vim.api.nvim_set_keymap("t", "<Esc>", [[<C-\><C-n>]], { noremap = true })
|
||||
|
||||
-- "Focus" commands that rely on the Goyo plugin
|
||||
vim.api.nvim_set_keymap("n", "<C-a>z", ":Goyo 80<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "<C-a>q", ":Goyo!<CR>", opts)
|
||||
-- vim.api.nvim_set_keymap("n", "<C-a>z", ":Goyo 80<CR>", opts)
|
||||
-- vim.api.nvim_set_keymap("n", "<C-a>q", ":Goyo!<CR>", opts)
|
||||
|
||||
-- Movements in visual mode
|
||||
vim.api.nvim_set_keymap("x", "<C-h>", "b", { noremap = true })
|
||||
|
||||
3
home/programs/nvim/plugins/goyo.lua
Normal file
3
home/programs/nvim/plugins/goyo.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
-- "Focus" commands that rely on the Goyo plugin
|
||||
vim.api.nvim_set_keymap("n", "<C-a>z", ":Goyo 80<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "<C-a>q", ":Goyo!<CR>", opts)
|
||||
Reference in New Issue
Block a user