diff --git a/flake.lock b/flake.lock index 18422f7..691aa28 100644 --- a/flake.lock +++ b/flake.lock @@ -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" diff --git a/flake.nix b/flake.nix index dd63528..74bd63b 100644 --- a/flake.nix +++ b/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 ]; diff --git a/home/config/nvim/lua/config/lazy.lua b/home/config/nvim/lua/config/lazy.lua deleted file mode 100644 index 49e5fce..0000000 --- a/home/config/nvim/lua/config/lazy.lua +++ /dev/null @@ -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", - }, - }, - }, -}) diff --git a/home/config/nvim/lua/config/options.lua b/home/config/nvim/lua/config/options.lua index 6661a09..cbe4cb6 100644 --- a/home/config/nvim/lua/config/options.lua +++ b/home/config/nvim/lua/config/options.lua @@ -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 diff --git a/home/config/nvim/lua/plugins/lazygit.lua b/home/config/nvim/lua/plugins/lazygit.lua index 4789279..62c5e48 100644 --- a/home/config/nvim/lua/plugins/lazygit.lua +++ b/home/config/nvim/lua/plugins/lazygit.lua @@ -1,22 +1,22 @@ return { - { + { "kdheepak/lazygit.nvim", lazy = false, cmd = { - "LazyGit", - "LazyGitConfig", - "LazyGitCurrentFile", - "LazyGitFilter", - "LazyGitFilterCurrentFile", + "LazyGit", + "LazyGitConfig", + "LazyGitCurrentFile", + "LazyGitFilter", + "LazyGitFilterCurrentFile", }, -- optional for floating window border decoration dependencies = { - "nvim-lua/plenary.nvim", + "nvim-lua/plenary.nvim", }, -- 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 = { - { "gg", "LazyGit", desc = "LazyGit" } - } - } + { "gg", "LazyGit", desc = "LazyGit" }, + }, + }, } diff --git a/home/config/nvim/lua/plugins/lsp.lua b/home/config/nvim/lua/plugins/lsp.lua index 43dab5c..916dc65 100644 --- a/home/config/nvim/lua/plugins/lsp.lua +++ b/home/config/nvim/lua/plugins/lsp.lua @@ -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" }, - }, - 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, + volar = { + init_options = { + vue = { + hybridMode = 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 = {}, diff --git a/home/config/nvim/lua/plugins/markdown-preview.lua b/home/config/nvim/lua/plugins/markdown-preview.lua deleted file mode 100644 index 153accf..0000000 --- a/home/config/nvim/lua/plugins/markdown-preview.lua +++ /dev/null @@ -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" }, - }, -} diff --git a/home/config/nvim/lua/plugins/mason.lua b/home/config/nvim/lua/plugins/mason.lua deleted file mode 100644 index d5886a1..0000000 --- a/home/config/nvim/lua/plugins/mason.lua +++ /dev/null @@ -1,5 +0,0 @@ --- Mason is not usable on NixOS -return { - { "williamboman/mason-lspconfig.nvim", enabled = false }, - { "williamboman/mason.nvim", enabled = false }, -} diff --git a/home/user/default.nix b/home/user/default.nix index c3ccc7f..ae9f675 100644 --- a/home/user/default.nix +++ b/home/user/default.nix @@ -11,7 +11,7 @@ ./virtualization.nix ./hyprland.nix ./swaync.nix - ./neovim.nix + ./nvim.nix ./bin.nix ./desktops.nix ./direnv.nix diff --git a/home/user/desktops.nix b/home/user/desktops.nix index 59bc0c8..3b4c84a 100644 --- a/home/user/desktops.nix +++ b/home/user/desktops.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"; diff --git a/home/user/hypr/bind.nix b/home/user/hypr/bind.nix index fa5fa3d..2572b09 100644 --- a/home/user/hypr/bind.nix +++ b/home/user/hypr/bind.nix @@ -1,9 +1,10 @@ { mainMod, nvidia-offload-enabled }: let - prefix = if nvidia-offload-enabled then "offload " else ""; - browser = "${prefix}firefox"; - noOffloadBrowser = "firefox -P noOffload"; - terminal = "${prefix}ghostty"; + firefox = "firefox-nightly"; + prefix = if nvidia-offload-enabled then "offload" else ""; + browser = "${prefix} ${firefox}"; + noOffloadBrowser = "${firefox} -P noOffload"; + terminal = "${prefix} ghostty"; filemanager = "nemo"; scripts = "~/.config/scripts"; diff --git a/home/user/neovim.nix b/home/user/neovim.nix deleted file mode 100644 index 2f227b7..0000000 --- a/home/user/neovim.nix +++ /dev/null @@ -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; - }; - -} diff --git a/home/user/nvim.nix b/home/user/nvim.nix new file mode 100644 index 0000000..baf1280 --- /dev/null +++ b/home/user/nvim.nix @@ -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; +} diff --git a/home/user/packages.nix b/home/user/packages.nix index 6c56d89..f4965b1 100644 --- a/home/user/packages.nix +++ b/home/user/packages.nix @@ -46,7 +46,6 @@ in pkgsCross.mingwW64.stdenv.cc pkgsCross.mingwW64.windows.pthreads postman - cz-cli # Work stuff libreoffice-qt diff --git a/home/user/programs.nix b/home/user/programs.nix index 7b6c59a..74908bb 100644 --- a/home/user/programs.nix +++ b/home/user/programs.nix @@ -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" diff --git a/system/modules/lsp.nix b/system/modules/lsp.nix index b4e5574..5eea7e4 100644 --- a/system/modules/lsp.nix +++ b/system/modules/lsp.nix @@ -12,7 +12,6 @@ nixd marksman nginx-language-server - nodePackages_latest.vscode-json-languageserver bash-language-server tailwindcss-language-server vscode-langservers-extracted diff --git a/system/modules/nvf/binds/default.nix b/system/modules/nvf/binds/default.nix deleted file mode 100644 index 9715f99..0000000 --- a/system/modules/nvf/binds/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -let - general = import ./general.nix; - telescope = import ./telescope.nix; - neoTree = import ./neo-tree.nix; -in - general ++ telescope ++ neoTree diff --git a/system/modules/nvf/binds/general.nix b/system/modules/nvf/binds/general.nix deleted file mode 100644 index 0a5d036..0000000 --- a/system/modules/nvf/binds/general.nix +++ /dev/null @@ -1,508 +0,0 @@ -let - directions = ["h" "j" "k" "l"]; - generateMappings = direction: { - key = ""; - mode = ["n"]; - silent = true; - action = "${direction}"; - }; - naviMappings = map generateMappings directions; - resizeStep = "2"; - resizeMappings = [ - { - key = ""; - mode = ["n"]; - silent = true; - action = "vertical resize -${resizeStep}"; - } - { - key = ""; - mode = ["n"]; - silent = true; - action = "vertical resize +${resizeStep}"; - } - { - key = ""; - mode = ["n"]; - silent = true; - action = "resize +${resizeStep}"; - } - { - key = ""; - mode = ["n"]; - silent = true; - action = "resize -${resizeStep}"; - } - ]; - moveLineMappings = [ - { - key = ""; - mode = ["n"]; - silent = true; - action = "m .+1=="; - } - { - key = ""; - mode = ["n"]; - silent = true; - action = "m .-2=="; - } - ]; - saveMappings = [ - # Save File - { - key = ""; - mode = ["n"]; - silent = true; - action = "w"; - noremap = true; - } - { - key = ""; - mode = ["i"]; - silent = true; - action = "w"; - noremap = true; - } - { - key = ""; - mode = ["x"]; - silent = true; - action = "w"; - noremap = true; - } - { - key = ""; - mode = ["s"]; - silent = true; - action = "w"; - noremap = true; - } - ]; - generalMappings = [ - { - key = ""; - mode = ["n"]; - silent = true; - action = "bprevious"; - } # Prev Buffer - { - key = ""; - mode = ["n"]; - silent = true; - action = "bnext"; - } # Next Buffer - { - key = "[b"; - mode = ["n"]; - silent = true; - action = "bprevious"; - } # Prev Buffer - { - key = "]b"; - mode = ["n"]; - silent = true; - action = "bnext"; - } # Next Buffer - { - key = "bb"; - mode = ["n"]; - silent = true; - action = "buffer #"; - } # Switch to Other Buffer - { - key = "`"; - mode = ["n"]; - silent = true; - action = "buffer #"; - } # Switch to Other Buffer - { - key = "bd"; - mode = ["n"]; - silent = true; - action = "bd"; - } # Delete Buffer - { - key = "bo"; - mode = ["n"]; - silent = true; - action = "bufdo bd"; - } # Delete Other Buffers - { - key = "bD"; - mode = ["n"]; - silent = true; - action = "bd | :q"; - } # Delete Buffer and Window - { - key = ""; - mode = ["i" "n" "s"]; - silent = true; - action = "noh"; - } # Escape and Clear hlsearch - { - key = "ur"; - mode = ["n"]; - silent = true; - action = "nohlsearchdiffupdatenormal! "; - 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 = ""; - mode = ["i" "x" "n" "s"]; - silent = true; - action = "w"; - } # Save File - { - key = "K"; - mode = ["n"]; - silent = true; - action = "norm! K"; - } # Keywordprg - { - key = "gco"; - mode = ["n"]; - silent = true; - action = "oVcxnormal gccfxa"; - } # Add Comment Below - { - key = "gcO"; - mode = ["n"]; - silent = true; - action = "OVcxnormal gccfxa"; - } # Add Comment Above - { - key = "fn"; - mode = ["n"]; - silent = true; - action = "enew"; - } # New File - { - key = "xl"; - mode = ["n"]; - silent = true; - action = "lopen"; - } # Location List - { - key = "xq"; - mode = ["n"]; - silent = true; - action = "copen"; - } # 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 = "cf"; - mode = ["n" "v"]; - silent = true; - action = "normal! gq"; - } # Format - { - key = "cd"; - mode = ["n"]; - silent = true; - action = "LspDiagnostics"; - } # Line Diagnostics - { - key = "]d"; - mode = ["n"]; - silent = true; - action = "lnext"; - } # Next Diagnostic - { - key = "[d"; - mode = ["n"]; - silent = true; - action = "lprevious"; - } # Prev Diagnostic - { - key = "]e"; - mode = ["n"]; - silent = true; - action = "lnext"; - } # Next Error - { - key = "[e"; - mode = ["n"]; - silent = true; - action = "lprevious"; - } # Prev Error - { - key = "]w"; - mode = ["n"]; - silent = true; - action = "lnext"; - } # Next Warning - { - key = "[w"; - mode = ["n"]; - silent = true; - action = "lprevious"; - } # Prev Warning - { - key = "uf"; - mode = ["n"]; - silent = true; - action = "ToggleAutoFormat"; - } # Toggle Auto Format (Global) - { - key = "uF"; - mode = ["n"]; - silent = true; - action = "ToggleAutoFormatBuffer"; - } # Toggle Auto Format (Buffer) - { - key = "us"; - mode = ["n"]; - silent = true; - action = "setlocal spell!"; - } # Toggle Spelling - { - key = "uw"; - mode = ["n"]; - silent = true; - action = "set wrap!"; - } # Toggle Wrap - { - key = "uL"; - mode = ["n"]; - silent = true; - action = "set relativenumber!"; - } # Toggle Relative Number - { - key = "ud"; - mode = ["n"]; - silent = true; - action = "LspDiagnosticsToggle"; - } # Toggle Diagnostics - { - key = "ul"; - mode = ["n"]; - silent = true; - action = "set number!"; - } # Toggle Line Numbers - { - key = "uc"; - mode = ["n"]; - silent = true; - action = "set conceallevel=3"; - } # Toggle Conceal Level - { - key = "uA"; - mode = ["n"]; - silent = true; - action = "set showtabline=2"; - } # Toggle Tabline - { - key = "uT"; - mode = ["n"]; - silent = true; - action = "TSToggleHighlight"; - } # Toggle Treesitter Highlight - { - key = "ub"; - mode = ["n"]; - silent = true; - action = "set background=dark"; - } # Toggle Dark Background - { - key = "uD"; - mode = ["n"]; - silent = true; - action = "ToggleDimming"; - } # Toggle Dimming - { - key = "ua"; - mode = ["n"]; - silent = true; - action = "ToggleAnimations"; - } # Toggle Animations - { - key = "ug"; - mode = ["n"]; - silent = true; - action = "IndentGuidesToggle"; - } # Toggle Indent Guides - { - key = "uS"; - mode = ["n"]; - silent = true; - action = "SmoothScrollToggle"; - } # Toggle Smooth Scroll - { - key = "dpp"; - mode = ["n"]; - silent = true; - action = "ToggleProfiler"; - } # Toggle Profiler - { - key = "dph"; - mode = ["n"]; - silent = true; - action = "ToggleProfilerHighlights"; - } # Toggle Profiler Highlights - { - key = "uh"; - mode = ["n"]; - silent = true; - action = "ToggleInlayHints"; - } # Toggle Inlay Hints - { - key = "gb"; - mode = ["n"]; - silent = true; - action = "GitBlame"; - } # Git Blame Line - { - key = "gB"; - mode = ["n" "x"]; - silent = true; - action = "GitBrowseOpen"; - } # Git Browse (open) - { - key = "gY"; - mode = ["n" "x"]; - silent = true; - action = "GitBrowseCopy"; - } # Git Browse (copy) - { - key = "qq"; - mode = ["n"]; - silent = true; - action = "qa!"; - } # Quit All - { - key = "ui"; - mode = ["n"]; - silent = true; - action = "InspectPos"; - } # Inspect Pos - { - key = "uI"; - mode = ["n"]; - silent = true; - action = "InspectTree"; - } # Inspect Tree - { - key = "L"; - mode = ["n"]; - silent = true; - action = "LazyVimChangelog"; - } # LazyVim Changelog - { - key = ""; - mode = ["n" "t"]; - silent = true; - action = ""; - } # which_key_ignore - { - key = "w"; - mode = ["n"]; - silent = true; - action = "windows"; - } # Windows - { - key = "-"; - mode = ["n"]; - silent = true; - action = "split"; - } # Split Window Below - { - key = "|"; - mode = ["n"]; - silent = true; - action = "vsplit"; - } # Split Window Right - { - key = "wd"; - mode = ["n"]; - silent = true; - action = "close"; - } # Delete Window - { - key = "wm"; - mode = ["n"]; - silent = true; - action = "ZoomModeToggle"; - } # Toggle Zoom Mode - { - key = "uZ"; - mode = ["n"]; - silent = true; - action = "ZoomModeToggle"; - } # Toggle Zoom Mode - { - key = "uz"; - mode = ["n"]; - silent = true; - action = "ZenModeToggle"; - } # Toggle Zen Mode - { - key = "l"; - mode = ["n"]; - silent = true; - action = "tabprevious"; - } # Last Tab - { - key = "o"; - mode = ["n"]; - silent = true; - action = "tabnew"; - } # Close Other Tabs - { - key = "f"; - mode = ["n"]; - silent = true; - action = "tabfirst"; - } # First Tab - { - key = ""; - mode = ["n"]; - silent = true; - action = "tabnew"; - } # New Tab - { - key = "]"; - mode = ["n"]; - silent = true; - action = "tabnext"; - } # Next Tab - { - key = "d"; - mode = ["n"]; - silent = true; - action = "tabclose"; - } # Close Tab - { - key = "["; - mode = ["n"]; - silent = true; - action = "tabprevious"; - } # Previous Tab - ]; -in - naviMappings ++ resizeMappings ++ moveLineMappings ++ saveMappings ++ generalMappings diff --git a/system/modules/nvf/binds/neo-tree.nix b/system/modules/nvf/binds/neo-tree.nix deleted file mode 100644 index 47d3868..0000000 --- a/system/modules/nvf/binds/neo-tree.nix +++ /dev/null @@ -1,9 +0,0 @@ -[ - { - key = "e"; - mode = ["n" "t"]; - silent = true; - action = "Neotree toggle"; - desc = "Toggle NeoTree"; - } -] diff --git a/system/modules/nvf/binds/snacks.nix b/system/modules/nvf/binds/snacks.nix deleted file mode 100644 index 2ba6790..0000000 --- a/system/modules/nvf/binds/snacks.nix +++ /dev/null @@ -1,121 +0,0 @@ -[ - { - key = "z"; - mode = ["n"]; - desc = "Toggle Zen Mode"; - action = "function() Snacks.zen() end"; - lua = true; - } - { - key = "Z"; - mode = ["n"]; - desc = "Toggle Zoom"; - action = "function() Snacks.zen.zoom() end"; - lua = true; - } - { - key = "."; - mode = ["n"]; - desc = "Toggle Scratch Buffer"; - action = "function() Snacks.scratch() end"; - lua = true; - } - { - key = "S"; - mode = ["n"]; - desc = "Select Scratch Buffer"; - action = "function() Snacks.scratch.select() end"; - lua = true; - } - { - key = "n"; - mode = ["n"]; - desc = "Notification History"; - action = "function() Snacks.notifier.show_history() end"; - lua = true; - } - { - key = "bd"; - mode = ["n"]; - desc = "Delete Buffer"; - action = "function() Snacks.bufdelete() end"; - lua = true; - } - { - key = "cR"; - mode = ["n"]; - desc = "Rename File"; - action = "function() Snacks.rename.rename_file() end"; - lua = true; - } - { - key = "gB"; - mode = ["n" "v"]; - desc = "Git Browse"; - action = "function() Snacks.gitbrowse() end"; - lua = true; - } - { - key = "gb"; - mode = ["n"]; - desc = "Git Blame Line"; - action = "function() Snacks.git.blame_line() end"; - lua = true; - } - { - key = "gf"; - mode = ["n"]; - desc = "Lazygit Current File History"; - action = "function() Snacks.lazygit.log_file() end"; - lua = true; - } - { - key = "gg"; - mode = ["n"]; - desc = "Lazygit"; - action = "function() Snacks.lazygit() end"; - lua = true; - } - { - key = "gl"; - mode = ["n"]; - desc = "Lazygit Log (cwd)"; - action = "function() Snacks.lazygit.log() end"; - lua = true; - } - { - key = "un"; - mode = ["n"]; - desc = "Dismiss All Notifications"; - action = "function() Snacks.notifier.hide() end"; - lua = true; - } - { - key = ""; - mode = ["n"]; - desc = "Toggle Terminal"; - action = "function() Snacks.terminal() end"; - lua = true; - } - { - key = ""; - 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; - } -] diff --git a/system/modules/nvf/binds/telescope.nix b/system/modules/nvf/binds/telescope.nix deleted file mode 100644 index 96708c9..0000000 --- a/system/modules/nvf/binds/telescope.nix +++ /dev/null @@ -1,9 +0,0 @@ -[ - { - key = " "; - mode = ["n" "t"]; - silent = true; - action = "Telescope find_files"; - desc = "Find Files"; - } -] diff --git a/system/modules/nvf/default.nix b/system/modules/nvf/default.nix deleted file mode 100644 index ad7018b..0000000 --- a/system/modules/nvf/default.nix +++ /dev/null @@ -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 = { - "" = "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; - }; - }; - }; - }; -} diff --git a/system/modules/nvf/plugins/default.nix b/system/modules/nvf/plugins/default.nix deleted file mode 100644 index 8dd997b..0000000 --- a/system/modules/nvf/plugins/default.nix +++ /dev/null @@ -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; - }; -} diff --git a/system/modules/programs.nix b/system/modules/programs.nix index 8fffbcf..1a44335 100644 --- a/system/modules/programs.nix +++ b/system/modules/programs.nix @@ -9,6 +9,20 @@ }; }; + neovim = { + enable = true; + configure = { + customRC = '' + set number + set relativenumber + set tabstop=2 + set shiftwidth=2 + set expandtab + nnoremap :w + ''; + }; + }; + dconf.enable = true; zsh.enable = true; mtr.enable = true;