Compare commits
5 commits
15067c5995
...
9c8ef71689
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c8ef71689 | ||
|
|
5dc158af55 | ||
|
|
49890805b0 | ||
|
|
4d46c4bcbe | ||
|
|
5fe755637f |
10 changed files with 59 additions and 58 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
./plugins/theme.nix
|
./plugins/theme.nix
|
||||||
./plugins/completion.nix
|
./plugins/completion.nix
|
||||||
./plugins/lsp.nix
|
./plugins/lsp.nix
|
||||||
|
./plugins/treesitter.nix
|
||||||
./plugins/formatter.nix
|
./plugins/formatter.nix
|
||||||
./plugins/statusline.nix
|
./plugins/statusline.nix
|
||||||
./plugins/git.nix
|
./plugins/git.nix
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
nativeBuildInputs = [pkgs.makeWrapper];
|
nativeBuildInputs = [pkgs.makeWrapper];
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
wrapProgram $out/bin/nvim \
|
wrapProgram $out/bin/nvim \
|
||||||
--prefix PATH : ${pkgs.lib.makeBinPath [pkgs.git pkgs.fzf pkgs.lazygit]}
|
--prefix PATH : ${pkgs.lib.makeBinPath [pkgs.git pkgs.lazygit]}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{...}: {
|
{...}: {
|
||||||
vim = {
|
vim.autocomplete.blink-cmp = {
|
||||||
autocomplete.nvim-cmp = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
mappings = {
|
mappings = {
|
||||||
complete = "<C-Space>";
|
complete = "<C-Space>";
|
||||||
|
|
@ -12,18 +11,4 @@
|
||||||
previous = "<C-k>";
|
previous = "<C-k>";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
snippets.luasnip.enable = true;
|
|
||||||
|
|
||||||
luaConfigRC.luasnip-keymaps = ''
|
|
||||||
vim.keymap.set({"i", "s"}, "<C-l>", function()
|
|
||||||
local ls = require("luasnip")
|
|
||||||
if ls.expand_or_jumpable() then ls.expand_or_jump() end
|
|
||||||
end, {silent = true})
|
|
||||||
vim.keymap.set({"i", "s"}, "<C-h>", function()
|
|
||||||
local ls = require("luasnip")
|
|
||||||
if ls.jumpable(-1) then ls.jump(-1) end
|
|
||||||
end, {silent = true})
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
vim = {
|
vim = {
|
||||||
autopairs.nvim-autopairs.enable = true;
|
mini.pairs.enable = true;
|
||||||
comments.comment-nvim.enable = true;
|
comments.comment-nvim.enable = true;
|
||||||
|
|
||||||
extraPlugins = with pkgs.vimPlugins; {
|
extraPlugins = with pkgs.vimPlugins; {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
{...}: {
|
{...}: {
|
||||||
vim.git = {
|
vim.git.gitsigns.enable = true;
|
||||||
gitsigns.enable = true;
|
|
||||||
vim-fugitive.enable = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,10 +51,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
keymaps = [
|
keymaps = [
|
||||||
{key = "<leader>ls"; mode = ["n"]; action = "<cmd>FzfLua lsp_document_symbols<cr>"; desc = "Document Symbols";}
|
{key = "<leader>ls"; mode = ["n"]; lua = true; action = "function() Snacks.picker.lsp_symbols() end"; desc = "Document Symbols";}
|
||||||
{key = "<leader>lS"; mode = ["n"]; action = "<cmd>FzfLua lsp_live_workspace_symbols<cr>"; desc = "Workspace Symbols";}
|
{key = "<leader>lS"; mode = ["n"]; lua = true; action = "function() Snacks.picker.lsp_workspace_symbols() end"; desc = "Workspace Symbols";}
|
||||||
{key = "<leader>la"; mode = ["n"]; lua = true; action = "function() vim.lsp.buf.code_action() end"; desc = "Code Actions";}
|
|
||||||
{key = "K"; mode = ["n"]; lua = true; action = "function() vim.lsp.buf.hover() end"; desc = "Hover Docs";}
|
|
||||||
{key = "<leader>lR"; mode = ["n"]; action = "<cmd>LspRestart<CR>"; desc = "Restart LSP";}
|
{key = "<leader>lR"; mode = ["n"]; action = "<cmd>LspRestart<CR>"; desc = "Restart LSP";}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,16 +5,8 @@
|
||||||
package = harpoon2;
|
package = harpoon2;
|
||||||
setup = ''require("harpoon"):setup()'';
|
setup = ''require("harpoon"):setup()'';
|
||||||
};
|
};
|
||||||
oil-nvim = {
|
|
||||||
package = oil-nvim;
|
|
||||||
setup = ''require("oil").setup({})'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fzf-lua = {
|
|
||||||
enable = true;
|
|
||||||
profile = "telescope";
|
|
||||||
};
|
|
||||||
|
|
||||||
session.nvim-session-manager = {
|
session.nvim-session-manager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -30,16 +22,16 @@
|
||||||
{key = "<leader>3"; mode = ["n"]; lua = true; action = ''function() require("harpoon"):list():select(3) end''; desc = "Harpoon file 3";}
|
{key = "<leader>3"; mode = ["n"]; lua = true; action = ''function() require("harpoon"):list():select(3) end''; desc = "Harpoon file 3";}
|
||||||
{key = "<leader>4"; mode = ["n"]; lua = true; action = ''function() require("harpoon"):list():select(4) end''; desc = "Harpoon file 4";}
|
{key = "<leader>4"; mode = ["n"]; lua = true; action = ''function() require("harpoon"):list():select(4) end''; desc = "Harpoon file 4";}
|
||||||
|
|
||||||
# Oil
|
# Mini.files
|
||||||
{key = "-"; mode = ["n"]; lua = true; action = ''function() require("oil").open() end''; desc = "Open parent directory";}
|
{key = "-"; mode = ["n"]; lua = true; action = ''function() MiniFiles.open() end''; desc = "Open file explorer";}
|
||||||
{key = "<leader>-"; mode = ["n"]; lua = true; action = ''function() require("oil").open_float() end''; desc = "Open parent directory (float)";}
|
{key = "<leader>-"; mode = ["n"]; lua = true; action = ''function() MiniFiles.open(vim.api.nvim_buf_get_name(0)) end''; desc = "Open file explorer (current file)";}
|
||||||
|
|
||||||
# FZF-lua
|
# Snacks picker
|
||||||
{key = "<leader>ff"; mode = ["n"]; action = "<cmd>FzfLua files<cr>"; desc = "Find Files";}
|
{key = "<leader>ff"; mode = ["n"]; lua = true; action = "function() Snacks.picker.files() end"; desc = "Find Files";}
|
||||||
{key = "<leader>fg"; mode = ["n"]; action = "<cmd>FzfLua live_grep<cr>"; desc = "Live Grep";}
|
{key = "<leader>fg"; mode = ["n"]; lua = true; action = "function() Snacks.picker.grep() end"; desc = "Live Grep";}
|
||||||
{key = "<leader>fb"; mode = ["n"]; action = "<cmd>FzfLua buffers<cr>"; desc = "Buffer List";}
|
{key = "<leader>fb"; mode = ["n"]; lua = true; action = "function() Snacks.picker.buffers() end"; desc = "Buffer List";}
|
||||||
{key = "<leader>fh"; mode = ["n"]; action = "<cmd>FzfLua help_tags<cr>"; desc = "Help Tags";}
|
{key = "<leader>fh"; mode = ["n"]; lua = true; action = "function() Snacks.picker.help() end"; desc = "Help Tags";}
|
||||||
{key = "<leader>fo"; mode = ["n"]; action = "<cmd>FzfLua oldfiles<cr>"; desc = "Recent Files";}
|
{key = "<leader>fo"; mode = ["n"]; lua = true; action = "function() Snacks.picker.recent() end"; desc = "Recent Files";}
|
||||||
{key = "<leader>fn"; mode = ["n"]; action = "<cmd>Noice<cr>"; desc = "Notifications";}
|
{key = "<leader>fn"; mode = ["n"]; action = "<cmd>Noice<cr>"; desc = "Notifications";}
|
||||||
|
|
||||||
# Sessions
|
# Sessions
|
||||||
|
|
|
||||||
|
|
@ -5,19 +5,20 @@
|
||||||
input.enable = true;
|
input.enable = true;
|
||||||
lazygit.enable = true;
|
lazygit.enable = true;
|
||||||
rename.enable = true;
|
rename.enable = true;
|
||||||
|
picker.enable = true;
|
||||||
|
scroll.enable = true;
|
||||||
|
|
||||||
dashboard = {
|
dashboard = {
|
||||||
enable = true;
|
enable = true;
|
||||||
sections = [
|
sections = [
|
||||||
{section = "header";}
|
{section = "header";}
|
||||||
{section = "keys"; gap = 1; padding = 1;}
|
{section = "keys"; gap = 1; padding = 1;}
|
||||||
{section = "startup";}
|
|
||||||
];
|
];
|
||||||
preset.keys = [
|
preset.keys = [
|
||||||
{icon = " "; key = "e"; action = ":ene | startinsert"; desc = "New file";}
|
{icon = " "; key = "e"; action = ":ene | startinsert"; desc = "New file";}
|
||||||
{icon = " "; key = ",ff"; action = ":FzfLua files"; desc = "Find file";}
|
{icon = " "; key = ",ff"; action = ":lua Snacks.picker.files()"; desc = "Find file";}
|
||||||
{icon = " "; key = ",fo"; action = ":FzfLua oldfiles"; desc = "Recently opened";}
|
{icon = " "; key = ",fo"; action = ":lua Snacks.picker.recent()"; desc = "Recently opened";}
|
||||||
{icon = " "; key = ",fg"; action = ":FzfLua live_grep"; desc = "Find word";}
|
{icon = " "; key = ",fg"; action = ":lua Snacks.picker.grep()"; desc = "Find word";}
|
||||||
{icon = " "; key = ",fp"; action = ":SessionManager load_session"; desc = "Open session";}
|
{icon = " "; key = ",fp"; action = ":SessionManager load_session"; desc = "Open session";}
|
||||||
{icon = " "; key = "q"; action = ":qa"; desc = "Quit";}
|
{icon = " "; key = "q"; action = ":qa"; desc = "Quit";}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
27
plugins/treesitter.nix
Normal file
27
plugins/treesitter.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{...}: {
|
||||||
|
vim.treesitter.textobjects = {
|
||||||
|
enable = true;
|
||||||
|
setupOpts = {
|
||||||
|
select = {
|
||||||
|
enable = true;
|
||||||
|
lookahead = true;
|
||||||
|
keymaps = {
|
||||||
|
"af" = "@function.outer";
|
||||||
|
"if" = "@function.inner";
|
||||||
|
"ac" = "@class.outer";
|
||||||
|
"ic" = "@class.inner";
|
||||||
|
"aa" = "@parameter.outer";
|
||||||
|
"ia" = "@parameter.inner";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
move = {
|
||||||
|
enable = true;
|
||||||
|
set_jumps = true;
|
||||||
|
goto_next_start."]f" = "@function.outer";
|
||||||
|
goto_previous_start."[f" = "@function.outer";
|
||||||
|
goto_next_end."]F" = "@function.outer";
|
||||||
|
goto_previous_end."[F" = "@function.outer";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
{...}: {
|
{...}: {
|
||||||
vim = {
|
vim = {
|
||||||
visuals.indent-blankline.enable = true;
|
|
||||||
|
|
||||||
mini = {
|
mini = {
|
||||||
icons.enable = true;
|
icons.enable = true;
|
||||||
surround.enable = true;
|
surround.enable = true;
|
||||||
|
indentscope.enable = true;
|
||||||
|
files.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
luaConfigRC.mini-icons-mock = ''
|
luaConfigRC.mini-icons-mock = ''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue