From 8a0dd464732b050d70e73f0822d77f54c4ae1d80 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Mon, 27 Oct 2025 21:53:43 -0500 Subject: [PATCH] more --- flake.nix | 15 +++++++++++++++ lua/plugins/conform_formatter.lua | 3 ++- lua/plugins/markdown_glow.lua | 10 ++++++++++ lua/plugins/remote-sshfs.lua | 7 +++++++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index c32a03a..a3b2167 100644 --- a/flake.nix +++ b/flake.nix @@ -226,6 +226,7 @@ (builtins.filter (n: builtins.substring 0 12 n == "nvim_plugin-") (builtins.attrNames inputs)); }); +<<<<<<< Updated upstream # All runtime dependencies are now optional and checked at runtime by plugins # This keeps the neovim flake lean and allows project devShells to provide tools # Core dependencies that neovim itself might need can still be added here @@ -235,6 +236,16 @@ fd # file finding - used by telescope # All other tools (LSPs, formatters, linters, glow, sshfs, etc.) are now optional # and will show helpful errors when missing +======= + # All runtime dependencies are now optional and checked lazily by plugins + # This keeps the neovim flake lean and allows project devShells to provide tools + # Core dependencies that telescope needs are kept here + runtimeDependencies = with pkgs; [ + ripgrep # search - core to telescope, checked in telescope.lua init + fd # file finding - improves telescope performance, checked in telescope.lua init + # All other tools (LSPs, formatters, linters, glow, sshfs, etc.) are now optional + # and will show helpful errors when missing at the point of use +>>>>>>> Stashed changes ]; in @@ -256,7 +267,11 @@ old.generatedWrapperArgs or [ ] ++ [ # Add minimal runtime dependencies to neovim path +<<<<<<< Updated upstream # Most tools are now optional and checked at runtime +======= + # Project devShells take precedence via --suffix +>>>>>>> Stashed changes "--suffix" "PATH" ":" diff --git a/lua/plugins/conform_formatter.lua b/lua/plugins/conform_formatter.lua index d651548..bdd2cb7 100644 --- a/lua/plugins/conform_formatter.lua +++ b/lua/plugins/conform_formatter.lua @@ -83,7 +83,8 @@ return { -- args = { "fmt" }, -- }, }, - -- Note that all these need to be available at runtime, add them to flake.nix#runtimeDependencies + -- Formatters are checked lazily on format attempt + -- conform.nvim will show errors if formatters are missing formatters_by_ft = { sql = { "sql_formatter", lsp_format = "first" }, lua = { "stylua", lsp_format = "first" }, diff --git a/lua/plugins/markdown_glow.lua b/lua/plugins/markdown_glow.lua index ff7f8de..5572115 100644 --- a/lua/plugins/markdown_glow.lua +++ b/lua/plugins/markdown_glow.lua @@ -13,6 +13,16 @@ return { default_type = "keep", }, cmd = "Glow", + config = function(_, opts) + -- Check for glow when plugin is first used + if not U.cmd_executable("glow") then + vim.notify( + "'glow' not found on PATH. Install it to use markdown preview.", + vim.log.levels.ERROR + ) + end + require("glow").setup(opts) + end, keys = { { ",m", "Glow", desc = "Markdown preview" }, }, diff --git a/lua/plugins/remote-sshfs.lua b/lua/plugins/remote-sshfs.lua index f0c288d..1ba6dd3 100644 --- a/lua/plugins/remote-sshfs.lua +++ b/lua/plugins/remote-sshfs.lua @@ -20,6 +20,13 @@ return { dependencies = { "nvim-telescope/telescope.nvim" }, opts = {}, config = function(_, opts) + -- Check for sshfs when plugin is first used + if not U.cmd_executable("sshfs") then + vim.notify( + "'sshfs' not found on PATH. Install it to use RemoteSSHFS commands.", + vim.log.levels.ERROR + ) + end require("remote-sshfs").setup(opts) require("telescope").load_extension("remote-sshfs") end,