feat: initial push with a fully separated and organized user configuration for AstroNvim v3
This commit is contained in:
		
							
								
								
									
										21
									
								
								plugins/alpha.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								plugins/alpha.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
-- customize alpha options
 | 
			
		||||
return {
 | 
			
		||||
  "goolord/alpha-nvim",
 | 
			
		||||
  opts = function(_, opts)
 | 
			
		||||
    -- customize the dashboard header
 | 
			
		||||
    opts.section.header.val = {
 | 
			
		||||
      " █████  ███████ ████████ ██████   ██████",
 | 
			
		||||
      "██   ██ ██         ██    ██   ██ ██    ██",
 | 
			
		||||
      "███████ ███████    ██    ██████  ██    ██",
 | 
			
		||||
      "██   ██      ██    ██    ██   ██ ██    ██",
 | 
			
		||||
      "██   ██ ███████    ██    ██   ██  ██████",
 | 
			
		||||
      " ",
 | 
			
		||||
      "    ███    ██ ██    ██ ██ ███    ███",
 | 
			
		||||
      "    ████   ██ ██    ██ ██ ████  ████",
 | 
			
		||||
      "    ██ ██  ██ ██    ██ ██ ██ ████ ██",
 | 
			
		||||
      "    ██  ██ ██  ██  ██  ██ ██  ██  ██",
 | 
			
		||||
      "    ██   ████   ████   ██ ██      ██",
 | 
			
		||||
    }
 | 
			
		||||
    return opts
 | 
			
		||||
  end,
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										56
									
								
								plugins/core.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								plugins/core.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,56 @@
 | 
			
		||||
return {
 | 
			
		||||
  -- You can disable default plugins as follows:
 | 
			
		||||
  -- { "max397574/better-escape.nvim", enabled = false },
 | 
			
		||||
  --
 | 
			
		||||
  -- You can also easily customize additional setup of plugins that is outside of the plugin's setup call
 | 
			
		||||
  -- {
 | 
			
		||||
  --   "L3MON4D3/LuaSnip",
 | 
			
		||||
  --   config = function(plugin, opts)
 | 
			
		||||
  --     plugin.default_config(opts) -- include the default astronvim config that calls the setup call
 | 
			
		||||
  --     -- add more custom luasnip configuration such as filetype extend or custom snippets
 | 
			
		||||
  --     local luasnip = require "luasnip"
 | 
			
		||||
  --     luasnip.filetype_extend("javascript", { "javascriptreact" })
 | 
			
		||||
  --   end,
 | 
			
		||||
  -- },
 | 
			
		||||
  -- {
 | 
			
		||||
  --   "windwp/nvim-autopairs",
 | 
			
		||||
  --   config = function(plugin, opts)
 | 
			
		||||
  --     plugin.default_config(opts) -- include the default astronvim config that calls the setup call
 | 
			
		||||
  --     -- add more custom autopairs configuration such as custom rules
 | 
			
		||||
  --     local npairs = require "nvim-autopairs"
 | 
			
		||||
  --     local Rule = require "nvim-autopairs.rule"
 | 
			
		||||
  --     local cond = require "nvim-autopairs.conds"
 | 
			
		||||
  --     npairs.add_rules(
 | 
			
		||||
  --       {
 | 
			
		||||
  --         Rule("$", "$", { "tex", "latex" })
 | 
			
		||||
  --           -- don't add a pair if the next character is %
 | 
			
		||||
  --           :with_pair(cond.not_after_regex "%%")
 | 
			
		||||
  --           -- don't add a pair if  the previous character is xxx
 | 
			
		||||
  --           :with_pair(
 | 
			
		||||
  --             cond.not_before_regex("xxx", 3)
 | 
			
		||||
  --           )
 | 
			
		||||
  --           -- don't move right when repeat character
 | 
			
		||||
  --           :with_move(cond.none())
 | 
			
		||||
  --           -- don't delete if the next character is xx
 | 
			
		||||
  --           :with_del(cond.not_after_regex "xx")
 | 
			
		||||
  --           -- disable adding a newline when you press <cr>
 | 
			
		||||
  --           :with_cr(cond.none()),
 | 
			
		||||
  --       },
 | 
			
		||||
  --       -- disable for .vim files, but it work for another filetypes
 | 
			
		||||
  --       Rule("a", "a", "-vim")
 | 
			
		||||
  --     )
 | 
			
		||||
  --   end,
 | 
			
		||||
  -- },
 | 
			
		||||
  -- By adding to the which-key config and using our helper function you can add more which-key registered bindings
 | 
			
		||||
  -- {
 | 
			
		||||
  --   "folke/which-key.nvim",
 | 
			
		||||
  --   config = function(plugin, opts)
 | 
			
		||||
  --     plugin.default_config(opts)
 | 
			
		||||
  --     -- Add bindings which show up as group name
 | 
			
		||||
  --     local wk = require "which-key"
 | 
			
		||||
  --     wk.register({
 | 
			
		||||
  --       b = { name = "Buffer" },
 | 
			
		||||
  --     }, { mode = "n", prefix = "<leader>" })
 | 
			
		||||
  --   end,
 | 
			
		||||
  -- },
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										17
									
								
								plugins/null-ls.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								plugins/null-ls.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,17 @@
 | 
			
		||||
return {
 | 
			
		||||
  "jose-elias-alvarez/null-ls.nvim",
 | 
			
		||||
  opts = function(_, config)
 | 
			
		||||
    -- config variable is the default configuration table for the setup function call
 | 
			
		||||
    -- local null_ls = require "null-ls"
 | 
			
		||||
 | 
			
		||||
    -- Check supported formatters and linters
 | 
			
		||||
    -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
 | 
			
		||||
    -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
 | 
			
		||||
    config.sources = {
 | 
			
		||||
      -- Set a formatter
 | 
			
		||||
      -- null_ls.builtins.formatting.stylua,
 | 
			
		||||
      -- null_ls.builtins.formatting.prettier,
 | 
			
		||||
    }
 | 
			
		||||
    return config -- return final config table
 | 
			
		||||
  end,
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										6
									
								
								plugins/treesitter.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								plugins/treesitter.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
return {
 | 
			
		||||
  "nvim-treesitter/nvim-treesitter",
 | 
			
		||||
  opts = {
 | 
			
		||||
    -- ensure_installed = { "lua" },
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										12
									
								
								plugins/user.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								plugins/user.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
return {
 | 
			
		||||
  -- You can also add new plugins here as well:
 | 
			
		||||
  -- Add plugins, the lazy syntax
 | 
			
		||||
  -- "andweeb/presence.nvim",
 | 
			
		||||
  -- {
 | 
			
		||||
  --   "ray-x/lsp_signature.nvim",
 | 
			
		||||
  --   event = "BufRead",
 | 
			
		||||
  --   config = function()
 | 
			
		||||
  --     require("lsp_signature").setup()
 | 
			
		||||
  --   end,
 | 
			
		||||
  -- },
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user