├── .luacheckrc ├── .neoconf.json ├── .stylua.toml ├── README.md ├── highlights ├── duskfox.lua └── init.lua ├── init.lua ├── mappings.lua ├── options.lua └── plugins ├── community.lua ├── core.lua ├── mason.lua ├── null-ls.lua ├── treesitter.lua └── user.lua /.luacheckrc: -------------------------------------------------------------------------------- 1 | -- Global objects 2 | globals = { 3 | "astronvim", 4 | "astronvim_installation", 5 | "vim", 6 | "bit", 7 | } 8 | 9 | -- Rerun tests only if their modification time changed 10 | cache = true 11 | 12 | -- Don't report unused self arguments of methods 13 | self = false 14 | 15 | ignore = { 16 | "631", -- max_line_length 17 | "212/_.*", -- unused argument, for vars with "_" prefix 18 | } 19 | -------------------------------------------------------------------------------- /.neoconf.json: -------------------------------------------------------------------------------- 1 | { 2 | "neodev": { 3 | "library": { 4 | "enabled": true, 5 | "plugins": true 6 | } 7 | }, 8 | "neoconf": { 9 | "plugins": { 10 | "lua_ls": { 11 | "enabled": true 12 | } 13 | } 14 | }, 15 | "lspconfig": { 16 | "lua_ls": { 17 | "Lua.format.enable": false 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.stylua.toml: -------------------------------------------------------------------------------- 1 | column_width = 120 2 | line_endings = "Unix" 3 | indent_type = "Spaces" 4 | indent_width = 2 5 | quote_style = "AutoPreferDouble" 6 | call_parentheses = "None" 7 | collapse_simple_statement = "Always" 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # THIS REPOSITORY IS ARCHIVED, OUTDATED, AND NO LONGER VALID 2 | 3 | ## Please refer to the [AstroNvim Documentation](https://docs.astronvim.com/) for the latest instructions 4 | 5 | --- 6 | 7 | # AstroNvim User Configuration Example 8 | 9 | A user configuration template for [AstroNvim](https://github.com/AstroNvim/AstroNvim) 10 | 11 | ## 🛠️ Installation 12 | 13 | #### Make a backup of your current nvim and shared folder 14 | 15 | ```shell 16 | mv ~/.config/nvim ~/.config/nvim.bak 17 | mv ~/.local/share/nvim ~/.local/share/nvim.bak 18 | ``` 19 | 20 | #### Clone AstroNvim 21 | 22 | ```shell 23 | git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim 24 | ``` 25 | 26 | #### Create a new user repository from this template 27 | 28 | Press the "Use this template" button above to create a new repository to store your user configuration. 29 | 30 | You can also just clone this repository directly if you do not want to track your user configuration in GitHub. 31 | 32 | #### Clone the repository 33 | 34 | ```shell 35 | git clone https://github.com// ~/.config/nvim/lua/user 36 | ``` 37 | 38 | #### Start Neovim 39 | 40 | ```shell 41 | nvim 42 | ``` 43 | -------------------------------------------------------------------------------- /highlights/duskfox.lua: -------------------------------------------------------------------------------- 1 | return { -- a table of overrides/changes to the duskfox theme 2 | Normal = { bg = "#000000" }, 3 | } 4 | -------------------------------------------------------------------------------- /highlights/init.lua: -------------------------------------------------------------------------------- 1 | return { -- this table overrides highlights in all themes 2 | -- Normal = { bg = "#000000" }, 3 | } 4 | -------------------------------------------------------------------------------- /init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | -- Configure AstroNvim updates 3 | updater = { 4 | remote = "origin", -- remote to use 5 | channel = "stable", -- "stable" or "nightly" 6 | version = "latest", -- "latest", tag name, or regex search like "v1.*" to only do updates before v2 (STABLE ONLY) 7 | branch = "nightly", -- branch name (NIGHTLY ONLY) 8 | commit = nil, -- commit hash (NIGHTLY ONLY) 9 | pin_plugins = nil, -- nil, true, false (nil will pin plugins on stable only) 10 | skip_prompts = false, -- skip prompts about breaking changes 11 | show_changelog = true, -- show the changelog after performing an update 12 | auto_quit = false, -- automatically quit the current session after a successful update 13 | remotes = { -- easily add new remotes to track 14 | -- ["remote_name"] = "https://remote_url.come/repo.git", -- full remote url 15 | -- ["remote2"] = "github_user/repo", -- GitHub user/repo shortcut, 16 | -- ["remote3"] = "github_user", -- GitHub user assume AstroNvim fork 17 | }, 18 | }, 19 | 20 | -- Set colorscheme to use 21 | colorscheme = "astrodark", 22 | 23 | -- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on 24 | diagnostics = { 25 | virtual_text = true, 26 | underline = true, 27 | }, 28 | 29 | lsp = { 30 | -- customize lsp formatting options 31 | formatting = { 32 | -- control auto formatting on save 33 | format_on_save = { 34 | enabled = true, -- enable or disable format on save globally 35 | allow_filetypes = { -- enable format on save for specified filetypes only 36 | -- "go", 37 | }, 38 | ignore_filetypes = { -- disable format on save for specified filetypes 39 | -- "python", 40 | }, 41 | }, 42 | disabled = { -- disable formatting capabilities for the listed language servers 43 | -- disable lua_ls formatting capability if you want to use StyLua to format your lua code 44 | -- "lua_ls", 45 | }, 46 | timeout_ms = 1000, -- default format timeout 47 | -- filter = function(client) -- fully override the default formatting function 48 | -- return true 49 | -- end 50 | }, 51 | -- enable servers that you already have installed without mason 52 | servers = { 53 | -- "pyright" 54 | }, 55 | }, 56 | 57 | -- Configure require("lazy").setup() options 58 | lazy = { 59 | defaults = { lazy = true }, 60 | performance = { 61 | rtp = { 62 | -- customize default disabled vim plugins 63 | disabled_plugins = { "tohtml", "gzip", "matchit", "zipPlugin", "netrwPlugin", "tarPlugin" }, 64 | }, 65 | }, 66 | }, 67 | 68 | -- This function is run last and is a good place to configuring 69 | -- augroups/autocommands and custom filetypes also this just pure lua so 70 | -- anything that doesn't fit in the normal config locations above can go here 71 | polish = function() 72 | -- Set up custom filetypes 73 | -- vim.filetype.add { 74 | -- extension = { 75 | -- foo = "fooscript", 76 | -- }, 77 | -- filename = { 78 | -- ["Foofile"] = "fooscript", 79 | -- }, 80 | -- pattern = { 81 | -- ["~/%.config/foo/.*"] = "fooscript", 82 | -- }, 83 | -- } 84 | end, 85 | } 86 | -------------------------------------------------------------------------------- /mappings.lua: -------------------------------------------------------------------------------- 1 | -- Mapping data with "desc" stored directly by vim.keymap.set(). 2 | -- 3 | -- Please use this mappings table to set keyboard mapping since this is the 4 | -- lower level configuration and more robust one. (which-key will 5 | -- automatically pick-up stored data by this setting.) 6 | return { 7 | -- first key is the mode 8 | n = { 9 | -- second key is the lefthand side of the map 10 | 11 | -- navigate buffer tabs with `H` and `L` 12 | -- L = { 13 | -- function() require("astronvim.utils.buffer").nav(vim.v.count > 0 and vim.v.count or 1) end, 14 | -- desc = "Next buffer", 15 | -- }, 16 | -- H = { 17 | -- function() require("astronvim.utils.buffer").nav(-(vim.v.count > 0 and vim.v.count or 1)) end, 18 | -- desc = "Previous buffer", 19 | -- }, 20 | 21 | -- mappings seen under group name "Buffer" 22 | ["bD"] = { 23 | function() 24 | require("astronvim.utils.status").heirline.buffer_picker( 25 | function(bufnr) require("astronvim.utils.buffer").close(bufnr) end 26 | ) 27 | end, 28 | desc = "Pick to close", 29 | }, 30 | -- tables with the `name` key will be registered with which-key if it's installed 31 | -- this is useful for naming menus 32 | ["b"] = { name = "Buffers" }, 33 | -- quick save 34 | -- [""] = { ":w!", desc = "Save File" }, -- change description but the same command 35 | }, 36 | t = { 37 | -- setting a mapping to false will disable it 38 | -- [""] = false, 39 | }, 40 | } 41 | -------------------------------------------------------------------------------- /options.lua: -------------------------------------------------------------------------------- 1 | -- set vim options here (vim.. = value) 2 | return { 3 | opt = { 4 | -- set to true or false etc. 5 | relativenumber = true, -- sets vim.opt.relativenumber 6 | number = true, -- sets vim.opt.number 7 | spell = false, -- sets vim.opt.spell 8 | signcolumn = "auto", -- sets vim.opt.signcolumn to auto 9 | wrap = false, -- sets vim.opt.wrap 10 | }, 11 | g = { 12 | mapleader = " ", -- sets vim.g.mapleader 13 | autoformat_enabled = true, -- enable or disable auto formatting at start (lsp.formatting.format_on_save must be enabled) 14 | cmp_enabled = true, -- enable completion at start 15 | autopairs_enabled = true, -- enable autopairs at start 16 | diagnostics_mode = 3, -- set the visibility of diagnostics in the UI (0=off, 1=only show in status line, 2=virtual text off, 3=all on) 17 | icons_enabled = true, -- disable icons in the UI (disable if no nerd font is available, requires :PackerSync after changing) 18 | ui_notifications_enabled = true, -- disable notifications when toggling UI elements 19 | resession_enabled = false, -- enable experimental resession.nvim session management (will be default in AstroNvim v4) 20 | }, 21 | } 22 | -- If you need more control, you can use the function()...end notation 23 | -- return function(local_vim) 24 | -- local_vim.opt.relativenumber = true 25 | -- local_vim.g.mapleader = " " 26 | -- local_vim.opt.whichwrap = vim.opt.whichwrap - { 'b', 's' } -- removing option from list 27 | -- local_vim.opt.shortmess = vim.opt.shortmess + { I = true } -- add to option list 28 | -- 29 | -- return local_vim 30 | -- end 31 | -------------------------------------------------------------------------------- /plugins/community.lua: -------------------------------------------------------------------------------- 1 | return { 2 | -- Add the community repository of plugin specifications 3 | "AstroNvim/astrocommunity", 4 | -- example of importing a plugin, comment out to use it or add your own 5 | -- available plugins can be found at https://github.com/AstroNvim/astrocommunity 6 | 7 | -- { import = "astrocommunity.colorscheme.catppuccin" }, 8 | -- { import = "astrocommunity.completion.copilot-lua-cmp" }, 9 | } 10 | -------------------------------------------------------------------------------- /plugins/core.lua: -------------------------------------------------------------------------------- 1 | return { 2 | -- customize alpha options 3 | { 4 | "goolord/alpha-nvim", 5 | opts = function(_, opts) 6 | -- customize the dashboard header 7 | opts.section.header.val = { 8 | " █████ ███████ ████████ ██████ ██████", 9 | "██ ██ ██ ██ ██ ██ ██ ██", 10 | "███████ ███████ ██ ██████ ██ ██", 11 | "██ ██ ██ ██ ██ ██ ██ ██", 12 | "██ ██ ███████ ██ ██ ██ ██████", 13 | " ", 14 | " ███  ██ ██  ██ ██ ███  ███", 15 | " ████  ██ ██  ██ ██ ████  ████", 16 | " ██ ██  ██ ██  ██ ██ ██ ████ ██", 17 | " ██  ██ ██  ██  ██  ██ ██  ██  ██", 18 | " ██   ████   ████   ██ ██      ██", 19 | } 20 | return opts 21 | end, 22 | }, 23 | -- You can disable default plugins as follows: 24 | -- { "max397574/better-escape.nvim", enabled = false }, 25 | -- 26 | -- You can also easily customize additional setup of plugins that is outside of the plugin's setup call 27 | -- { 28 | -- "L3MON4D3/LuaSnip", 29 | -- config = function(plugin, opts) 30 | -- require "plugins.configs.luasnip"(plugin, opts) -- include the default astronvim config that calls the setup call 31 | -- -- add more custom luasnip configuration such as filetype extend or custom snippets 32 | -- local luasnip = require "luasnip" 33 | -- luasnip.filetype_extend("javascript", { "javascriptreact" }) 34 | -- end, 35 | -- }, 36 | -- { 37 | -- "windwp/nvim-autopairs", 38 | -- config = function(plugin, opts) 39 | -- require "plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call 40 | -- -- add more custom autopairs configuration such as custom rules 41 | -- local npairs = require "nvim-autopairs" 42 | -- local Rule = require "nvim-autopairs.rule" 43 | -- local cond = require "nvim-autopairs.conds" 44 | -- npairs.add_rules( 45 | -- { 46 | -- Rule("$", "$", { "tex", "latex" }) 47 | -- -- don't add a pair if the next character is % 48 | -- :with_pair(cond.not_after_regex "%%") 49 | -- -- don't add a pair if the previous character is xxx 50 | -- :with_pair( 51 | -- cond.not_before_regex("xxx", 3) 52 | -- ) 53 | -- -- don't move right when repeat character 54 | -- :with_move(cond.none()) 55 | -- -- don't delete if the next character is xx 56 | -- :with_del(cond.not_after_regex "xx") 57 | -- -- disable adding a newline when you press 58 | -- :with_cr(cond.none()), 59 | -- }, 60 | -- -- disable for .vim files, but it work for another filetypes 61 | -- Rule("a", "a", "-vim") 62 | -- ) 63 | -- end, 64 | -- }, 65 | -- By adding to the which-key config and using our helper function you can add more which-key registered bindings 66 | -- { 67 | -- "folke/which-key.nvim", 68 | -- config = function(plugin, opts) 69 | -- require "plugins.configs.which-key"(plugin, opts) -- include the default astronvim config that calls the setup call 70 | -- -- Add bindings which show up as group name 71 | -- local wk = require "which-key" 72 | -- wk.register({ 73 | -- b = { name = "Buffer" }, 74 | -- }, { mode = "n", prefix = "" }) 75 | -- end, 76 | -- }, 77 | } 78 | -------------------------------------------------------------------------------- /plugins/mason.lua: -------------------------------------------------------------------------------- 1 | -- customize mason plugins 2 | return { 3 | -- use mason-lspconfig to configure LSP installations 4 | { 5 | "williamboman/mason-lspconfig.nvim", 6 | -- overrides `require("mason-lspconfig").setup(...)` 7 | opts = function(_, opts) 8 | -- add more things to the ensure_installed table protecting against community packs modifying it 9 | opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, { 10 | -- "lua_ls", 11 | }) 12 | end, 13 | }, 14 | -- use mason-null-ls to configure Formatters/Linter installation for null-ls sources 15 | { 16 | "jay-babu/mason-null-ls.nvim", 17 | -- overrides `require("mason-null-ls").setup(...)` 18 | opts = function(_, opts) 19 | -- add more things to the ensure_installed table protecting against community packs modifying it 20 | opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, { 21 | -- "prettier", 22 | -- "stylua", 23 | }) 24 | end, 25 | }, 26 | { 27 | "jay-babu/mason-nvim-dap.nvim", 28 | -- overrides `require("mason-nvim-dap").setup(...)` 29 | opts = function(_, opts) 30 | -- add more things to the ensure_installed table protecting against community packs modifying it 31 | opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, { 32 | -- "python", 33 | }) 34 | end, 35 | }, 36 | } 37 | -------------------------------------------------------------------------------- /plugins/null-ls.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "jose-elias-alvarez/null-ls.nvim", 3 | opts = function(_, config) 4 | -- config variable is the default configuration table for the setup function call 5 | -- local null_ls = require "null-ls" 6 | 7 | -- Check supported formatters and linters 8 | -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting 9 | -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics 10 | config.sources = { 11 | -- Set a formatter 12 | -- null_ls.builtins.formatting.stylua, 13 | -- null_ls.builtins.formatting.prettier, 14 | } 15 | return config -- return final config table 16 | end, 17 | } 18 | -------------------------------------------------------------------------------- /plugins/treesitter.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "nvim-treesitter/nvim-treesitter", 3 | opts = function(_, opts) 4 | -- add more things to the ensure_installed table protecting against community packs modifying it 5 | opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, { 6 | -- "lua" 7 | }) 8 | end, 9 | } 10 | -------------------------------------------------------------------------------- /plugins/user.lua: -------------------------------------------------------------------------------- 1 | return { 2 | -- You can also add new plugins here as well: 3 | -- Add plugins, the lazy syntax 4 | -- "andweeb/presence.nvim", 5 | -- { 6 | -- "ray-x/lsp_signature.nvim", 7 | -- event = "BufRead", 8 | -- config = function() 9 | -- require("lsp_signature").setup() 10 | -- end, 11 | -- }, 12 | } 13 | --------------------------------------------------------------------------------