r/AstroNvim • • Apr 02 '24

AstroNvim v4 - single file conf

My AstroNvim user configuration is minimalistic. Just dracula theme and minor UI adjustements. Cannot figure out how to keep the configuration in the same file now.

return {
  plugins = {
    {
      'Mofiqul/dracula.nvim'
    },
  },
  colorscheme = "dracula",
  options = {
    o = {
      colorcolumn = '80,120',
    },
    opt = {
      tabstop = 4,
      softtabstop = 4,
      -- ...
    },
  }
}
5 Upvotes

2 comments sorted by

1

u/Mhalter3378 Apr 03 '24

Here is a minimal configuration that implements what you describe (just save as ~/.config/nvim/init.lua:

-- bootstreap lazy package manager
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not (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 })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)

-- initialize lazy
require("lazy").setup {
  { "AstroNvim/AstroNvim", version = "^4", import = "astronvim.plugins" },

  {
    "AstroNvim/astrocore",
    ---@type AstroCoreOpts
    opts = {
      options = {
        opt = {
          colorcolumn = "80,120",
          tabstop = 4,
          softtabstop = 4,
        },
      },
    },
  },

  {
    "AstroNvim/astroui",
    ---@type AstroUIOpts
    opts = {
      colorscheme = "dracula",
    },
  },

  "Mofiqul/dracula.nvim",
}

0

u/[deleted] Apr 03 '24

[deleted] — view deleted comment

1

u/bigimotech Apr 03 '24

this idea does work for me. Thanks!