diff --git a/init.lua b/init.lua index 8af3817..41f55f3 100644 --- a/init.lua +++ b/init.lua @@ -1,10 +1,18 @@ -- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution -- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk. local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim" + if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then -- stylua: ignore - vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) + local result = vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) + if vim.v.shell_error ~= 0 then + -- stylua: ignore + vim.api.nvim_echo({ { ("Error cloning lazy.nvim:\n%s\n"):format(result), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {}) + vim.fn.getchar() + vim.cmd.quit() + end end + vim.opt.rtp:prepend(lazypath) -- validate that lazy is available diff --git a/lua/community.lua b/lua/community.lua index 7d52164..2a048e7 100644 --- a/lua/community.lua +++ b/lua/community.lua @@ -13,8 +13,7 @@ return { -- Astrocommunity - include one of the following -- Astrocommunity Git Repository - "AstroNvim/astrocommunity", - + "AstroNvim/astrocommunity", -- default release -- Local plugin development - Astrocommunity fork in ~/project/astrocommunity -- { "AstroNvim/astrocommunity", dev = true }, @@ -59,7 +58,9 @@ return { -- ---------------------------------------------- -- Packs (code-runner, treesitter, lsp & lint/format support) + { import = "astrocommunity.pack.bash" }, { import = "astrocommunity.pack.clojure" }, + { import = "astrocommunity.pack.markdown" }, { import = "astrocommunity.pack.json" }, { import = "astrocommunity.pack.lua" }, -- ---------------------------------------------- diff --git a/lua/lazy_setup.lua b/lua/lazy_setup.lua index 2e53597..e3708d9 100644 --- a/lua/lazy_setup.lua +++ b/lua/lazy_setup.lua @@ -1,7 +1,7 @@ require("lazy").setup({ { "AstroNvim/AstroNvim", - version = "^5", -- Remove version tracking to elect for nightly AstroNvim + version = "^6", -- Remove version tracking to elect for nightly AstroNvim import = "astronvim.plugins", opts = { -- AstroNvim options must be set here with the `import` key mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up diff --git a/lua/plugins/none-ls.lua b/lua/plugins/none-ls.lua deleted file mode 100644 index 3b5e96e..0000000 --- a/lua/plugins/none-ls.lua +++ /dev/null @@ -1,38 +0,0 @@ --- --------------------------------------------------------- --- Configure format & lint tools --- --- Ensure tools are installed via Mason --- Pass configuration files to each tool --- --------------------------------------------------------- - --- if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE - --- INFO: Config in this file skipped if `PRACTICALLI_NONELS_CONFIG` environment variable is not set to true -local nonels_config = vim.env.PRACTICALLI_NONELS_CONFIG -if nonels_config ~= "true" then return {} end - ----@type LazySpec -return { - -- use mason-lspconfig to configure LSP installations - -- use mason-null-ls to configure Formatters/Linter installation for null-ls sources - { - "jay-babu/mason-null-ls.nvim", - -- overrides `require("mason-null-ls").setup(...)` - opts = function(_, opts) - -- add more things to the ensure_installed table protecting against community packs modifying it - opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { - "markdownlint", - -- add more arguments for adding more null-ls sources - }) - opts.handlers = { - markdownlint = function(source_name, methods) - local null_ls = require "null-ls" - null_ls.register(null_ls.builtins.diagnostics.markdownlint.with { - -- extra_args = { "--config", "~/.config/markdownlint.yaml" }, - extra_args = { "--config", "~/.config/markdown-lint.jsonc" }, - }) - end, - } - end, - }, -} diff --git a/lua/plugins/practicalli.lua b/lua/plugins/practicalli.lua index bae86f8..a0300bc 100644 --- a/lua/plugins/practicalli.lua +++ b/lua/plugins/practicalli.lua @@ -90,6 +90,8 @@ return { }, -- ------------------------------------------ + { "nvim-neo-tree/neo-tree.nvim", enabled = false }, + -- ------------------------------------------ -- Editor tools @@ -205,7 +207,8 @@ return { ["[b"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" }, -- snacks file explorer - ["E"] = { "lua Snacks.picker.explorer()", desc = "Snacks Explorer" }, + ["e"] = { "lua Snacks.picker.explorer()", desc = "Snacks Explorer" }, + -- Save prompting for file name ["W"] = { ":write ", desc = "Save as file" },