diff --git a/dot_config/astronvim/lua/user/init.lua b/dot_config/astronvim/lua/user/init.lua index a9d13c8..223e7de 100644 --- a/dot_config/astronvim/lua/user/init.lua +++ b/dot_config/astronvim/lua/user/init.lua @@ -40,7 +40,8 @@ return { }, }, disabled = { -- disable formatting capabilities for the listed language servers - -- "sumneko_lua", + -- disable lua_ls formatting capability if you want to use StyLua to format your lua code + -- "lua_ls", }, timeout_ms = 1000, -- default format timeout -- filter = function(client) -- fully override the default formatting function @@ -81,4 +82,4 @@ return { -- }, -- } end, -} +} \ No newline at end of file diff --git a/dot_config/astronvim/lua/user/mappings.lua b/dot_config/astronvim/lua/user/mappings.lua index d87f7de..049ce40 100644 --- a/dot_config/astronvim/lua/user/mappings.lua +++ b/dot_config/astronvim/lua/user/mappings.lua @@ -7,11 +7,23 @@ return { -- first key is the mode n = { -- second key is the lefthand side of the map + + -- navigate buffer tabs with `H` and `L` + -- L = { + -- function() require("astronvim.utils.buffer").nav(vim.v.count > 0 and vim.v.count or 1) end, + -- desc = "Next buffer", + -- }, + -- H = { + -- function() require("astronvim.utils.buffer").nav(-(vim.v.count > 0 and vim.v.count or 1)) end, + -- desc = "Previous buffer", + -- }, + -- mappings seen under group name "Buffer" - ["bn"] = { "tabnew", desc = "New tab" }, ["bD"] = { function() - require("astronvim.utils.status").heirline.buffer_picker(function(bufnr) require("astronvim.utils.buffer").close(bufnr) end) + require("astronvim.utils.status").heirline.buffer_picker( + function(bufnr) require("astronvim.utils.buffer").close(bufnr) end + ) end, desc = "Pick to close", }, @@ -25,4 +37,4 @@ return { -- setting a mapping to false will disable it -- [""] = false, }, -} +} \ No newline at end of file diff --git a/dot_config/astronvim/lua/user/options.lua b/dot_config/astronvim/lua/user/options.lua index 18deac7..297688a 100644 --- a/dot_config/astronvim/lua/user/options.lua +++ b/dot_config/astronvim/lua/user/options.lua @@ -16,6 +16,7 @@ return { 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) icons_enabled = true, -- disable icons in the UI (disable if no nerd font is available, requires :PackerSync after changing) ui_notifications_enabled = true, -- disable notifications when toggling UI elements + resession_enabled = false, -- enable experimental resession.nvim session management (will be default in AstroNvim v4) }, } -- If you need more control, you can use the function()...end notation @@ -26,4 +27,4 @@ return { -- local_vim.opt.shortmess = vim.opt.shortmess + { I = true } -- add to option list -- -- return local_vim --- end +-- end \ No newline at end of file diff --git a/dot_config/astronvim/lua/user/plugins/community.lua b/dot_config/astronvim/lua/user/plugins/community.lua index 6918be5..483de73 100644 --- a/dot_config/astronvim/lua/user/plugins/community.lua +++ b/dot_config/astronvim/lua/user/plugins/community.lua @@ -1,7 +1,7 @@ return { -- Add the community repository of plugin specifications "AstroNvim/astrocommunity", - -- example of imporing a plugin, comment out to use it or add your own + -- 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.catppuccin" }, diff --git a/dot_config/astronvim/lua/user/plugins/mason.lua b/dot_config/astronvim/lua/user/plugins/mason.lua index 9018347..3a47b57 100644 --- a/dot_config/astronvim/lua/user/plugins/mason.lua +++ b/dot_config/astronvim/lua/user/plugins/mason.lua @@ -4,23 +4,33 @@ return { { "williamboman/mason-lspconfig.nvim", -- overrides `require("mason-lspconfig").setup(...)` - opts = { - -- ensure_installed = { "lua_ls" }, - }, + 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 = { - -- ensure_installed = { "prettier", "stylua" }, - }, + 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 = { - -- ensure_installed = { "python" }, - }, + 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, }, -} +} \ No newline at end of file diff --git a/dot_config/astronvim/lua/user/plugins/null-ls.lua b/dot_config/astronvim/lua/user/plugins/null-ls.lua index beceeda..9180ee8 100644 --- a/dot_config/astronvim/lua/user/plugins/null-ls.lua +++ b/dot_config/astronvim/lua/user/plugins/null-ls.lua @@ -14,4 +14,4 @@ return { } return config -- return final config table end, -} +} \ No newline at end of file diff --git a/dot_config/astronvim/lua/user/plugins/treesitter.lua b/dot_config/astronvim/lua/user/plugins/treesitter.lua index 092d7a8..b4f45ac 100644 --- a/dot_config/astronvim/lua/user/plugins/treesitter.lua +++ b/dot_config/astronvim/lua/user/plugins/treesitter.lua @@ -1,6 +1,9 @@ return { "nvim-treesitter/nvim-treesitter", - opts = { - -- ensure_installed = { "lua" }, - }, -} + 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, +} \ No newline at end of file