feat: setup neovim & update firefox to nightly
This commit is contained in:
parent
10bb022f75
commit
f442980938
24 changed files with 581 additions and 1256 deletions
209
flake.lock
generated
209
flake.lock
generated
|
|
@ -54,18 +54,57 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"cachix": {
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"lastModified": 1635350005,
|
||||
"narHash": "sha256-tAMJnUwfaDEB2aa31jGcu7R7bzGELM9noc91L2PbVjg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1c1f5649bb9c1b0d98637c8c365228f57126f361",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-20.09",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"firefox": {
|
||||
"inputs": {
|
||||
"cachix": "cachix",
|
||||
"flake-compat": "flake-compat",
|
||||
"lib-aggregate": "lib-aggregate",
|
||||
"mozilla": "mozilla",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737508273,
|
||||
"narHash": "sha256-MkwmVx0kUCEcHBMFlzIjzAJEI87smC47RV8Ro9OG4eE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-firefox-nightly",
|
||||
"rev": "2335be5f02e8b3a39d116876d3ac4ccc9de308d6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-firefox-nightly",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"locked": {
|
||||
"lastModified": 1717312683,
|
||||
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
@ -86,9 +125,25 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_3": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
"nixpkgs-lib": "nixpkgs-lib_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733312601,
|
||||
|
|
@ -108,6 +163,24 @@
|
|||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705309234,
|
||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||
|
|
@ -122,9 +195,9 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_4"
|
||||
"systems": "systems_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
|
|
@ -140,9 +213,9 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"flake-utils_4": {
|
||||
"inputs": {
|
||||
"systems": "systems_6"
|
||||
"systems": "systems_7"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726560853,
|
||||
|
|
@ -160,7 +233,7 @@
|
|||
},
|
||||
"ghostty": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"zig": "zig"
|
||||
|
|
@ -311,7 +384,7 @@
|
|||
"hyprwayland-scanner": "hyprwayland-scanner",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"pre-commit-hooks": "pre-commit-hooks",
|
||||
"systems": "systems_3",
|
||||
"systems": "systems_4",
|
||||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
|
|
@ -493,6 +566,25 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lib-aggregate": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737288694,
|
||||
"narHash": "sha256-e9MsdkHidgepQpF0InyRSpeD6YujQcaB0uUzeXVvW+I=",
|
||||
"owner": "nix-community",
|
||||
"repo": "lib-aggregate",
|
||||
"rev": "e07594822638004d96f100febbe947189c42e8a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "lib-aggregate",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"mnw": {
|
||||
"locked": {
|
||||
"lastModified": 1735150973,
|
||||
|
|
@ -508,6 +600,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"mozilla": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1736765918,
|
||||
"narHash": "sha256-oh7GSCjBGHpxaU8/gejT55mlvI3qoKObXgqyn1XR7SA=",
|
||||
"owner": "mozilla",
|
||||
"repo": "nixpkgs-mozilla",
|
||||
"rev": "534ee26d3dbcbb9da3766c556638b9bcc3627871",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mozilla",
|
||||
"repo": "nixpkgs-mozilla",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nil": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
|
|
@ -571,6 +679,21 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1737248590,
|
||||
"narHash": "sha256-6SWtDeYJS3bS7QyJrGKyd6FpROEN0JCMgakSX8yPbyA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "977f49fd8cf854416f82987696784717acd6e817",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib_2": {
|
||||
"locked": {
|
||||
"lastModified": 1733096140,
|
||||
"narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=",
|
||||
|
|
@ -681,7 +804,7 @@
|
|||
"nvf": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"mnw": "mnw",
|
||||
"nil": "nil",
|
||||
"nixpkgs": [
|
||||
|
|
@ -810,7 +933,7 @@
|
|||
"plugin-vim-repeat": "plugin-vim-repeat",
|
||||
"plugin-vim-startify": "plugin-vim-startify",
|
||||
"plugin-which-key": "plugin-which-key",
|
||||
"systems": "systems_5"
|
||||
"systems": "systems_6"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736946667,
|
||||
|
|
@ -2800,7 +2923,7 @@
|
|||
},
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-compat": "flake-compat_3",
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
|
|
@ -2824,6 +2947,7 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"Hyprspace": "Hyprspace",
|
||||
"firefox": "firefox",
|
||||
"ghostty": "ghostty",
|
||||
"home-manager": "home-manager",
|
||||
"hyprgrass": "hyprgrass",
|
||||
|
|
@ -2910,21 +3034,6 @@
|
|||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_4": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
|
|
@ -2939,6 +3048,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_4": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_5": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
|
|
@ -2969,6 +3093,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_7": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xdph": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": [
|
||||
|
|
@ -3012,7 +3151,7 @@
|
|||
},
|
||||
"yazi": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"rust-overlay": "rust-overlay_2"
|
||||
},
|
||||
|
|
@ -3035,7 +3174,7 @@
|
|||
"flake-compat": [
|
||||
"ghostty"
|
||||
],
|
||||
"flake-utils": "flake-utils",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"ghostty",
|
||||
"nixpkgs-stable"
|
||||
|
|
|
|||
12
flake.nix
12
flake.nix
|
|
@ -6,7 +6,10 @@
|
|||
url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
pipewire-screenaudio.url = "github:IceDBorn/pipewire-screenaudio";
|
||||
firefox = {
|
||||
url = "github:nix-community/flake-firefox-nightly";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -40,11 +43,6 @@
|
|||
url = "github:KZDKM/Hyprspace";
|
||||
inputs.hyprland.follows = "hyprland";
|
||||
};
|
||||
|
||||
nvf = {
|
||||
url = "github:notashelf/nvf";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
|
@ -69,11 +67,9 @@
|
|||
in
|
||||
{
|
||||
nixpkgs.pkgs = pkgs;
|
||||
|
||||
nixosConfigurations = {
|
||||
dn-pre7780 = nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
nvf.nixosModules.default
|
||||
nix-index-database.nixosModules.nix-index
|
||||
./system/dev/dn-pre7780
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,85 +0,0 @@
|
|||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import any extras modules here
|
||||
{ import = "lazyvim.plugins.extras.coding.luasnip" },
|
||||
{ import = "lazyvim.plugins.extras.coding.mini-surround" },
|
||||
{ import = "lazyvim.plugins.extras.coding.yanky" },
|
||||
{ import = "lazyvim.plugins.extras.dap.core" },
|
||||
{ import = "lazyvim.plugins.extras.dap.nlua" },
|
||||
{ import = "lazyvim.plugins.extras.editor.dial" },
|
||||
-- { import = "lazyvim.plugins.extras.formatting.biome" },
|
||||
{ import = "lazyvim.plugins.extras.formatting.black" },
|
||||
{ import = "lazyvim.plugins.extras.formatting.prettier" },
|
||||
{ import = "lazyvim.plugins.extras.lang.cmake" },
|
||||
{ import = "lazyvim.plugins.extras.lang.docker" },
|
||||
{ import = "lazyvim.plugins.extras.lang.git" },
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
{ import = "lazyvim.plugins.extras.lang.nix" },
|
||||
{ import = "lazyvim.plugins.extras.lang.markdown" },
|
||||
{ import = "lazyvim.plugins.extras.lang.nushell" },
|
||||
{ import = "lazyvim.plugins.extras.lang.omnisharp" },
|
||||
-- { import = "lazyvim.plugins.extras.lang.vue" },
|
||||
-- { import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
-- { import = "lazyvim.plugins.extras.lang.python" },
|
||||
{ import = "lazyvim.plugins.extras.lang.rust" },
|
||||
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
||||
{ import = "lazyvim.plugins.extras.lang.toml" },
|
||||
{ import = "lazyvim.plugins.extras.lang.yaml" },
|
||||
{ import = "lazyvim.plugins.extras.linting.eslint" },
|
||||
{ import = "lazyvim.plugins.extras.ui.alpha" },
|
||||
{ import = "lazyvim.plugins.extras.ui.edgy" },
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-indentscope" },
|
||||
{ import = "lazyvim.plugins.extras.ui.smear-cursor" },
|
||||
{ import = "lazyvim.plugins.extras.ui.treesitter-context" },
|
||||
{ import = "lazyvim.plugins.extras.util.dot" },
|
||||
{ import = "lazyvim.plugins.extras.util.mini-hipatterns" },
|
||||
{ import = "lazyvim.plugins.extras.editor.telescope" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
checker = { enabled = true, notify = false }, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
@ -19,3 +19,6 @@ end
|
|||
if package.config:sub(1, 1) == "\\" then
|
||||
vim.o.shell = GetAvailableWindowsShell()
|
||||
end
|
||||
|
||||
vim.g.lazyvim_python_ruff = "ruff"
|
||||
vim.g.lazyvim_eslint_auto_format = true
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ return {
|
|||
-- setting the keybinding for LazyGit with 'keys' is recommended in
|
||||
-- order to load the plugin when the command is run for the first time
|
||||
keys = {
|
||||
{ "<leader>gg", "<cmd>LazyGit<cr>", desc = "LazyGit" }
|
||||
}
|
||||
}
|
||||
{ "<leader>gg", "<cmd>LazyGit<cr>", desc = "LazyGit" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
local util = require("lspconfig.util")
|
||||
local async = require("lspconfig.async")
|
||||
local mod_cache = nil
|
||||
|
||||
return {
|
||||
{
|
||||
|
|
@ -72,55 +70,51 @@ return {
|
|||
nginx_language_server = {
|
||||
cmd = { "nginx-language-server" },
|
||||
filetypes = { "nginx" },
|
||||
rootPatterns = { "nginx.conf", ".git" },
|
||||
rootPatterns = { "biome.json", "biome.jsonc" },
|
||||
},
|
||||
-- jsonls = {
|
||||
-- cmd = { "vscode-json-languageserver", "--stdio" },
|
||||
-- filetypes = { "json", "jsonc" },
|
||||
-- },
|
||||
vuels = {
|
||||
cmd = { "vue-language-server", "--stdio" },
|
||||
filetypes = { "vue" },
|
||||
volar = {
|
||||
init_options = {
|
||||
vue = {
|
||||
hybridMode = true,
|
||||
},
|
||||
ts_ls = {
|
||||
cmd = { "typescript-language-server", "--stdio" },
|
||||
filetypes = { "vue", "ts", "tsx" },
|
||||
},
|
||||
clangd = {
|
||||
cmd = { "clangd" },
|
||||
root_markers = { ".git", ".clangd", "compile_commands.json" },
|
||||
filetypes = { "cpp", "c" },
|
||||
capabilities = {
|
||||
textDocument = {
|
||||
semanticTokens = {
|
||||
multilineTokenSupport = true,
|
||||
settings = {
|
||||
typescript = {
|
||||
inlayHints = {
|
||||
enumMemberValues = {
|
||||
enabled = true,
|
||||
},
|
||||
functionLikeReturnTypes = {
|
||||
enabled = true,
|
||||
},
|
||||
propertyDeclarationTypes = {
|
||||
enabled = true,
|
||||
},
|
||||
parameterTypes = {
|
||||
enabled = true,
|
||||
suppressWhenArgumentMatchesName = true,
|
||||
},
|
||||
variableTypes = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
gopls = {
|
||||
cmd = { "gopls" },
|
||||
filetypes = { "go", "gomod", "gowork", "gotmpl" },
|
||||
root_dir = function(fname)
|
||||
-- see: https://github.com/neovim/nvim-lspconfig/issues/804
|
||||
if not mod_cache then
|
||||
local result = async.run_command({ "go", "env", "GOMODCACHE" })
|
||||
|
||||
if result and result[1] then
|
||||
mod_cache = vim.trim(result[1])
|
||||
else
|
||||
mod_cache = vim.fn.system("go env GOMODCACHE")
|
||||
end
|
||||
end
|
||||
if mod_cache and fname:sub(1, #mod_cache) == mod_cache then
|
||||
local clients = util.get_lsp_clients({ name = "gopls" })
|
||||
if #clients > 0 then
|
||||
return clients[#clients].config.root_dir
|
||||
end
|
||||
end
|
||||
return util.root_pattern("go.work", "go.mod", ".git")(fname)
|
||||
},
|
||||
vtsls = {},
|
||||
stylelint_lsp = {
|
||||
filetypes = { "css", "scss", "vue" },
|
||||
root_dir = util.root_pattern("packages.json", ".git"),
|
||||
debounce = 100,
|
||||
settings = {
|
||||
stylelintplus = {
|
||||
autoFixOnFormat = true,
|
||||
autoFixOnSave = true,
|
||||
},
|
||||
},
|
||||
on_attach = function(client)
|
||||
client.server_capabilities.document_formatting = false
|
||||
end,
|
||||
single_file_support = true,
|
||||
},
|
||||
},
|
||||
setup = {},
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
build = "cd app && yarn install",
|
||||
init = function()
|
||||
vim.g.mkdp_filetypes = { "markdown" }
|
||||
end,
|
||||
ft = { "markdown" },
|
||||
},
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
-- Mason is not usable on NixOS
|
||||
return {
|
||||
{ "williamboman/mason-lspconfig.nvim", enabled = false },
|
||||
{ "williamboman/mason.nvim", enabled = false },
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
./virtualization.nix
|
||||
./hyprland.nix
|
||||
./swaync.nix
|
||||
./neovim.nix
|
||||
./nvim.nix
|
||||
./bin.nix
|
||||
./desktops.nix
|
||||
./direnv.nix
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
browser = "firefox";
|
||||
browser = "firefox-nightly";
|
||||
noOffloadBrowser = "${browser} -P noOffload -no-remote";
|
||||
iconPrefix = ".local/share/icons/hicolor/scalable/apps";
|
||||
newWindow = "${browser} --new-window";
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
{ mainMod, nvidia-offload-enabled }:
|
||||
let
|
||||
firefox = "firefox-nightly";
|
||||
prefix = if nvidia-offload-enabled then "offload" else "";
|
||||
browser = "${prefix}firefox";
|
||||
noOffloadBrowser = "firefox -P noOffload";
|
||||
browser = "${prefix} ${firefox}";
|
||||
noOffloadBrowser = "${firefox} -P noOffload";
|
||||
terminal = "${prefix} ghostty";
|
||||
filemanager = "nemo";
|
||||
scripts = "~/.config/scripts";
|
||||
|
|
|
|||
|
|
@ -1,87 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
treesitterWithGrammars = (
|
||||
pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [
|
||||
p.bash
|
||||
p.comment
|
||||
p.css
|
||||
p.dockerfile
|
||||
p.fish
|
||||
p.gitattributes
|
||||
p.gitignore
|
||||
p.go
|
||||
p.gomod
|
||||
p.gowork
|
||||
p.hcl
|
||||
p.javascript
|
||||
p.jq
|
||||
p.json5
|
||||
p.json
|
||||
p.lua
|
||||
p.make
|
||||
p.markdown
|
||||
p.nix
|
||||
p.python
|
||||
p.rust
|
||||
p.toml
|
||||
p.typescript
|
||||
p.vue
|
||||
p.yaml
|
||||
])
|
||||
);
|
||||
|
||||
treesitter-parsers = pkgs.symlinkJoin {
|
||||
name = "treesitter-parsers";
|
||||
paths = treesitterWithGrammars.dependencies;
|
||||
};
|
||||
configDir = ../config;
|
||||
in
|
||||
{
|
||||
# Other Lsp servers & formatter are defined in system/module/lsp.nix
|
||||
home.packages = with pkgs; [
|
||||
gh
|
||||
vue-language-server
|
||||
dockerfile-language-server-nodejs
|
||||
javascript-typescript-langserver
|
||||
ruff
|
||||
ruff-lsp
|
||||
hadolint
|
||||
nodePackages_latest.typescript
|
||||
];
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
vimAlias = true;
|
||||
coc.enable = false;
|
||||
withNodeJs = true;
|
||||
|
||||
plugins =
|
||||
[
|
||||
treesitterWithGrammars
|
||||
]
|
||||
++ (with pkgs.vimPlugins; [
|
||||
markdown-preview-nvim
|
||||
]);
|
||||
extraPackages = [ pkgs.imagemagick ];
|
||||
extraLuaPackages = ps: with ps; [ magick ];
|
||||
};
|
||||
|
||||
home.file."./.config/nvim" = {
|
||||
source = "${configDir}/nvim";
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
home.file."./.config/nvim/init.lua".text = ''
|
||||
require("config.lazy")
|
||||
vim.opt.runtimepath:append("${treesitter-parsers}")
|
||||
'';
|
||||
|
||||
# Treesitter is configured as a locally developed module in lazy.nvim
|
||||
# we hardcode a symlink here so that we can refer to it in our lazy config
|
||||
home.file."./.local/share/nvim/nix/extras/" = {
|
||||
recursive = true;
|
||||
source = treesitterWithGrammars;
|
||||
};
|
||||
|
||||
}
|
||||
327
home/user/nvim.nix
Normal file
327
home/user/nvim.nix
Normal file
|
|
@ -0,0 +1,327 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
gh
|
||||
];
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
withPython3 = true;
|
||||
extraPython3Packages = (
|
||||
plugins: with plugins; [
|
||||
debugpy
|
||||
]
|
||||
);
|
||||
|
||||
withNodeJs = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
lua-language-server
|
||||
stylua
|
||||
ripgrep
|
||||
vue-language-server
|
||||
dockerfile-language-server-nodejs
|
||||
ruff
|
||||
ruff-lsp
|
||||
hadolint
|
||||
cmake-language-server
|
||||
cmake-lint
|
||||
cmake-format
|
||||
markdownlint-cli2
|
||||
marksman
|
||||
csharpier
|
||||
netcoredbg
|
||||
black
|
||||
prettierd
|
||||
biome
|
||||
eslint
|
||||
typescript-language-server
|
||||
typescript
|
||||
vtsls
|
||||
stylelint-lsp
|
||||
stylelint
|
||||
clang-tools
|
||||
];
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
lazy-nvim
|
||||
];
|
||||
|
||||
extraLuaConfig =
|
||||
let
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
# LazyVim
|
||||
LazyVim
|
||||
bufferline-nvim
|
||||
cmp-buffer
|
||||
cmp-nvim-lsp
|
||||
cmp-path
|
||||
cmp-git
|
||||
blink-cmp
|
||||
crates-nvim
|
||||
conform-nvim
|
||||
dashboard-nvim
|
||||
dressing-nvim
|
||||
flash-nvim
|
||||
friendly-snippets
|
||||
gitsigns-nvim
|
||||
grug-far-nvim
|
||||
indent-blankline-nvim
|
||||
lazydev-nvim
|
||||
lualine-nvim
|
||||
luvit-meta
|
||||
neo-tree-nvim
|
||||
neotest
|
||||
noice-nvim
|
||||
nui-nvim
|
||||
nvim-cmp
|
||||
nvim-lint
|
||||
nvim-lspconfig
|
||||
nvim-snippets
|
||||
nvim-treesitter
|
||||
nvim-treesitter-context
|
||||
nvim-treesitter-textobjects
|
||||
nvim-ts-autotag
|
||||
nvim-ts-context-commentstring
|
||||
nvim-web-devicons
|
||||
persistence-nvim
|
||||
plenary-nvim
|
||||
snacks-nvim
|
||||
telescope-fzf-native-nvim
|
||||
telescope-nvim
|
||||
todo-comments-nvim
|
||||
tokyonight-nvim
|
||||
trouble-nvim
|
||||
ts-comments-nvim
|
||||
which-key-nvim
|
||||
vim-markdown-toc
|
||||
nvim-dap
|
||||
nvim-dap-ui
|
||||
nvim-dap-virtual-text
|
||||
nvim-nio
|
||||
one-small-step-for-vimkind
|
||||
none-ls-nvim
|
||||
markdown-preview-nvim
|
||||
render-markdown-nvim
|
||||
image-nvim
|
||||
|
||||
# Python
|
||||
neotest-python
|
||||
nvim-dap-python
|
||||
|
||||
# C#
|
||||
omnisharp-extended-lsp-nvim
|
||||
neotest-dotnet
|
||||
|
||||
# Cmake
|
||||
cmake-tools-nvim
|
||||
SchemaStore-nvim
|
||||
|
||||
{
|
||||
name = "LuaSnip";
|
||||
path = luasnip;
|
||||
}
|
||||
|
||||
{
|
||||
name = "catppuccin";
|
||||
path = catppuccin-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.ai";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.bufremove";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.comment";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.indentscope";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.pairs";
|
||||
path = mini-nvim;
|
||||
}
|
||||
{
|
||||
name = "mini.surround";
|
||||
path = mini-nvim;
|
||||
}
|
||||
];
|
||||
mkEntryFromDrv =
|
||||
drv:
|
||||
if lib.isDerivation drv then
|
||||
{
|
||||
name = "${lib.getName drv}";
|
||||
path = drv;
|
||||
}
|
||||
else
|
||||
drv;
|
||||
|
||||
lazyPath = pkgs.linkFarm "lazy-plugins" (builtins.map mkEntryFromDrv plugins);
|
||||
in
|
||||
''
|
||||
require("lazy").setup({
|
||||
defaults = {
|
||||
lazy = true,
|
||||
},
|
||||
dev = {
|
||||
-- reuse files from pkgs.vimPlugins.*
|
||||
path = "${lazyPath}",
|
||||
patterns = { "" },
|
||||
-- fallback to download
|
||||
fallback = true,
|
||||
},
|
||||
spec = {
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- The following configs are needed for fixing lazyvim on nix
|
||||
-- force enable telescope-fzf-native.nvim
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", enabled = true },
|
||||
|
||||
{ import = "lazyvim.plugins.extras.coding.blink" },
|
||||
{ import = "lazyvim.plugins.extras.coding.luasnip" },
|
||||
{ import = "lazyvim.plugins.extras.coding.mini-surround" },
|
||||
{ import = "lazyvim.plugins.extras.coding.yanky" },
|
||||
{ import = "lazyvim.plugins.extras.dap.core" },
|
||||
{ import = "lazyvim.plugins.extras.dap.nlua" },
|
||||
{ import = "lazyvim.plugins.extras.editor.dial" },
|
||||
-- { import = "lazyvim.plugins.extras.formatting.biome" },
|
||||
{ import = "lazyvim.plugins.extras.formatting.black" },
|
||||
{ import = "lazyvim.plugins.extras.formatting.prettier" },
|
||||
{ import = "lazyvim.plugins.extras.lang.cmake" },
|
||||
{ import = "lazyvim.plugins.extras.lang.docker" },
|
||||
{ import = "lazyvim.plugins.extras.lang.git" },
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
{ import = "lazyvim.plugins.extras.lang.nix" },
|
||||
{ import = "lazyvim.plugins.extras.lang.go" },
|
||||
{ import = "lazyvim.plugins.extras.lang.zig" },
|
||||
{ import = "lazyvim.plugins.extras.lang.markdown" },
|
||||
{ import = "lazyvim.plugins.extras.lang.nushell" },
|
||||
{ import = "lazyvim.plugins.extras.lang.omnisharp" },
|
||||
{ import = "lazyvim.plugins.extras.lang.clangd" },
|
||||
-- { import = "lazyvim.plugins.extras.lang.vue" },
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
{ import = "lazyvim.plugins.extras.lang.python" },
|
||||
{ import = "lazyvim.plugins.extras.lang.rust" },
|
||||
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
||||
{ import = "lazyvim.plugins.extras.lang.toml" },
|
||||
{ import = "lazyvim.plugins.extras.lang.yaml" },
|
||||
{ import = "lazyvim.plugins.extras.linting.eslint" },
|
||||
{ import = "lazyvim.plugins.extras.ui.alpha" },
|
||||
{ import = "lazyvim.plugins.extras.ui.edgy" },
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-indentscope" },
|
||||
{ import = "lazyvim.plugins.extras.ui.smear-cursor" },
|
||||
{ import = "lazyvim.plugins.extras.ui.treesitter-context" },
|
||||
{ import = "lazyvim.plugins.extras.util.dot" },
|
||||
{ import = "lazyvim.plugins.extras.util.mini-hipatterns" },
|
||||
{ import = "lazyvim.plugins.extras.editor.telescope" },
|
||||
|
||||
-- uncomment to import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
|
||||
-- Vue & Typescript
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.servers.vtsls.filetypes, "vue")
|
||||
LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", {
|
||||
{
|
||||
name = "@vue/typescript-plugin",
|
||||
location = "${pkgs.vue-language-server}/lib/node_modules/@vue/language-server",
|
||||
languages = { "vue" },
|
||||
configNamespace = "typescript",
|
||||
enableForWorkspaceTypeScriptVersions = true,
|
||||
},
|
||||
})
|
||||
end
|
||||
},
|
||||
|
||||
-- disable DAP
|
||||
{ "mfussenegger/nvim-dap-python", enabled = false },
|
||||
{ "mfussenegger/nvim-dap", enabled = false },
|
||||
|
||||
-- disable mason.nvim, use config.extraPackages
|
||||
{ "williamboman/mason-lspconfig.nvim", enabled = false },
|
||||
{ "williamboman/mason.nvim", enabled = false },
|
||||
{ "jay-babu/mason-nvim-dap.nvim", enabled = false },
|
||||
|
||||
-- put this line at the end of spec to clear ensure_installed
|
||||
{ "nvim-treesitter/nvim-treesitter", opts = function(_, opts) opts.ensure_installed = {} end },
|
||||
},
|
||||
})
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.configFile."nvim/parser".source =
|
||||
let
|
||||
parsers = pkgs.symlinkJoin {
|
||||
name = "treesitter-parsers";
|
||||
paths =
|
||||
(pkgs.vimPlugins.nvim-treesitter.withPlugins (
|
||||
plugins: with plugins; [
|
||||
c
|
||||
cpp
|
||||
c_sharp
|
||||
lua
|
||||
bash
|
||||
comment
|
||||
css
|
||||
scss
|
||||
nu
|
||||
ninja
|
||||
rst
|
||||
|
||||
# rust
|
||||
rust
|
||||
ron
|
||||
|
||||
# docker
|
||||
dockerfile
|
||||
|
||||
fish
|
||||
|
||||
# cmake
|
||||
cmake
|
||||
|
||||
# git
|
||||
gitattributes
|
||||
gitignore
|
||||
git_config
|
||||
gitcommit
|
||||
git_rebase
|
||||
|
||||
go
|
||||
gomod
|
||||
gowork
|
||||
gosum
|
||||
|
||||
hcl
|
||||
javascript
|
||||
jq
|
||||
json5
|
||||
lua
|
||||
make
|
||||
markdown
|
||||
nix
|
||||
python
|
||||
toml
|
||||
typescript
|
||||
vue
|
||||
yaml
|
||||
zig
|
||||
]
|
||||
)).dependencies;
|
||||
};
|
||||
in
|
||||
"${parsers}/parser";
|
||||
|
||||
xdg.configFile."nvim/lua".source = ../config/nvim/lua;
|
||||
}
|
||||
|
|
@ -46,7 +46,6 @@ in
|
|||
pkgsCross.mingwW64.stdenv.cc
|
||||
pkgsCross.mingwW64.windows.pthreads
|
||||
postman
|
||||
cz-cli
|
||||
|
||||
# Work stuff
|
||||
libreoffice-qt
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, inputs, ... }:
|
||||
let
|
||||
userChrome = builtins.readFile ../config/firefox/autohide_toolbox.css;
|
||||
profileSettings = {
|
||||
|
|
@ -35,7 +35,8 @@ in
|
|||
|
||||
firefox = {
|
||||
enable = true;
|
||||
package = (pkgs.wrapFirefox (pkgs.firefox-unwrapped.override { pipewireSupport = true; }) { });
|
||||
# package = (pkgs.wrapFirefox (pkgs.firefox-unwrapped.override { pipewireSupport = true; }) { });
|
||||
package = inputs.firefox.packages.${pkgs.system}.firefox-nightly-bin;
|
||||
languagePacks = [
|
||||
"en-US"
|
||||
"zh-TW"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
nixd
|
||||
marksman
|
||||
nginx-language-server
|
||||
nodePackages_latest.vscode-json-languageserver
|
||||
bash-language-server
|
||||
tailwindcss-language-server
|
||||
vscode-langservers-extracted
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
let
|
||||
general = import ./general.nix;
|
||||
telescope = import ./telescope.nix;
|
||||
neoTree = import ./neo-tree.nix;
|
||||
in
|
||||
general ++ telescope ++ neoTree
|
||||
|
|
@ -1,508 +0,0 @@
|
|||
let
|
||||
directions = ["h" "j" "k" "l"];
|
||||
generateMappings = direction: {
|
||||
key = "<C-${direction}>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<C-w>${direction}";
|
||||
};
|
||||
naviMappings = map generateMappings directions;
|
||||
resizeStep = "2";
|
||||
resizeMappings = [
|
||||
{
|
||||
key = "<C-Left>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>vertical resize -${resizeStep}<CR>";
|
||||
}
|
||||
{
|
||||
key = "<C-Right>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>vertical resize +${resizeStep}<CR>";
|
||||
}
|
||||
{
|
||||
key = "<C-Up>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>resize +${resizeStep}<CR>";
|
||||
}
|
||||
{
|
||||
key = "<C-Down>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>resize -${resizeStep}<CR>";
|
||||
}
|
||||
];
|
||||
moveLineMappings = [
|
||||
{
|
||||
key = "<A-j>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>m .+1<CR>==";
|
||||
}
|
||||
{
|
||||
key = "<A-k>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>m .-2<CR>==";
|
||||
}
|
||||
];
|
||||
saveMappings = [
|
||||
# Save File
|
||||
{
|
||||
key = "<C-s>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>w<CR><ESC>";
|
||||
noremap = true;
|
||||
}
|
||||
{
|
||||
key = "<C-s>";
|
||||
mode = ["i"];
|
||||
silent = true;
|
||||
action = "<cmd>w<CR><ESC>";
|
||||
noremap = true;
|
||||
}
|
||||
{
|
||||
key = "<C-s>";
|
||||
mode = ["x"];
|
||||
silent = true;
|
||||
action = "<cmd>w<CR><ESC>";
|
||||
noremap = true;
|
||||
}
|
||||
{
|
||||
key = "<C-s>";
|
||||
mode = ["s"];
|
||||
silent = true;
|
||||
action = "<cmd>w<CR><ESC>";
|
||||
noremap = true;
|
||||
}
|
||||
];
|
||||
generalMappings = [
|
||||
{
|
||||
key = "<S-h>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>bprevious<CR>";
|
||||
} # Prev Buffer
|
||||
{
|
||||
key = "<S-l>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>bnext<CR>";
|
||||
} # Next Buffer
|
||||
{
|
||||
key = "[b";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>bprevious<CR>";
|
||||
} # Prev Buffer
|
||||
{
|
||||
key = "]b";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>bnext<CR>";
|
||||
} # Next Buffer
|
||||
{
|
||||
key = "<leader>bb";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>buffer #<CR>";
|
||||
} # Switch to Other Buffer
|
||||
{
|
||||
key = "<leader>`";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>buffer #<CR>";
|
||||
} # Switch to Other Buffer
|
||||
{
|
||||
key = "<leader>bd";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>bd<CR>";
|
||||
} # Delete Buffer
|
||||
{
|
||||
key = "<leader>bo";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>bufdo bd<CR>";
|
||||
} # Delete Other Buffers
|
||||
{
|
||||
key = "<leader>bD";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>bd | :q<CR>";
|
||||
} # Delete Buffer and Window
|
||||
{
|
||||
key = "<esc>";
|
||||
mode = ["i" "n" "s"];
|
||||
silent = true;
|
||||
action = "<cmd>noh<CR>";
|
||||
} # Escape and Clear hlsearch
|
||||
{
|
||||
key = "<leader>ur";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<Cmd>nohlsearch<Bar>diffupdate<Bar>normal! <C-L><CR>";
|
||||
desc = "Redraw / Clear hlsearch / Diff Update";
|
||||
} # Redraw / Clear hlsearch / Diff Update
|
||||
{
|
||||
key = "n";
|
||||
mode = ["n" "x" "o"];
|
||||
silent = true;
|
||||
action = "n";
|
||||
} # Next Search Result
|
||||
{
|
||||
key = "N";
|
||||
mode = ["n" "x" "o"];
|
||||
silent = true;
|
||||
action = "N";
|
||||
} # Prev Search Result
|
||||
{
|
||||
key = "<C-s>";
|
||||
mode = ["i" "x" "n" "s"];
|
||||
silent = true;
|
||||
action = "<cmd>w<CR>";
|
||||
} # Save File
|
||||
{
|
||||
key = "<leader>K";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>norm! K<cr>";
|
||||
} # Keywordprg
|
||||
{
|
||||
key = "gco";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "o<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>";
|
||||
} # Add Comment Below
|
||||
{
|
||||
key = "gcO";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "O<esc>Vcx<esc><cmd>normal gcc<cr>fxa<bs>";
|
||||
} # Add Comment Above
|
||||
{
|
||||
key = "<leader>fn";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>enew<CR>";
|
||||
} # New File
|
||||
{
|
||||
key = "<leader>xl";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>lopen<CR>";
|
||||
} # Location List
|
||||
{
|
||||
key = "<leader>xq";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>copen<CR>";
|
||||
} # Quickfix List
|
||||
{
|
||||
key = "[q";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
lua = true;
|
||||
action = "vim.cmd.cprev";
|
||||
} # Previous Quickfix
|
||||
{
|
||||
key = "]q";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
lua = true;
|
||||
action = "vim.cmd.cnext";
|
||||
} # Next Quickfix
|
||||
{
|
||||
key = "<leader>cf";
|
||||
mode = ["n" "v"];
|
||||
silent = true;
|
||||
action = "<cmd>normal! gq<CR>";
|
||||
} # Format
|
||||
{
|
||||
key = "<leader>cd";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>LspDiagnostics<CR>";
|
||||
} # Line Diagnostics
|
||||
{
|
||||
key = "]d";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>lnext<CR>";
|
||||
} # Next Diagnostic
|
||||
{
|
||||
key = "[d";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>lprevious<CR>";
|
||||
} # Prev Diagnostic
|
||||
{
|
||||
key = "]e";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>lnext<CR>";
|
||||
} # Next Error
|
||||
{
|
||||
key = "[e";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>lprevious<CR>";
|
||||
} # Prev Error
|
||||
{
|
||||
key = "]w";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>lnext<CR>";
|
||||
} # Next Warning
|
||||
{
|
||||
key = "[w";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>lprevious<CR>";
|
||||
} # Prev Warning
|
||||
{
|
||||
key = "<leader>uf";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ToggleAutoFormat<CR>";
|
||||
} # Toggle Auto Format (Global)
|
||||
{
|
||||
key = "<leader>uF";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ToggleAutoFormatBuffer<CR>";
|
||||
} # Toggle Auto Format (Buffer)
|
||||
{
|
||||
key = "<leader>us";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>setlocal spell!<CR>";
|
||||
} # Toggle Spelling
|
||||
{
|
||||
key = "<leader>uw";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>set wrap!<CR>";
|
||||
} # Toggle Wrap
|
||||
{
|
||||
key = "<leader>uL";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>set relativenumber!<CR>";
|
||||
} # Toggle Relative Number
|
||||
{
|
||||
key = "<leader>ud";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>LspDiagnosticsToggle<CR>";
|
||||
} # Toggle Diagnostics
|
||||
{
|
||||
key = "<leader>ul";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>set number!<CR>";
|
||||
} # Toggle Line Numbers
|
||||
{
|
||||
key = "<leader>uc";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>set conceallevel=3<CR>";
|
||||
} # Toggle Conceal Level
|
||||
{
|
||||
key = "<leader>uA";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>set showtabline=2<CR>";
|
||||
} # Toggle Tabline
|
||||
{
|
||||
key = "<leader>uT";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>TSToggleHighlight<CR>";
|
||||
} # Toggle Treesitter Highlight
|
||||
{
|
||||
key = "<leader>ub";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>set background=dark<CR>";
|
||||
} # Toggle Dark Background
|
||||
{
|
||||
key = "<leader>uD";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ToggleDimming<CR>";
|
||||
} # Toggle Dimming
|
||||
{
|
||||
key = "<leader>ua";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ToggleAnimations<CR>";
|
||||
} # Toggle Animations
|
||||
{
|
||||
key = "<leader>ug";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>IndentGuidesToggle<CR>";
|
||||
} # Toggle Indent Guides
|
||||
{
|
||||
key = "<leader>uS";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>SmoothScrollToggle<CR>";
|
||||
} # Toggle Smooth Scroll
|
||||
{
|
||||
key = "<leader>dpp";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ToggleProfiler<CR>";
|
||||
} # Toggle Profiler
|
||||
{
|
||||
key = "<leader>dph";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ToggleProfilerHighlights<CR>";
|
||||
} # Toggle Profiler Highlights
|
||||
{
|
||||
key = "<leader>uh";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ToggleInlayHints<CR>";
|
||||
} # Toggle Inlay Hints
|
||||
{
|
||||
key = "<leader>gb";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>GitBlame<CR>";
|
||||
} # Git Blame Line
|
||||
{
|
||||
key = "<leader>gB";
|
||||
mode = ["n" "x"];
|
||||
silent = true;
|
||||
action = "<cmd>GitBrowseOpen<CR>";
|
||||
} # Git Browse (open)
|
||||
{
|
||||
key = "<leader>gY";
|
||||
mode = ["n" "x"];
|
||||
silent = true;
|
||||
action = "<cmd>GitBrowseCopy<CR>";
|
||||
} # Git Browse (copy)
|
||||
{
|
||||
key = "<leader>qq";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>qa!<CR>";
|
||||
} # Quit All
|
||||
{
|
||||
key = "<leader>ui";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>InspectPos<CR>";
|
||||
} # Inspect Pos
|
||||
{
|
||||
key = "<leader>uI";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>InspectTree<CR>";
|
||||
} # Inspect Tree
|
||||
{
|
||||
key = "<leader>L";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>LazyVimChangelog<CR>";
|
||||
} # LazyVim Changelog
|
||||
{
|
||||
key = "<c-_>";
|
||||
mode = ["n" "t"];
|
||||
silent = true;
|
||||
action = "<nop>";
|
||||
} # which_key_ignore
|
||||
{
|
||||
key = "<leader>w";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>windows<CR>";
|
||||
} # Windows
|
||||
{
|
||||
key = "<leader>-";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>split<CR>";
|
||||
} # Split Window Below
|
||||
{
|
||||
key = "<leader>|";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>vsplit<CR>";
|
||||
} # Split Window Right
|
||||
{
|
||||
key = "<leader>wd";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>close<CR>";
|
||||
} # Delete Window
|
||||
{
|
||||
key = "<leader>wm";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ZoomModeToggle<CR>";
|
||||
} # Toggle Zoom Mode
|
||||
{
|
||||
key = "<leader>uZ";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ZoomModeToggle<CR>";
|
||||
} # Toggle Zoom Mode
|
||||
{
|
||||
key = "<leader>uz";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>ZenModeToggle<CR>";
|
||||
} # Toggle Zen Mode
|
||||
{
|
||||
key = "<leader><tab>l";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>tabprevious<CR>";
|
||||
} # Last Tab
|
||||
{
|
||||
key = "<leader><tab>o";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>tabnew<CR>";
|
||||
} # Close Other Tabs
|
||||
{
|
||||
key = "<leader><tab>f";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>tabfirst<CR>";
|
||||
} # First Tab
|
||||
{
|
||||
key = "<leader><tab><tab>";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>tabnew<CR>";
|
||||
} # New Tab
|
||||
{
|
||||
key = "<leader><tab>]";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>tabnext<CR>";
|
||||
} # Next Tab
|
||||
{
|
||||
key = "<leader><tab>d";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>tabclose<CR>";
|
||||
} # Close Tab
|
||||
{
|
||||
key = "<leader><tab>[";
|
||||
mode = ["n"];
|
||||
silent = true;
|
||||
action = "<cmd>tabprevious<CR>";
|
||||
} # Previous Tab
|
||||
];
|
||||
in
|
||||
naviMappings ++ resizeMappings ++ moveLineMappings ++ saveMappings ++ generalMappings
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
[
|
||||
{
|
||||
key = "<leader>e";
|
||||
mode = ["n" "t"];
|
||||
silent = true;
|
||||
action = "<CMD>Neotree toggle<CR>";
|
||||
desc = "Toggle NeoTree";
|
||||
}
|
||||
]
|
||||
|
|
@ -1,121 +0,0 @@
|
|||
[
|
||||
{
|
||||
key = "<leader>z";
|
||||
mode = ["n"];
|
||||
desc = "Toggle Zen Mode";
|
||||
action = "function() Snacks.zen() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>Z";
|
||||
mode = ["n"];
|
||||
desc = "Toggle Zoom";
|
||||
action = "function() Snacks.zen.zoom() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>.";
|
||||
mode = ["n"];
|
||||
desc = "Toggle Scratch Buffer";
|
||||
action = "function() Snacks.scratch() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>S";
|
||||
mode = ["n"];
|
||||
desc = "Select Scratch Buffer";
|
||||
action = "function() Snacks.scratch.select() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>n";
|
||||
mode = ["n"];
|
||||
desc = "Notification History";
|
||||
action = "function() Snacks.notifier.show_history() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>bd";
|
||||
mode = ["n"];
|
||||
desc = "Delete Buffer";
|
||||
action = "function() Snacks.bufdelete() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>cR";
|
||||
mode = ["n"];
|
||||
desc = "Rename File";
|
||||
action = "function() Snacks.rename.rename_file() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>gB";
|
||||
mode = ["n" "v"];
|
||||
desc = "Git Browse";
|
||||
action = "function() Snacks.gitbrowse() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>gb";
|
||||
mode = ["n"];
|
||||
desc = "Git Blame Line";
|
||||
action = "function() Snacks.git.blame_line() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>gf";
|
||||
mode = ["n"];
|
||||
desc = "Lazygit Current File History";
|
||||
action = "function() Snacks.lazygit.log_file() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>gg";
|
||||
mode = ["n"];
|
||||
desc = "Lazygit";
|
||||
action = "function() Snacks.lazygit() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>gl";
|
||||
mode = ["n"];
|
||||
desc = "Lazygit Log (cwd)";
|
||||
action = "function() Snacks.lazygit.log() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<leader>un";
|
||||
mode = ["n"];
|
||||
desc = "Dismiss All Notifications";
|
||||
action = "function() Snacks.notifier.hide() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<c-/>";
|
||||
mode = ["n"];
|
||||
desc = "Toggle Terminal";
|
||||
action = "function() Snacks.terminal() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "<c-_>";
|
||||
mode = ["n"];
|
||||
desc = "which_key_ignore";
|
||||
action = "function() Snacks.terminal() end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "]]";
|
||||
mode = ["n" "t"];
|
||||
desc = "Next Reference";
|
||||
action = "function() Snacks.words.jump(vim.v.count1) end";
|
||||
lua = true;
|
||||
}
|
||||
{
|
||||
key = "[[";
|
||||
mode = ["n" "t"];
|
||||
desc = "Prev Reference";
|
||||
action = "function() Snacks.words.jump(-vim.v.count1) end";
|
||||
lua = true;
|
||||
}
|
||||
]
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
[
|
||||
{
|
||||
key = "<leader> ";
|
||||
mode = ["n" "t"];
|
||||
silent = true;
|
||||
action = "<cmd>Telescope find_files<CR>";
|
||||
desc = "Find Files";
|
||||
}
|
||||
]
|
||||
|
|
@ -1,214 +0,0 @@
|
|||
{pkgs, ...}: let
|
||||
keybinds = import ./binds;
|
||||
plugins = import ./plugins {inherit pkgs;};
|
||||
in {
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
vim = {
|
||||
package = pkgs.neovim-unwrapped;
|
||||
lazy.plugins = plugins;
|
||||
|
||||
viAlias = false;
|
||||
vimAlias = true;
|
||||
useSystemClipboard = true;
|
||||
|
||||
keymaps = keybinds;
|
||||
|
||||
lsp = {
|
||||
formatOnSave = true;
|
||||
lspkind.enable = false;
|
||||
lightbulb.enable = true;
|
||||
lspsaga.enable = false;
|
||||
trouble.enable = true;
|
||||
lspSignature.enable = true;
|
||||
otter-nvim.enable = true;
|
||||
lsplines.enable = true;
|
||||
nvim-docs-view.enable = true;
|
||||
};
|
||||
|
||||
debugger = {
|
||||
nvim-dap = {
|
||||
enable = true;
|
||||
ui.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
theme = {
|
||||
enable = true;
|
||||
name = "tokyonight";
|
||||
style = "night";
|
||||
};
|
||||
|
||||
snippets = {
|
||||
luasnip.enable = true;
|
||||
};
|
||||
|
||||
binds = {
|
||||
whichKey.enable = true;
|
||||
cheatsheet.enable = true;
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
gitsigns.enable = true;
|
||||
gitsigns.codeActions.enable = false;
|
||||
};
|
||||
|
||||
minimap = {
|
||||
codewindow.enable = true;
|
||||
};
|
||||
|
||||
projects = {
|
||||
project-nvim.enable = true;
|
||||
};
|
||||
|
||||
notes = {
|
||||
todo-comments.enable = true;
|
||||
mind-nvim.enable = true;
|
||||
};
|
||||
|
||||
tabline = {
|
||||
nvimBufferline.enable = true;
|
||||
};
|
||||
|
||||
utility = {
|
||||
icon-picker.enable = true;
|
||||
surround.enable = true;
|
||||
diffview-nvim.enable = true;
|
||||
motion = {
|
||||
hop.enable = true;
|
||||
leap.enable = true;
|
||||
precognition.enable = false;
|
||||
};
|
||||
|
||||
images = {
|
||||
image-nvim = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
backend = "kitty";
|
||||
processor = "magick_cli";
|
||||
integrations = {
|
||||
markdown = {
|
||||
enable = true;
|
||||
downloadRemoteImages = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
filetree.neo-tree = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
filesystem = {
|
||||
bind_to_cwd = false;
|
||||
follow_current_file.enabled = true;
|
||||
use_libuv_file_watcher = true;
|
||||
};
|
||||
window.mappings = {
|
||||
"<space>" = "none";
|
||||
"l" = "open";
|
||||
"h" = "close_node";
|
||||
};
|
||||
default_component_configs = {
|
||||
indent = {
|
||||
with_expanders = true;
|
||||
expander_collapsed = "";
|
||||
expander_expanded = "";
|
||||
expander_highlight = "NeoTreeExpander";
|
||||
};
|
||||
git_status = {
|
||||
symbols = {
|
||||
unstaged = "";
|
||||
staged = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ui = {
|
||||
borders.enable = true;
|
||||
colorizer.enable = true;
|
||||
illuminate.enable = true;
|
||||
noice.enable = true;
|
||||
breadcrumbs = {
|
||||
enable = true;
|
||||
navbuddy.enable = true;
|
||||
};
|
||||
|
||||
smartcolumn = {
|
||||
enable = true;
|
||||
setupOpts.custom_colorcolumn = {
|
||||
nix = "110";
|
||||
ruby = "120";
|
||||
java = "130";
|
||||
go = ["90" "130"];
|
||||
};
|
||||
};
|
||||
fastaction.enable = true;
|
||||
};
|
||||
|
||||
statusline.lualine = {
|
||||
enable = true;
|
||||
theme = "tokyonight";
|
||||
};
|
||||
|
||||
telescope.enable = true;
|
||||
autocomplete.nvim-cmp.enable = true;
|
||||
autopairs.nvim-autopairs.enable = true;
|
||||
treesitter.context.enable = true;
|
||||
|
||||
languages = {
|
||||
enableLSP = true;
|
||||
enableFormat = true;
|
||||
enableTreesitter = true;
|
||||
enableExtraDiagnostics = true;
|
||||
|
||||
nix.enable = true;
|
||||
markdown.enable = true;
|
||||
bash.enable = true;
|
||||
clang.enable = true;
|
||||
css.enable = true;
|
||||
html.enable = true;
|
||||
sql.enable = true;
|
||||
java.enable = true;
|
||||
kotlin.enable = true;
|
||||
ts.enable = true;
|
||||
go.enable = true;
|
||||
lua.enable = true;
|
||||
zig.enable = true;
|
||||
python.enable = true;
|
||||
typst.enable = true;
|
||||
rust = {
|
||||
enable = true;
|
||||
crates.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
visuals = {
|
||||
nvim-scrollbar.enable = true;
|
||||
nvim-web-devicons.enable = true;
|
||||
nvim-cursorline.enable = true;
|
||||
cinnamon-nvim.enable = true;
|
||||
fidget-nvim.enable = true;
|
||||
highlight-undo.enable = true;
|
||||
indent-blankline.enable = true;
|
||||
|
||||
# Fun
|
||||
cellular-automaton.enable = false;
|
||||
};
|
||||
|
||||
comments = {
|
||||
comment-nvim.enable = true;
|
||||
};
|
||||
|
||||
presence = {
|
||||
neocord.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
{pkgs, ...}: let
|
||||
snacksBinds = import ../binds/snacks.nix;
|
||||
logo = ''
|
||||
██████████ █████████ █████████ █████ █████ █████ █████ █████ █████
|
||||
░░███░░░░███ ███░░░░░███ ███░░░░░███░░███ ░░███ ░░███ ░░███ ░░███ ░░███
|
||||
░███ ░░███ ░███ ░███ ███ ░░░ ░███ ░███ ░░███ ███ ░░███ ███
|
||||
░███ ░███ ░███████████ ░███ ░███████████ ░░█████ ░░█████
|
||||
░███ ░███ ░███░░░░░███ ░███ ░███░░░░░███ ███░███ ░░███
|
||||
░███ ███ ░███ ░███ ░░███ ███ ░███ ░███ ███ ░░███ ░███
|
||||
██████████ █████ █████ ░░█████████ █████ █████ █████ █████ █████
|
||||
░░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░
|
||||
'';
|
||||
in {
|
||||
"${pkgs.vimPlugins.snacks-nvim.pname}" = {
|
||||
enabled = true;
|
||||
priority = 1000;
|
||||
package = pkgs.vimPlugins.snacks-nvim;
|
||||
setupModule = "snacks";
|
||||
lazy = false;
|
||||
setupOpts = {
|
||||
animate.enabled = true;
|
||||
dashboard = {
|
||||
enabled = true;
|
||||
header = logo;
|
||||
keys = [
|
||||
{
|
||||
icon = " ";
|
||||
key = "f";
|
||||
desc = "Find File";
|
||||
action = ":lua Snacks.dashboard.pick('files')";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
key = "n";
|
||||
desc = "New File";
|
||||
action = ":ene | startinsert";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
key = "g";
|
||||
desc = "Find Text";
|
||||
action = ":lua Snacks.dashboard.pick('live_grep')";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
key = "r";
|
||||
desc = "Recent Files";
|
||||
action = ":lua Snacks.dashboard.pick('oldfiles')";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
key = "c";
|
||||
desc = "Config";
|
||||
action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
key = "s";
|
||||
desc = "Restore Session";
|
||||
section = "session";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
key = "x";
|
||||
desc = "Lazy Extras";
|
||||
action = ":LazyExtras";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
key = "l";
|
||||
desc = "Lazy";
|
||||
action = ":Lazy";
|
||||
}
|
||||
{
|
||||
icon = " ";
|
||||
key = "q";
|
||||
desc = "Quit";
|
||||
action = ":qa";
|
||||
}
|
||||
];
|
||||
};
|
||||
indent.enabled = true;
|
||||
input.enabled = true;
|
||||
notifier.enabled = false;
|
||||
quickfile.enabled = true;
|
||||
scroll.enabled = true;
|
||||
statuscolumn.enabled = false;
|
||||
words.enabled = true;
|
||||
};
|
||||
|
||||
keys = snacksBinds;
|
||||
};
|
||||
}
|
||||
|
|
@ -9,6 +9,20 @@
|
|||
};
|
||||
};
|
||||
|
||||
neovim = {
|
||||
enable = true;
|
||||
configure = {
|
||||
customRC = ''
|
||||
set number
|
||||
set relativenumber
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
set expandtab
|
||||
nnoremap <C-s> :w<CR>
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
dconf.enable = true;
|
||||
zsh.enable = true;
|
||||
mtr.enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue