feat: nixvim configuration init
This commit is contained in:
3
config/modules/plugins/blink-cmp.nix
Normal file
3
config/modules/plugins/blink-cmp.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
plugins.blink-cmp.enable = true;
|
||||
}
|
||||
46
config/modules/plugins/bufferline.nix
Normal file
46
config/modules/plugins/bufferline.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
plugins.bufferline.enable = true;
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<Tab>";
|
||||
action = "<cmd>BufferLineCycleNext<cr>";
|
||||
options = {
|
||||
desc = "Cycle to next buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<S-Tab>";
|
||||
action = "<cmd>BufferLineCyclePrev<cr>";
|
||||
options = {
|
||||
desc = "Cycle to previous buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<S-l>";
|
||||
action = "<cmd>BufferLineCycleNext<cr>";
|
||||
options = {
|
||||
desc = "Cycle to next buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<S-h>";
|
||||
action = "<cmd>BufferLineCyclePrev<cr>";
|
||||
options = {
|
||||
desc = "Cycle to previous buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bd";
|
||||
action = "<cmd>bdelete<cr>";
|
||||
options = {
|
||||
desc = "Delete buffer";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
3
config/modules/plugins/conform-nvim.nix
Normal file
3
config/modules/plugins/conform-nvim.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
plugins.conform-nvim.enable = true;
|
||||
}
|
||||
30
config/modules/plugins/fzf-lua.nix
Normal file
30
config/modules/plugins/fzf-lua.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
plugins.fzf-lua = {
|
||||
enable = true;
|
||||
# keymaps = {
|
||||
# "<leader>sf" = {
|
||||
# action = "files";
|
||||
# options = {
|
||||
# desc = "Fzf-Lua File Grep";
|
||||
# };
|
||||
# };
|
||||
# "<leader>sg" = {
|
||||
# action = "live_grep_native";
|
||||
# options = {
|
||||
# desc = "Fzf-Lua File Grep";
|
||||
# };
|
||||
# };
|
||||
# "<leader>sv" = {
|
||||
# action = "git_files";
|
||||
# # settings = {
|
||||
# # previewers.cat.cmd = lib.getExe' pkgs.coreutils "cat";
|
||||
# # winopts.height = 0.5;
|
||||
# # };
|
||||
# options = {
|
||||
# desc = "Fzf-Lua VCS Grep (Git)";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
}
|
||||
9
config/modules/plugins/gitsigns.nix
Normal file
9
config/modules/plugins/gitsigns.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
plugins.gitsigns = {
|
||||
enable = true;
|
||||
settings = {
|
||||
current_line_blame = true;
|
||||
current_line_blame_formatter = " <author>, <committer_time:%R> • <summary>";
|
||||
};
|
||||
};
|
||||
}
|
||||
3
config/modules/plugins/lazygit.nix
Normal file
3
config/modules/plugins/lazygit.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
plugins.lazygit.enable = true;
|
||||
}
|
||||
3
config/modules/plugins/lsp/ansiblels.nix
Normal file
3
config/modules/plugins/lsp/ansiblels.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lsp.servers.ansiblels.enable = true;
|
||||
}
|
||||
3
config/modules/plugins/lsp/bashls.nix
Normal file
3
config/modules/plugins/lsp/bashls.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lsp.servers.bashls.enable = true;
|
||||
}
|
||||
75
config/modules/plugins/lsp/default.nix
Normal file
75
config/modules/plugins/lsp/default.nix
Normal file
@@ -0,0 +1,75 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
# Default configurations for lsp servers
|
||||
./lspconfig.nix
|
||||
|
||||
./ansiblels.nix
|
||||
./bashls.nix
|
||||
./docker_compose_language_server.nix
|
||||
./dockerls.nix
|
||||
./gopls.nix
|
||||
./helm_ls.nix
|
||||
./jdtls.nix
|
||||
./jsonls.nix
|
||||
./jsonnet_ls.nix
|
||||
./just.nix
|
||||
./lua_ls.nix
|
||||
./marksman.nix
|
||||
./nixd.nix
|
||||
./ruff.nix
|
||||
./tflint.nix
|
||||
./yamlls.nix
|
||||
];
|
||||
|
||||
# lsp.keymaps = [
|
||||
# {
|
||||
# key = "gd";
|
||||
# lspBufAction = "definition";
|
||||
# }
|
||||
# {
|
||||
# key = "gD";
|
||||
# lspBufAction = "references";
|
||||
# }
|
||||
# {
|
||||
# key = "gt";
|
||||
# lspBufAction = "type_definition";
|
||||
# }
|
||||
# {
|
||||
# key = "gi";
|
||||
# lspBufAction = "implementation";
|
||||
# }
|
||||
# {
|
||||
# key = "K";
|
||||
# lspBufAction = "hover";
|
||||
# }
|
||||
# {
|
||||
# action = lib.nixvim.mkRaw "function() vim.diagnostic.jump({ count=-1, float=true }) end";
|
||||
# key = "<leader>k";
|
||||
# }
|
||||
# {
|
||||
# action = lib.nixvim.mkRaw "function() vim.diagnostic.jump({ count=1, float=true }) end";
|
||||
# key = "<leader>j";
|
||||
# }
|
||||
# {
|
||||
# action = "<CMD>LspStop<Enter>";
|
||||
# key = "<leader>lx";
|
||||
# }
|
||||
# {
|
||||
# action = "<CMD>LspStart<Enter>";
|
||||
# key = "<leader>ls";
|
||||
# }
|
||||
# {
|
||||
# action = "<CMD>LspRestart<Enter>";
|
||||
# key = "<leader>lr";
|
||||
# }
|
||||
# # {
|
||||
# # action = lib.nixvim.mkRaw "require('telescope.builtin').lsp_definitions";
|
||||
# # key = "gd";
|
||||
# # }
|
||||
# {
|
||||
# action = "<CMD>Lspsaga hover_doc<Enter>";
|
||||
# key = "K";
|
||||
# }
|
||||
# ];
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lsp.servers.docker_compose_language_service.enable = true;
|
||||
}
|
||||
3
config/modules/plugins/lsp/dockerls.nix
Normal file
3
config/modules/plugins/lsp/dockerls.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lsp.servers.dockerls.enable = true;
|
||||
}
|
||||
3
config/modules/plugins/lsp/gopls.nix
Normal file
3
config/modules/plugins/lsp/gopls.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lsp.servers.gopls.enable = true;
|
||||
}
|
||||
3
config/modules/plugins/lsp/helm_ls.nix
Normal file
3
config/modules/plugins/lsp/helm_ls.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lsp.servers.helm_ls.enable = true;
|
||||
}
|
||||
3
config/modules/plugins/lsp/jdtls.nix
Normal file
3
config/modules/plugins/lsp/jdtls.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lsp.servers.jdtls.enable = true;
|
||||
}
|
||||
3
config/modules/plugins/lsp/jsonls.nix
Normal file
3
config/modules/plugins/lsp/jsonls.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lsp.servers.jsonls.enable = true;
|
||||
}
|
||||
3
config/modules/plugins/lsp/jsonnet_ls.nix
Normal file
3
config/modules/plugins/lsp/jsonnet_ls.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lsp.servers.jsonnet_ls.enable = true;
|
||||
}
|
||||
3
config/modules/plugins/lsp/just.nix
Normal file
3
config/modules/plugins/lsp/just.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lsp.servers.just.enable = true;
|
||||
}
|
||||
3
config/modules/plugins/lsp/lspconfig.nix
Normal file
3
config/modules/plugins/lsp/lspconfig.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
plugins.lspconfig.enable = true;
|
||||
}
|
||||
3
config/modules/plugins/lsp/lua_ls.nix
Normal file
3
config/modules/plugins/lsp/lua_ls.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lsp.servers.lua_ls.enable = true;
|
||||
}
|
||||
3
config/modules/plugins/lsp/marksman.nix
Normal file
3
config/modules/plugins/lsp/marksman.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lsp.servers.marksman.enable = true;
|
||||
}
|
||||
3
config/modules/plugins/lsp/nixd.nix
Normal file
3
config/modules/plugins/lsp/nixd.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lsp.servers.nixd.enable = true;
|
||||
}
|
||||
3
config/modules/plugins/lsp/ruff.nix
Normal file
3
config/modules/plugins/lsp/ruff.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lsp.servers.ruff.enable = true;
|
||||
}
|
||||
3
config/modules/plugins/lsp/tflint.nix
Normal file
3
config/modules/plugins/lsp/tflint.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lsp.servers.tflint.enable = true;
|
||||
}
|
||||
3
config/modules/plugins/lsp/yamlls.nix
Normal file
3
config/modules/plugins/lsp/yamlls.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
lsp.servers.yamlls.enable = true;
|
||||
}
|
||||
11
config/modules/plugins/mini.nix
Normal file
11
config/modules/plugins/mini.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
plugins.mini = {
|
||||
enable = true;
|
||||
mockDevIcons = true;
|
||||
modules = {
|
||||
icons = { };
|
||||
comment = { };
|
||||
diff = { };
|
||||
};
|
||||
};
|
||||
}
|
||||
32
config/modules/plugins/neotree.nix
Normal file
32
config/modules/plugins/neotree.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
enableDiagnostics = true;
|
||||
enableGitStatus = true;
|
||||
enableModifiedMarkers = true;
|
||||
enableRefreshOnWrite = true;
|
||||
closeIfLastWindow = true;
|
||||
popupBorderStyle = "rounded"; # Type: null or one of “NC”, “double”, “none”, “rounded”, “shadow”, “single”, “solid” or raw lua code
|
||||
buffers = {
|
||||
bindToCwd = false;
|
||||
followCurrentFile = {
|
||||
enabled = true;
|
||||
};
|
||||
};
|
||||
window = {
|
||||
width = 40;
|
||||
height = 15;
|
||||
autoExpandWidth = false;
|
||||
mappings = {
|
||||
"<space>" = "none";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
action = "<cmd>Neotree toggle<CR>";
|
||||
key = "<leader>e";
|
||||
}
|
||||
];
|
||||
}
|
||||
14
config/modules/plugins/oil.nix
Normal file
14
config/modules/plugins/oil.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
plugins.oil.enable = true;
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
action = "<cmd>Oil<CR>";
|
||||
key = "<leader>o";
|
||||
options = {
|
||||
desc = "Open [O]il";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
491
config/modules/plugins/snacks.nix
Normal file
491
config/modules/plugins/snacks.nix
Normal file
@@ -0,0 +1,491 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
plugins.snacks = {
|
||||
enable = true;
|
||||
settings = {
|
||||
bigfile.enabled = true;
|
||||
notifier.enabled = true;
|
||||
quickfile.enabled = true;
|
||||
statuscolumn.enabled = true;
|
||||
words.enabled = true;
|
||||
lazygit.enabled = true;
|
||||
picker.enabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader><space>";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.smart() end";
|
||||
options = {
|
||||
desc = "Smart Find Files";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>,";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.buffers() end";
|
||||
options = {
|
||||
desc = "Buffers";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>/";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.grep() end";
|
||||
options = {
|
||||
desc = "Grep";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>:";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.command_history() end";
|
||||
options = {
|
||||
desc = "Command History";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>n";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.notifications() end";
|
||||
options = {
|
||||
desc = "Notification History";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>e";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.explorer() end";
|
||||
options = {
|
||||
desc = "File Explorer";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>fb";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.buffers() end";
|
||||
options = {
|
||||
desc = "Buffers";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>fc";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.files({ cwd = vim.fn.stdpath(\"config\") }) end";
|
||||
options = {
|
||||
desc = "Find Config File";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>ff";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.files() end";
|
||||
options = {
|
||||
desc = "Find Files";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>fg";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.git_files() end";
|
||||
options = {
|
||||
desc = "Find Git Files";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>fp";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.projects() end";
|
||||
options = {
|
||||
desc = "Projects";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>fr";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.recent() end";
|
||||
options = {
|
||||
desc = "Recent";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>gb";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.git_branches() end";
|
||||
options = {
|
||||
desc = "Git Branches";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>gl";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.git_log() end";
|
||||
options = {
|
||||
desc = "Git Log";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>gL";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.git_log_line() end";
|
||||
options = {
|
||||
desc = "Git Log Line";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>gs";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.git_status() end";
|
||||
options = {
|
||||
desc = "Git Status";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>gS";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.git_stash() end";
|
||||
options = {
|
||||
desc = "Git Stash";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>gd";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.git_diff() end";
|
||||
options = {
|
||||
desc = "Git Diff (Hunks)";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>gf";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.git_log_file() end";
|
||||
options = {
|
||||
desc = "Git Log File";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sb";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.lines() end";
|
||||
options = {
|
||||
desc = "Buffer Lines";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sB";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.grep_buffers() end";
|
||||
options = {
|
||||
desc = "Grep Open Buffers";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sg";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.grep() end";
|
||||
options = {
|
||||
desc = "Grep";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sw";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.grep_word() end";
|
||||
options = {
|
||||
desc = "Visual selection or word";
|
||||
};
|
||||
mode = "n";
|
||||
}
|
||||
{
|
||||
key = "<leader>s\"";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.registers() end";
|
||||
options = {
|
||||
desc = "Registers";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>s/";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.search_history() end";
|
||||
options = {
|
||||
desc = "Search History";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sa";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.autocmds() end";
|
||||
options = {
|
||||
desc = "Autocmds";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sb";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.lines() end";
|
||||
options = {
|
||||
desc = "Buffer Lines";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sc";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.command_history() end";
|
||||
options = {
|
||||
desc = "Command History";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sC";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.commands() end";
|
||||
options = {
|
||||
desc = "Commands";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sd";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.diagnostics() end";
|
||||
options = {
|
||||
desc = "Diagnostics";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sD";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.diagnostics_buffer() end";
|
||||
options = {
|
||||
desc = "Buffer Diagnostics";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sh";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.help() end";
|
||||
options = {
|
||||
desc = "Help Pages";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sH";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.highlights() end";
|
||||
options = {
|
||||
desc = "Highlights";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>si";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.icons() end";
|
||||
options = {
|
||||
desc = "Icons";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sj";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.jumps() end";
|
||||
options = {
|
||||
desc = "Jumps";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sk";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.keymaps() end";
|
||||
options = {
|
||||
desc = "Keymaps";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sl";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.loclist() end";
|
||||
options = {
|
||||
desc = "Location List";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sm";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.marks() end";
|
||||
options = {
|
||||
desc = "Marks";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sM";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.man() end";
|
||||
options = {
|
||||
desc = "Man Pages";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sp";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.lazy() end";
|
||||
options = {
|
||||
desc = "Search for Plugin Spec";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sq";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.qflist() end";
|
||||
options = {
|
||||
desc = "Quickfix List";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sR";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.resume() end";
|
||||
options = {
|
||||
desc = "Resume";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>su";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.undo() end";
|
||||
options = {
|
||||
desc = "Undo History";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>uC";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.colorschemes() end";
|
||||
options = {
|
||||
desc = "Colorschemes";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "gd";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_definitions() end";
|
||||
options = {
|
||||
desc = "Goto Definition";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "gD";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_declarations() end";
|
||||
options = {
|
||||
desc = "Goto Declaration";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "gr";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_references() end";
|
||||
options = {
|
||||
desc = "References";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "gI";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_implementations() end";
|
||||
options = {
|
||||
desc = "Goto Implementation";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "gy";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_type_definitions() end";
|
||||
options = {
|
||||
desc = "Goto T[y]pe Definition";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "gai";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_incoming_calls() end";
|
||||
options = {
|
||||
desc = "C[a]lls Incoming";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "gao";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_outgoing_calls() end";
|
||||
options = {
|
||||
desc = "C[a]lls Outgoing";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>ss";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_symbols() end";
|
||||
options = {
|
||||
desc = "LSP Symbols";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>sS";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.picker.lsp_workspace_symbols() end";
|
||||
options = {
|
||||
desc = "LSP Workspace Symbols";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>z";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.zen() end";
|
||||
options = {
|
||||
desc = "Toggle Zen Mode";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>Z";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.zen.zoom() end";
|
||||
options = {
|
||||
desc = "Toggle Zoom";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>.";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.scratch() end";
|
||||
options = {
|
||||
desc = "Toggle Scratch Buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>S";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.scratch.select() end";
|
||||
options = {
|
||||
desc = "Select Scratch Buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>n";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.notifier.show_history() end";
|
||||
options = {
|
||||
desc = "Notification History";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>bd";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.bufdelete() end";
|
||||
options = {
|
||||
desc = "Delete Buffer";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>cR";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.rename.rename_file() end";
|
||||
options = {
|
||||
desc = "Rename File";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>gB";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.gitbrowse() end";
|
||||
options = {
|
||||
desc = "Git Browse";
|
||||
};
|
||||
mode = "n";
|
||||
}
|
||||
{
|
||||
key = "<leader>gg";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.lazygit() end";
|
||||
options = {
|
||||
desc = "Lazygit";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<leader>un";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.notifier.hide() end";
|
||||
options = {
|
||||
desc = "Dismiss All Notifications";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<c-/>";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.terminal() end";
|
||||
options = {
|
||||
desc = "Toggle Terminal";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<c-_>";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.terminal() end";
|
||||
options = {
|
||||
desc = "which_key_ignore";
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "]]";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.words.jump(vim.v.count1) end";
|
||||
options = {
|
||||
desc = "Next Reference";
|
||||
};
|
||||
mode = "n";
|
||||
}
|
||||
{
|
||||
key = "[[";
|
||||
action = lib.nixvim.mkRaw "function() Snacks.words.jump(-vim.v.count1) end";
|
||||
options = {
|
||||
desc = "Prev Reference";
|
||||
};
|
||||
mode = "n";
|
||||
}
|
||||
];
|
||||
}
|
||||
3
config/modules/plugins/tmux-navigator.nix
Normal file
3
config/modules/plugins/tmux-navigator.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
plugins.tmux-navigator.enable = true;
|
||||
}
|
||||
35
config/modules/plugins/treesitter.nix
Normal file
35
config/modules/plugins/treesitter.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
plugins = {
|
||||
treesitter = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
indent = {
|
||||
enable = true;
|
||||
};
|
||||
highlight = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
nixvimInjections = true;
|
||||
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
||||
};
|
||||
|
||||
treesitter-context = {
|
||||
enable = false;
|
||||
};
|
||||
|
||||
treesitter-textobjects = {
|
||||
enable = true;
|
||||
select = {
|
||||
enable = true;
|
||||
lookahead = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
extraConfigLua = ''
|
||||
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||
'';
|
||||
}
|
||||
14
config/modules/plugins/undotree.nix
Normal file
14
config/modules/plugins/undotree.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
plugins.undotree.enable = true;
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ut";
|
||||
action = "<cmd>UndotreeToggle<CR>";
|
||||
options = {
|
||||
desc = "Undotree";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
5
config/modules/plugins/which-key.nix
Normal file
5
config/modules/plugins/which-key.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
plugins.which-key = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user