Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
feat,chore(core): Support nvim-0.8, update packer pinned dependencies…
Browse files Browse the repository at this point in the history
…, add fallback dependencies for 0.7
  • Loading branch information
connorgmeean committed Oct 8, 2022
1 parent 84009cd commit 7d90b56
Show file tree
Hide file tree
Showing 33 changed files with 103 additions and 52 deletions.
32 changes: 27 additions & 5 deletions lua/doom/core/modules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ modules.load_modules = function()
if not doom.modules[dep_section_name][dep_module_name] then
should_enable_module = false
logger.error(
('Doom module "%s.%s" depends on a module that is not enabled "%s.%s". Please enable the %s module.'):format(
(
'Doom module "%s.%s" depends on a module that is not enabled "%s.%s". Please enable the %s module.'
):format(
section_name,
module_name,
dep_section_name,
Expand All @@ -149,11 +151,31 @@ modules.load_modules = function()
packer_spec.config = module.configs[dependency_name]
end

local spec = vim.deepcopy(packer_spec)

-- Set/unset frozen packer dependencies
packer_spec.commit = doom.freeze_dependencies and packer_spec.commit or nil
if type(spec.commit) == "table" then
local last_commit = nil
for version, commit in pairs(spec.commit) do
if version == "latest" then
version = utils.nvim_latest_supported
end

if vim.fn.has(version) == 1 then
last_commit = commit
else
break
end
end
spec.commit = last_commit
end

if not doom.freeze_dependencies then
spec.commit = nil
end

-- Initialise packer
use(packer_spec)
use(spec)
end
end

Expand All @@ -166,7 +188,7 @@ modules.load_modules = function()

if module.cmds then
for _, cmd_spec in ipairs(module.cmds) do
utils.make_cmd(cmd_spec[1], cmd_spec[2])
utils.make_cmd(cmd_spec[1], cmd_spec[2], cmd_spec)
end
end

Expand All @@ -191,7 +213,7 @@ modules.handle_user_config = function()

-- Handle extra user cmds
for _, cmd_spec in pairs(doom.cmds) do
utils.make_cmd(cmd_spec[1], cmd_spec[2])
utils.make_cmd(cmd_spec[1], cmd_spec[2], cmd_spec)
end

-- Handle extra user autocmds
Expand Down
8 changes: 5 additions & 3 deletions lua/doom/modules/core/doom/init.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
local system = require("doom.core.system")

local required = {}

required.settings = {
Expand All @@ -11,12 +13,12 @@ required.packages = {
-- Required by some treesitter modules
["aniseed"] = {
"Olical/aniseed",
commit = "411d81776d996f3d6afee07469ebe58248fe9e36",
commit = "9892a40d4cf970a2916a984544b7f984fc12f55c",
module_pattern = "aniseed",
},
["plenary.nvim"] = {
"nvim-lua/plenary.nvim",
commit = "31807eef4ed574854b8a53ae40ea3292033a78ea",
commit = "4b7e52044bbb84242158d977a50c4cbcd85070c7",
module = "plenary",
},
["popup.nvim"] = {
Expand All @@ -26,7 +28,7 @@ required.packages = {
},
["nvim-web-devicons"] = {
"kyazdani42/nvim-web-devicons",
commit = "2d02a56189e2bde11edd4712fea16f08a6656944",
commit = "a8cf88cbdb5c58e2b658e179c4b2aa997479b3da",
module = "nvim-web-devicons",
},
-- Must include impatient.nvim here, even though it's bootstrapped in
Expand Down
7 changes: 5 additions & 2 deletions lua/doom/modules/core/treesitter/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,16 @@ treesitter.settings = {
treesitter.packages = {
["nvim-treesitter"] = {
"nvim-treesitter/nvim-treesitter",
commit = "d76b0de6536c2461f97cfeca0550f8cb89793935",
commit = {
["nvim-0.7"] = "d76b0de6536c2461f97cfeca0550f8cb89793935",
["latest"] = "b273a06728305c1e7bd0179977ca48049aeff5e6",
},
run = ":TSUpdate",
branch = "master",
},
["nvim-ts-context-commentstring"] = {
"JoosepAlviste/nvim-ts-context-commentstring",
commit = "4befb8936f5cbec3b726300ab29edacb891e1a7b",
commit = "4d3a68c41a53add8804f471fcc49bb398fe8de08",
after = "nvim-treesitter",
},
["nvim-ts-autotag"] = {
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/core/updater/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ local updater = {}
updater.packages = {
["plenary.nvim"] = {
"nvim-lua/plenary.nvim",
commit = "31807eef4ed574854b8a53ae40ea3292033a78ea",
commit = "4b7e52044bbb84242158d977a50c4cbcd85070c7",
module = "plenary",
},
}
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/annotations/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ annotations.settings = {
annotations.packages = {
["neogen"] = {
"danymat/neogen",
commit = "c5a0c39753808faa41dea009d41dd686732c6774",
commit = "967b280d7d7ade52d97d06e868ec4d9a0bc59282",
after = "nvim-treesitter",
},
}
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/auto_install/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ auto_install.packages = {
},
["nvim-lsp-installer"] = {
"williamboman/nvim-lsp-installer",
commit = "ae913cb4fd62d7a84fb1582e11f2e15b4d597123",
commit = "23820a878a5c2415bfd3b971d1fe3c79e4dd6763",
-- disabled = not is_module_enabled("features", "lsp"),
},
}
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/auto_session/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ auto_session.settings = {
auto_session.packages = {
["persistence.nvim"] = {
"folke/persistence.nvim",
commit = "77cf5a6ee162013b97237ff25450080401849f85",
commit = "251e89523dabc94242d4a1f2226fc44a95c29d9e",
module = "persistence",
},
}
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/autopairs/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ autopairs.settings = {
autopairs.packages = {
["nvim-autopairs"] = {
"windwp/nvim-autopairs",
commit = "a7a8be3d2f2473300d070293903ac8b95edeccc1",
commit = "4fc96c8f3df89b6d23e5092d31c866c53a346347",
event = "BufReadPost",
},
}
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/comment/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ comment.settings = {
comment.packages = {
["Comment.nvim"] = {
"numToStr/Comment.nvim",
commit = "7c49fb2ac01a9f03410100c8e78f647bbea857e8",
commit = "98c81efa6ac1946b63eef685c27f8da928d9f4e7",
module = "Comment",
},
}
Expand Down
4 changes: 2 additions & 2 deletions lua/doom/modules/features/dap/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ dap.settings = {
dap.packages = {
["nvim-dap"] = {
"mfussenegger/nvim-dap",
commit = "ad8b0de205a077b66cb301531bdc31c8fc7551b6",
commit = "0b320f5bd4e5f81e8376f9d9681b5c4ee4483c25",
module = "dap",
},
["nvim-dap-ui"] = {
"rcarriga/nvim-dap-ui",
commit = "225115ae986b39fdaffaf715e571dd43b3ac9670",
commit = "1cd4764221c91686dcf4d6b62d7a7b2d112e0b13",
after = { "nvim-dap" },
},
}
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/dashboard/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dashboard.settings = {
dashboard.packages = {
["dashboard-nvim"] = {
"glepnir/dashboard-nvim",
commit = "b7e9f65bb259e52c29770e3c6cca32dd8519c76f",
commit = "1676ebeb334a644dd68f7858f9e993602dd8577c",
cmd = "Dashboard",
opt = true,
},
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/explorer/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ explorer.settings = {
explorer.packages = {
["nvim-tree.lua"] = {
"kyazdani42/nvim-tree.lua",
commit = "09a51266bca28dd87febd63c66bdbd74f7764a63",
commit = "7282f7de8aedf861fe0162a559fc2b214383c51c",
module = "nvim-tree.api",
cmd = {
"NvimTreeClipboard",
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/gitsigns/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ gitsigns.settings = {
gitsigns.packages = {
["gitsigns.nvim"] = {
"lewis6991/gitsigns.nvim",
commit = "f6d93f90bed4f86ef204bb023b3bdea9fd27d7f6",
commit = "9787c94178b4062f30d2f06b6d52984217196647",
},
}

Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/illuminate/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ illuminate.settings = {
illuminate.packages = {
["vim-illuminate"] = {
"RRethy/vim-illuminate",
commit = "27f6ef135a88d9410a33cf92fc47f5c018df552c",
commit = "0603e75fc4ecde1ee5a1b2fc8106ed6704f34d14",
},
}

Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/indentlines/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ indentlines.settings = {
indentlines.packages = {
["indent-blankline.nvim"] = {
"lukas-reineke/indent-blankline.nvim",
commit = "c15bbe9f23d88b5c0b4ca45a446e01a0a3913707",
commit = "db7cbcb40cc00fc5d6074d7569fb37197705e7f6",
event = "ColorScheme",
},
}
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/linter/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ linter.requires_modules = { "features.lsp" }
linter.packages = {
["null-ls.nvim"] = {
"jose-elias-alvarez/null-ls.nvim",
commit = "8914051a3d399e9715833ad76bbf5fe69ea7faf0",
commit = "8be9f4f2aca1cafac1e57234bed202bb274d03ee",
after = "nvim-lspconfig",
},
}
Expand Down
6 changes: 3 additions & 3 deletions lua/doom/modules/features/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ lsp.settings = {
lsp.packages = {
["nvim-lspconfig"] = {
"neovim/nvim-lspconfig",
commit = "da7461b596d70fa47b50bf3a7acfaef94c47727d",
commit = "9d4b8d393aad0e6e9227e2d67629aa99e56b994a",
module = "lspconfig",
},
["nvim-cmp"] = {
"hrsh7th/nvim-cmp",
commit = "b1ebdb0a17daaad13606b802780313a32e59781b",
commit = "0e436ee23abc6c3fe5f3600145d2a413703e7272",
requires = {
"L3MON4D3/LuaSnip",
commit = "53e812a6f51c9d567c98215733100f0169bcc20a",
Expand All @@ -124,7 +124,7 @@ lsp.packages = {
},
["cmp-path"] = {
"hrsh7th/cmp-path",
commit = "447c87cdd6e6d6a1d2488b1d43108bfa217f56e1",
commit = "91ff86cd9c29299a64f968ebb45846c485725f23",
after = "nvim-cmp",
},
["cmp-buffer"] = {
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/lsp_progress/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fidget.settings = {}
fidget.packages = {
["fidget.nvim"] = {
"j-hui/fidget.nvim",
commit = "492492e7d50452a9ace8346d31f6d6da40439f0e",
commit = "1097a86db8ba38e390850dc4035a03ed234a4673",
after = "nvim-lspconfig",
},
}
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/neogit/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ neogit.settings = {}
neogit.packages = {
["neogit"] = {
"TimUntersberger/neogit",
commit = "05386ff1e9da447d4688525d64f7611c863f05ca",
commit = "74c9e29b61780345d3ad9d7a4a4437607caead4a",
cmd = "Neogit",
opt = true,
},
Expand Down
5 changes: 4 additions & 1 deletion lua/doom/modules/features/neorg/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ neorg.settings = {
neorg.packages = {
["neorg"] = {
"nvim-neorg/neorg",
commit = "d93126cfcc2b5f90c063676f8669fed9b0806bcd",
commit = {
["nvim-0.7"] = "d93126cfcc2b5f90c063676f8669fed9b0806bcd",
["latest"] = "07eafea0312379f6adb327cbdb69594108e2dd57",
},
after = "nvim-treesitter",
},
}
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/projects/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ projects.settings = {
projects.packages = {
["project.nvim"] = {
"ahmedkhalf/project.nvim",
commit = "090bb11ee7eb76ebb9d0be1c6060eac4f69a240f",
commit = "628de7e433dd503e782831fe150bb750e56e55d6",
requires = { "nvim-treesitter/nvim-treesitter" },
},
}
Expand Down
5 changes: 3 additions & 2 deletions lua/doom/modules/features/repl/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ repl.settings = {
repl.packages = {
["iron.nvim"] = {
"hkupty/iron.nvim",
commit = "500aae3686b69dac3985e50dfaae074bcc2f2d94",
commit = "d1e80812aacd0c7e1a5c3050596716851d223ce9",
},
}

Expand All @@ -50,8 +50,9 @@ repl.configs = {
local iron = require("iron.core")

local settings = vim.tbl_deep_extend("force", {}, doom.features.repl.settings)

settings.config.repl_open_command =
require("iron.view").curry[settings.config.position](settings.config.size)
require("iron.view")[settings.config.position](settings.config.size)

iron.setup(settings)
end,
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/show_registers/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ show_registers.settings = {}
show_registers.packages = {
["registers.nvim"] = {
"tversteeg/registers.nvim",
commit = "23f9efc71cc7aa42a44df8a2f20f6812f6c54abf",
commit = "29af8cd89822d4eeadbd3410bcb0c6ae1ce83307",
opt = true,
},
}
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/statusline/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ end
statusline.packages = {
["heirline.nvim"] = {
"rebelot/heirline.nvim",
commit = "5b5ef268a80c2c241f16b03268b4498f214ecf66",
commit = "9af77c2531a8e10abebf45817e675ecd1966db02",
},
}

Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/symbols/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ symbols.settings = {
symbols.packages = {
["symbols-outline.nvim"] = {
"simrat39/symbols-outline.nvim",
commit = "e459f3262c4c79a62e654ada0fbbb9758313c968",
commit = "6a3ed24c5631da7a5d418bced57c16b32af7747c",
cmd = {
"SymbolsOutline",
"SymbolsOutlineOpen",
Expand Down
4 changes: 2 additions & 2 deletions lua/doom/modules/features/telescope/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ telescope.settings = {
telescope.packages = {
["telescope.nvim"] = {
"nvim-telescope/telescope.nvim",
commit = "d793de0f12d874c463e81edabee741b802c1a37a",
commit = "76ea9a898d3307244dce3573392dcf2cc38f340f",
cmd = "Telescope",
opt = true,
},
["telescope-file-browser.nvim"] = {
"nvim-telescope/telescope-file-browser.nvim",
commit = "4272c52078cc457dfaabce6fa3545e7495651d04",
commit = "b1bc53e0da3d26f0003ffb9602115ce258411aa5",
cmd = "Telescope browse_files",
key = "<leader>.",
after = "telescope.nvim",
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/terminal/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ terminal.settings = {
terminal.packages = {
["toggleterm.nvim"] = {
"akinsho/toggleterm.nvim",
commit = "62683d927dfd30dc68441a5811fdcb6c9f176c42",
commit = "2a787c426ef00cb3488c11b14f5dcf892bbd0bda",
cmd = { "ToggleTerm", "TermExec" },
opt = true,
},
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/todo_comments/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ todo_comments.settings = {}
todo_comments.packages = {
["todo-comments.nvim"] = {
"folke/todo-comments.nvim",
commit = "98b1ebf198836bdc226c0562b9f906584e6c400e",
commit = "8df75dbb9ddd78a378b9661f25f0b193f38f06dd",
},
}

Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/trouble/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ trouble.settings = {}
trouble.packages = {
["trouble.nvim"] = {
"folke/trouble.nvim",
commit = "da61737d860ddc12f78e638152834487eabf0ee5",
commit = "929315ea5f146f1ce0e784c76c943ece6f36d786",
cmd = { "Trouble", "TroubleClose", "TroubleRefresh", "TroubleToggle" },
opt = true,
},
Expand Down
2 changes: 1 addition & 1 deletion lua/doom/modules/features/whichkey/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ whichkey.settings = {
whichkey.packages = {
["which-key.nvim"] = {
"folke/which-key.nvim",
commit = "bd4411a2ed4dd8bb69c125e339d837028a6eea71",
commit = "6885b669523ff4238de99a7c653d47b081b5506d",
},
}

Expand Down
Loading

0 comments on commit 7d90b56

Please sign in to comment.