From d5b6a69f9a7e7e985a88652ab52f4776d2b66ce6 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Mon, 27 Oct 2025 21:23:43 -0500 Subject: [PATCH 1/5] minified test --- flake.nix | 70 +++++-------------------------- lua/plugins/conform_formatter.lua | 24 +++++++++++ lua/plugins/lint.lua | 18 ++++++++ lua/plugins/lsp.lua | 11 ++++- lua/plugins/markdown_glow.lua | 9 ++++ lua/plugins/remote-sshfs.lua | 9 ++++ lua/plugins/telescope.lua | 8 +++- lua/util.lua | 17 ++++++++ 8 files changed, 105 insertions(+), 61 deletions(-) diff --git a/flake.nix b/flake.nix index 348e44b..c32a03a 100644 --- a/flake.nix +++ b/flake.nix @@ -226,59 +226,15 @@ (builtins.filter (n: builtins.substring 0 12 n == "nvim_plugin-") (builtins.attrNames inputs)); }); - # These are appended at the start of the path so that they take precedence over local install tools + # 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 runtimeDependencies = with pkgs; [ - # tools - ripgrep # search - fd # search - fzf # search fuzzy - tree-sitter - glow # markdown renderer - curl # http requests - sshfs # remote dev for nosduco/remote-sshfs.nvim - # nodePackages.cspell TODO check out `typos` rust checker instead? - ]; - - # These are appended at the end of the PATH so any local installed tools will take precedence - defaultRuntimeDependencies = with pkgs; [ - # linters - markdownlint-cli - biome # (t|s)j[x] - # formatters - stylua - nixfmt-rfc-style - nodePackages.prettier - rustywind - markdownlint-cli2 - sql-formatter - libsForQt5.qt5.qtdeclarative # qmlformat - # LSPs - # python312Packages.tiktoken # needed for copilot chat - nil # nix - lua-language-server - vscode-langservers-extracted # HTML/CSS/JSON/ESLint - nodePackages.typescript-language-server - nodePackages.svelte-language-server - tailwindcss-language-server - python312Packages.python-lsp-server - rust-analyzer - marksman # markdown - taplo # toml - yaml-language-server - lemminx # xml - gopls # go - # ocamlPackages.ocaml-lsp # ocaml - # Other - typescript - nodejs_24 - clang - # zig - (pkgs.rust-bin.stable.latest.default.override { - extensions = [ - "rust-src" - "rust-analyzer" - ]; - }) + # Keeping ripgrep and fd as they're core to telescope functionality + ripgrep # search - used heavily by telescope + 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 ]; in @@ -299,16 +255,12 @@ generatedWrapperArgs = old.generatedWrapperArgs or [ ] ++ [ - # Add runtime dependencies to neovim path - "--prefix" - "PATH" - ":" - "${lib.makeBinPath runtimeDependencies}" - # Some we will suffix so we pick up the local dev shell intead and default to these otherwise + # Add minimal runtime dependencies to neovim path + # Most tools are now optional and checked at runtime "--suffix" "PATH" ":" - "${lib.makeBinPath defaultRuntimeDependencies}" + "${lib.makeBinPath runtimeDependencies}" ] ++ [ # Set the LAZY env path to the nix store, see init.lua for how it is used diff --git a/lua/plugins/conform_formatter.lua b/lua/plugins/conform_formatter.lua index 7694bba..d651548 100644 --- a/lua/plugins/conform_formatter.lua +++ b/lua/plugins/conform_formatter.lua @@ -50,6 +50,30 @@ end return { "stevearc/conform.nvim", + init = function() + -- Check for common formatters and warn if missing + local formatters_to_check = { + { cmd = "stylua", desc = "Lua formatting" }, + { cmd = "nixfmt", desc = "Nix formatting" }, + { cmd = "prettier", desc = "JS/TS/Svelte formatting (alternative: prettierd)" }, + { cmd = "rustywind", desc = "Tailwind class sorting" }, + { cmd = "markdownlint-cli2", desc = "Markdown formatting" }, + { cmd = "sql-formatter", desc = "SQL formatting" }, + { cmd = "rustfmt", desc = "Rust formatting" }, + } + + for _, formatter in ipairs(formatters_to_check) do + if not U.cmd_executable(formatter.cmd) then + -- Only warn once on startup, not on every format attempt + vim.schedule(function() + vim.notify( + string.format("Formatter '%s' not found. Used for: %s", formatter.cmd, formatter.desc), + vim.log.levels.WARN + ) + end) + end + end + end, opts = { -- https://github.com/stevearc/conform.nvim?tab=readme-ov-file#setup notify_on_error = true, diff --git a/lua/plugins/lint.lua b/lua/plugins/lint.lua index 4185f9a..722607c 100644 --- a/lua/plugins/lint.lua +++ b/lua/plugins/lint.lua @@ -2,6 +2,24 @@ return { "mfussenegger/nvim-lint", event = { "VeryLazy", "BufWritePost", "BufReadPost", "InsertLeave" }, + init = function() + -- Check for common linters and warn if missing + local linters_to_check = { + { cmd = "markdownlint", desc = "Markdown linting" }, + { cmd = "biome", desc = "JS/TS linting" }, + } + + for _, linter in ipairs(linters_to_check) do + if not U.cmd_executable(linter.cmd) then + vim.schedule(function() + vim.notify( + string.format("Linter '%s' not found. Used for: %s", linter.cmd, linter.desc), + vim.log.levels.WARN + ) + end) + end + end + end, opts = { -- Event to trigger linters events = { "BufWritePost", "BufReadPost", "InsertLeave", "CursorHold", "CursorHoldI" }, diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index c4b0cdb..6392ecb 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -219,7 +219,16 @@ return { for _, server_name in ipairs(lsp_servers) do local server_opts = servers[server_name] or {} vim.lsp.config(server_name, server_opts) - vim.lsp.enable(server_name) + -- Try to enable LSP and show helpful error if server not found + local ok, err = pcall(function() + vim.lsp.enable(server_name) + end) + if not ok then + vim.notify( + string.format("LSP '%s' failed to start. Install it in your project devShell.\nError: %s", server_name, err), + vim.log.levels.ERROR + ) + end end else -- TODO test this out on a non nix setup... diff --git a/lua/plugins/markdown_glow.lua b/lua/plugins/markdown_glow.lua index dfea216..ff7f8de 100644 --- a/lua/plugins/markdown_glow.lua +++ b/lua/plugins/markdown_glow.lua @@ -1,5 +1,14 @@ return { "lnc3l0t/glow.nvim", + init = function() + -- Check if glow is available + if not U.cmd_executable("glow") then + vim.notify( + "'glow' not found on PATH. Required for markdown preview with :Glow", + vim.log.levels.INFO + ) + end + end, opts = { default_type = "keep", }, diff --git a/lua/plugins/remote-sshfs.lua b/lua/plugins/remote-sshfs.lua index ae93bcf..f0c288d 100644 --- a/lua/plugins/remote-sshfs.lua +++ b/lua/plugins/remote-sshfs.lua @@ -1,5 +1,14 @@ return { "nosduco/remote-sshfs.nvim", + init = function() + -- Check if sshfs is available + if not U.cmd_executable("sshfs") then + vim.notify( + "'sshfs' not found on PATH. Required for RemoteSSHFS commands", + vim.log.levels.INFO + ) + end + end, cmd = { "RemoteSshfs", "RemoteSSHFSConnect", diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index cda1219..fcf10c8 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -7,11 +7,17 @@ return { { "aznhe21/actions-preview.nvim", event = "VeryLazy" }, }, init = function() + -- Check for essential telescope tools U.cmd_executable("rg", { [false] = function() - vim.notify("rg not installed, live grep will not function.", 2) + vim.notify("'rg' (ripgrep) not found. Required for telescope live grep. Install it in your environment.", vim.log.levels.ERROR) end, }) + + -- fd is optional but improves file finding performance + if not U.cmd_executable("fd") then + vim.notify("'fd' not found. Telescope will use 'find' instead (slower). Consider installing fd.", vim.log.levels.INFO) + end end, cmd = "Telescope", opts = function() diff --git a/lua/util.lua b/lua/util.lua index a399d2e..5c19a46 100644 --- a/lua/util.lua +++ b/lua/util.lua @@ -38,6 +38,23 @@ function M.cmd_executable(cmd, callback) return executable end +-- Check if command exists and show helpful error if not +-- @param cmd string: The command to check for +-- @param feature_name string: Human-readable description of what needs this command +-- @param level number: vim.log.levels (ERROR, WARN, INFO, etc.) - defaults to ERROR +-- @return boolean: true if command exists, false otherwise +function M.require_cmd(cmd, feature_name, level) + level = level or vim.log.levels.ERROR + if vim.fn.executable(cmd) ~= 1 then + vim.notify( + string.format("'%s' not found on PATH. Required for: %s", cmd, feature_name), + level + ) + return false + end + return true +end + -- [1]: (string) lhs (required) -- [2]: (string|fun()) rhs (optional) -- mode: (string|string[]) mode (optional, defaults to "n") From a510ccafb63215bb395f54da0d31029b9f201c5a Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Mon, 27 Oct 2025 21:49:50 -0500 Subject: [PATCH 2/5] update config version and remove unused --- flake.lock | 12 ++++++------ flake.nix | 40 +--------------------------------------- 2 files changed, 7 insertions(+), 45 deletions(-) diff --git a/flake.lock b/flake.lock index df9abf5..1658efc 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1761605067, - "narHash": "sha256-XlXxfbRET+JrBLnnknmlO6rEazTe/S4Nycnkls6Oe0Q=", + "lastModified": 1761619080, + "narHash": "sha256-PsLFmU/CORWeCjJi9ALsegwr/SMjf2gHsooTR09az4c=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8929c5ea8ff351a777bc983b0b8e0a46587e6909", + "rev": "fd644bba1d3a83169e4b312ce20928ba1b0abb02", "type": "github" }, "original": { @@ -963,11 +963,11 @@ ] }, "locked": { - "lastModified": 1761532837, - "narHash": "sha256-78mCSQgC/a6/0vWYrvE/g9E3gGsJLyBBGtmHe3ZOLG4=", + "lastModified": 1761619008, + "narHash": "sha256-vp97eNmi5GG/+jlvnBpmG6EVO2F1+nqMQFF9GT2TIQg=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "4f5f89f1cfd8553b1285a4a0879ea1b2b05ad286", + "rev": "7bc7d2f706ebe5479d230d2c6806b5dc757ae4cd", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c32a03a..a105d13 100644 --- a/flake.nix +++ b/flake.nix @@ -141,7 +141,7 @@ # work then we make a new version name. Helps separate any files and # "version" my neovim flake. Use this name for custom .config location # ================== - version = "hydrogen"; + version = "helium"; # =================== # Utilities @@ -170,44 +170,6 @@ "nvim_plugin-nvim-treesitter/nvim-treesitter" = nvim-treesitter.withAllGrammars; }; - # avante-nvim-lib = pkgs.rustPlatform.buildRustPackage { - # pname = "avante-nvim-lib"; - # version = "0.0.0"; - # src = inputs."nvim_plugin-yetone/avante.nvim"; - # - # buildFeatures = [ "luajit" ]; - # doCheck = false; - # cargoLock = { - # lockFile = inputs."nvim_plugin-yetone/avante.nvim" + "/Cargo.lock"; - # allowBuiltinFetchGit = true; - # }; - # - # nativeBuildInputs = with pkgs; [ - # pkg-config - # ]; - # - # buildInputs = with pkgs; [ - # openssl.dev - # ]; - # env = { - # OPENSSL_NO_VENDOR = "1"; - # OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib"; - # OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include"; - # OPENSSL_DIR = "${pkgs.openssl.dev}"; - # }; - # postInstall = '' - # # mv $out/lib/libavante_repo_map.so $out/lib/avante_repo_map.so - # for f in $out/lib/lib*; do - # mv "$f" "$out/lib/''${f##*/lib}" - # done - # ''; - # meta = { - # description = "Avante nvim libraries"; - # homepage = "https://github.com/yetone/avante.nvim"; - # license = pkgs.lib.licenses.asl20; - # }; - # }; - # This will be how we put any nix related stuff into our lua config luaNixGlobal = "NIX=" From 8a0dd464732b050d70e73f0822d77f54c4ae1d80 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Mon, 27 Oct 2025 21:53:43 -0500 Subject: [PATCH 3/5] 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, From 5d2bc9abb8972e3245eb57dd71be328dba07c7d1 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Mon, 27 Oct 2025 21:57:13 -0500 Subject: [PATCH 4/5] idk --- flake.nix | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/flake.nix b/flake.nix index 63bc0f0..d581155 100644 --- a/flake.nix +++ b/flake.nix @@ -188,17 +188,6 @@ (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 - runtimeDependencies = with pkgs; [ - # Keeping ripgrep and fd as they're core to telescope functionality - ripgrep # search - used heavily by telescope - 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 @@ -207,7 +196,6 @@ 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 @@ -229,11 +217,8 @@ 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" ":" From 26dd42aebb0b2bc218acf2e36113997133f4dbbd Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Mon, 27 Oct 2025 22:20:45 -0500 Subject: [PATCH 5/5] disable sshfs --- flake.lock | 17 ------------ flake.nix | 8 +++--- lua/plugins/conform_formatter.lua | 26 ++----------------- lua/plugins/lint.lua | 20 +------------- lua/plugins/markdown_glow.lua | 10 +------ .../remote-sshfs.lua | 0 6 files changed, 7 insertions(+), 74 deletions(-) rename lua/{plugins => plugins_disabled}/remote-sshfs.lua (100%) diff --git a/flake.lock b/flake.lock index 1658efc..93af7df 100644 --- a/flake.lock +++ b/flake.lock @@ -495,22 +495,6 @@ "type": "github" } }, - "nvim_plugin-nosduco/remote-sshfs.nvim": { - "flake": false, - "locked": { - "lastModified": 1759193354, - "narHash": "sha256-FfUxpRfqrf0r56/gi76N2ZooWnXWO0aRtaQBS7m+SvY=", - "owner": "nosduco", - "repo": "remote-sshfs.nvim", - "rev": "45502b3892774811153aeab5f7f9b0033c82005c", - "type": "github" - }, - "original": { - "owner": "nosduco", - "repo": "remote-sshfs.nvim", - "type": "github" - } - }, "nvim_plugin-numToStr/Comment.nvim": { "flake": false, "locked": { @@ -928,7 +912,6 @@ "nvim_plugin-mfussenegger/nvim-lint": "nvim_plugin-mfussenegger/nvim-lint", "nvim_plugin-mrcjkb/rustaceanvim": "nvim_plugin-mrcjkb/rustaceanvim", "nvim_plugin-neovim/nvim-lspconfig": "nvim_plugin-neovim/nvim-lspconfig", - "nvim_plugin-nosduco/remote-sshfs.nvim": "nvim_plugin-nosduco/remote-sshfs.nvim", "nvim_plugin-numToStr/Comment.nvim": "nvim_plugin-numToStr/Comment.nvim", "nvim_plugin-nvim-lua/plenary.nvim": "nvim_plugin-nvim-lua/plenary.nvim", "nvim_plugin-nvim-lualine/lualine.nvim": "nvim_plugin-nvim-lualine/lualine.nvim", diff --git a/flake.nix b/flake.nix index d581155..6c23573 100644 --- a/flake.nix +++ b/flake.nix @@ -126,8 +126,8 @@ "nvim_plugin-rafamadriz/friendly-snippets".flake = false; "nvim_plugin-ron-rs/ron.vim".url = "github:ron-rs/ron.vim"; "nvim_plugin-ron-rs/ron.vim".flake = false; - "nvim_plugin-nosduco/remote-sshfs.nvim".url = "github:nosduco/remote-sshfs.nvim"; - "nvim_plugin-nosduco/remote-sshfs.nvim".flake = false; + # "nvim_plugin-nosduco/remote-sshfs.nvim".url = "github:nosduco/remote-sshfs.nvim"; + # "nvim_plugin-nosduco/remote-sshfs.nvim".flake = false; }; outputs = { @@ -190,12 +190,10 @@ # 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 + tree-sitter # highlighting ]; in diff --git a/lua/plugins/conform_formatter.lua b/lua/plugins/conform_formatter.lua index bdd2cb7..7524c14 100644 --- a/lua/plugins/conform_formatter.lua +++ b/lua/plugins/conform_formatter.lua @@ -50,33 +50,11 @@ end return { "stevearc/conform.nvim", - init = function() - -- Check for common formatters and warn if missing - local formatters_to_check = { - { cmd = "stylua", desc = "Lua formatting" }, - { cmd = "nixfmt", desc = "Nix formatting" }, - { cmd = "prettier", desc = "JS/TS/Svelte formatting (alternative: prettierd)" }, - { cmd = "rustywind", desc = "Tailwind class sorting" }, - { cmd = "markdownlint-cli2", desc = "Markdown formatting" }, - { cmd = "sql-formatter", desc = "SQL formatting" }, - { cmd = "rustfmt", desc = "Rust formatting" }, - } - - for _, formatter in ipairs(formatters_to_check) do - if not U.cmd_executable(formatter.cmd) then - -- Only warn once on startup, not on every format attempt - vim.schedule(function() - vim.notify( - string.format("Formatter '%s' not found. Used for: %s", formatter.cmd, formatter.desc), - vim.log.levels.WARN - ) - end) - end - end - end, opts = { -- https://github.com/stevearc/conform.nvim?tab=readme-ov-file#setup + -- conform.nvim will notify if formatters are missing when format is attempted notify_on_error = true, + notify_no_formatters = true, formatters = { -- v_fmt = { -- command = "v", diff --git a/lua/plugins/lint.lua b/lua/plugins/lint.lua index 722607c..aa96bc3 100644 --- a/lua/plugins/lint.lua +++ b/lua/plugins/lint.lua @@ -2,24 +2,6 @@ return { "mfussenegger/nvim-lint", event = { "VeryLazy", "BufWritePost", "BufReadPost", "InsertLeave" }, - init = function() - -- Check for common linters and warn if missing - local linters_to_check = { - { cmd = "markdownlint", desc = "Markdown linting" }, - { cmd = "biome", desc = "JS/TS linting" }, - } - - for _, linter in ipairs(linters_to_check) do - if not U.cmd_executable(linter.cmd) then - vim.schedule(function() - vim.notify( - string.format("Linter '%s' not found. Used for: %s", linter.cmd, linter.desc), - vim.log.levels.WARN - ) - end) - end - end - end, opts = { -- Event to trigger linters events = { "BufWritePost", "BufReadPost", "InsertLeave", "CursorHold", "CursorHoldI" }, @@ -139,7 +121,7 @@ return { names = vim.tbl_filter(function(name) local linter = lint.linters[name] if not linter then - LazyVim.warn("Linter not found: " .. name, { title = "nvim-lint" }) + vim.notify("Linter not found: " .. name, vim.log.levels.WARN) end return linter and not (type(linter) == "table" and linter.condition and not linter.condition(ctx)) end, names) diff --git a/lua/plugins/markdown_glow.lua b/lua/plugins/markdown_glow.lua index 5572115..cbe0a79 100644 --- a/lua/plugins/markdown_glow.lua +++ b/lua/plugins/markdown_glow.lua @@ -1,14 +1,5 @@ return { "lnc3l0t/glow.nvim", - init = function() - -- Check if glow is available - if not U.cmd_executable("glow") then - vim.notify( - "'glow' not found on PATH. Required for markdown preview with :Glow", - vim.log.levels.INFO - ) - end - end, opts = { default_type = "keep", }, @@ -20,6 +11,7 @@ return { "'glow' not found on PATH. Install it to use markdown preview.", vim.log.levels.ERROR ) + return end require("glow").setup(opts) end, diff --git a/lua/plugins/remote-sshfs.lua b/lua/plugins_disabled/remote-sshfs.lua similarity index 100% rename from lua/plugins/remote-sshfs.lua rename to lua/plugins_disabled/remote-sshfs.lua