Switch nvim to astronvim
This commit is contained in:
		
							parent
							
								
									a1d2535956
								
							
						
					
					
						commit
						6ec64f09c8
					
				
					 31 changed files with 414 additions and 319 deletions
				
			
		
							
								
								
									
										9
									
								
								.config/astronvim/lua/user/plugins/community.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								.config/astronvim/lua/user/plugins/community.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,9 @@
 | 
			
		|||
return {
 | 
			
		||||
  -- Add the community repository of plugin specifications
 | 
			
		||||
  "AstroNvim/astrocommunity",
 | 
			
		||||
  -- example of importing a plugin, comment out to use it or add your own
 | 
			
		||||
  -- available plugins can be found at https://github.com/AstroNvim/astrocommunity
 | 
			
		||||
 | 
			
		||||
  { import = "astrocommunity.colorscheme.dracula-nvim" },
 | 
			
		||||
  -- { import = "astrocommunity.completion.copilot-lua-cmp" },
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										77
									
								
								.config/astronvim/lua/user/plugins/core.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								.config/astronvim/lua/user/plugins/core.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,77 @@
 | 
			
		|||
return {
 | 
			
		||||
  -- customize alpha options
 | 
			
		||||
  {
 | 
			
		||||
    "goolord/alpha-nvim",
 | 
			
		||||
    opts = function(_, opts)
 | 
			
		||||
      -- customize the dashboard header
 | 
			
		||||
      opts.section.header.val = {
 | 
			
		||||
        " █████  ███████ ████████ ██████   ██████",
 | 
			
		||||
        "██   ██ ██         ██    ██   ██ ██    ██",
 | 
			
		||||
        "███████ ███████    ██    ██████  ██    ██",
 | 
			
		||||
        "██   ██      ██    ██    ██   ██ ██    ██",
 | 
			
		||||
        "██   ██ ███████    ██    ██   ██  ██████",
 | 
			
		||||
        " ",
 | 
			
		||||
        "    ███    ██ ██    ██ ██ ███    ███",
 | 
			
		||||
        "    ████   ██ ██    ██ ██ ████  ████",
 | 
			
		||||
        "    ██ ██  ██ ██    ██ ██ ██ ████ ██",
 | 
			
		||||
        "    ██  ██ ██  ██  ██  ██ ██  ██  ██",
 | 
			
		||||
        "    ██   ████   ████   ██ ██      ██",
 | 
			
		||||
      }
 | 
			
		||||
      return opts
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
  -- 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)
 | 
			
		||||
  --     require "plugins.configs.luasnip"(plugin, 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)
 | 
			
		||||
  --     require "plugins.configs.nvim-autopairs"(plugin, 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)
 | 
			
		||||
  --     require "plugins.configs.which-key"(plugin, opts) -- include the default astronvim config that calls the setup call
 | 
			
		||||
  --     -- Add bindings which show up as group name
 | 
			
		||||
  --     local wk = require "which-key"
 | 
			
		||||
  --     wk.register({
 | 
			
		||||
  --       b = { name = "Buffer" },
 | 
			
		||||
  --     }, { mode = "n", prefix = "<leader>" })
 | 
			
		||||
  --   end,
 | 
			
		||||
  -- },
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										36
									
								
								.config/astronvim/lua/user/plugins/mason.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								.config/astronvim/lua/user/plugins/mason.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,36 @@
 | 
			
		|||
-- customize mason plugins
 | 
			
		||||
return {
 | 
			
		||||
  -- use mason-lspconfig to configure LSP installations
 | 
			
		||||
  {
 | 
			
		||||
    "williamboman/mason-lspconfig.nvim",
 | 
			
		||||
    -- overrides `require("mason-lspconfig").setup(...)`
 | 
			
		||||
    opts = function(_, opts)
 | 
			
		||||
      -- add more things to the ensure_installed table protecting against community packs modifying it
 | 
			
		||||
      opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, {
 | 
			
		||||
        -- "lua_ls",
 | 
			
		||||
      })
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
  -- 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("astronvim.utils").list_insert_unique(opts.ensure_installed, {
 | 
			
		||||
        -- "prettier",
 | 
			
		||||
        -- "stylua",
 | 
			
		||||
      })
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "jay-babu/mason-nvim-dap.nvim",
 | 
			
		||||
    -- overrides `require("mason-nvim-dap").setup(...)`
 | 
			
		||||
    opts = function(_, opts)
 | 
			
		||||
      -- add more things to the ensure_installed table protecting against community packs modifying it
 | 
			
		||||
      opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, {
 | 
			
		||||
        -- "python",
 | 
			
		||||
      })
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										17
									
								
								.config/astronvim/lua/user/plugins/null-ls.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								.config/astronvim/lua/user/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,
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										9
									
								
								.config/astronvim/lua/user/plugins/treesitter.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								.config/astronvim/lua/user/plugins/treesitter.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,9 @@
 | 
			
		|||
return {
 | 
			
		||||
  "nvim-treesitter/nvim-treesitter",
 | 
			
		||||
  opts = function(_, opts)
 | 
			
		||||
    -- add more things to the ensure_installed table protecting against community packs modifying it
 | 
			
		||||
    opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, {
 | 
			
		||||
      -- "lua"
 | 
			
		||||
    })
 | 
			
		||||
  end,
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										12
									
								
								.config/astronvim/lua/user/plugins/user.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								.config/astronvim/lua/user/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,
 | 
			
		||||
  -- },
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue