Browse Source

refact: Renamed `.uses` to `.packages` for consistency.

my-config
connorgmeean 3 years ago
parent
commit
b72611c639
  1. 4
      README.md
  2. 16
      docs/modules.md
  3. 6
      lua/doom/core/config/init.lua
  4. 2
      lua/doom/modules/core/doom/init.lua
  5. 2
      lua/doom/modules/core/nest/init.lua
  6. 2
      lua/doom/modules/core/treesitter/init.lua
  7. 2
      lua/doom/modules/features/annotations/init.lua
  8. 2
      lua/doom/modules/features/auto_install/init.lua
  9. 2
      lua/doom/modules/features/auto_session/init.lua
  10. 2
      lua/doom/modules/features/autopairs/init.lua
  11. 2
      lua/doom/modules/features/colorizer/init.lua
  12. 2
      lua/doom/modules/features/comment/init.lua
  13. 2
      lua/doom/modules/features/dap/init.lua
  14. 2
      lua/doom/modules/features/dashboard/init.lua
  15. 2
      lua/doom/modules/features/doom_reloader/init.lua
  16. 2
      lua/doom/modules/features/doom_themes/init.lua
  17. 2
      lua/doom/modules/features/editorconfig/init.lua
  18. 2
      lua/doom/modules/features/explorer/init.lua
  19. 2
      lua/doom/modules/features/firenvim/init.lua
  20. 2
      lua/doom/modules/features/gitsigns/init.lua
  21. 2
      lua/doom/modules/features/illuminate/init.lua
  22. 2
      lua/doom/modules/features/indentlines/init.lua
  23. 2
      lua/doom/modules/features/lazygit/init.lua
  24. 2
      lua/doom/modules/features/linter/init.lua
  25. 2
      lua/doom/modules/features/lsp/init.lua
  26. 2
      lua/doom/modules/features/lsp_progress/init.lua
  27. 2
      lua/doom/modules/features/minimap/init.lua
  28. 2
      lua/doom/modules/features/neogit/init.lua
  29. 2
      lua/doom/modules/features/neorg/init.lua
  30. 2
      lua/doom/modules/features/projects/init.lua
  31. 2
      lua/doom/modules/features/range_highlight/init.lua
  32. 2
      lua/doom/modules/features/ranger/init.lua
  33. 2
      lua/doom/modules/features/restclient/init.lua
  34. 2
      lua/doom/modules/features/show_registers/init.lua
  35. 2
      lua/doom/modules/features/snippets/init.lua
  36. 2
      lua/doom/modules/features/statusline/init.lua
  37. 2
      lua/doom/modules/features/statusline2/init.lua
  38. 2
      lua/doom/modules/features/suda/init.lua
  39. 2
      lua/doom/modules/features/superman/init.lua
  40. 2
      lua/doom/modules/features/symbols/init.lua
  41. 2
      lua/doom/modules/features/tabline/init.lua
  42. 2
      lua/doom/modules/features/telescope/init.lua
  43. 2
      lua/doom/modules/features/terminal/init.lua
  44. 2
      lua/doom/modules/features/todo_comments/init.lua
  45. 2
      lua/doom/modules/features/trouble/init.lua
  46. 2
      lua/doom/modules/features/whichkey/init.lua
  47. 2
      lua/doom/modules/features/zen/init.lua
  48. 8
      lua/doom/modules/init.lua
  49. 2
      lua/doom/modules/langs/config/init.lua
  50. 2
      lua/doom/modules/langs/lua/init.lua
  51. 2
      lua/user/modules/char_counter/init.lua

4
README.md

@ -208,10 +208,10 @@ whichkey.autocmds = {
}
-- Modify the plugin source repo, plugins are indexed via the repository name.
whichkey.uses["which-key.nvim"] = {
whichkey.packages["which-key.nvim"] = {
"myfork/which-key.nvim"
}
-- Provide a different config function, the key has to match the entry in `whichkey.uses`
-- Provide a different config function, the key has to match the entry in `whichkey.packages`
whichkey.configs["which-key.nvim"] = function ()
local wk = require("which-key")
end

16
docs/modules.md

@ -116,7 +116,7 @@ local comment_module = doom.modules.comment
-- Override default settings (provided by doom-nvim)
comment_module.settings.padding = false
-- Override package source with a fork
comment_module.uses['Comment.nvim'] = {
comment_module.packages['Comment.nvim'] = {
'my_fork/Comment.nvim',
module = "Comment"
}
@ -182,7 +182,7 @@ These are the possible values a
```lua
module.settings: table -- Table of settings that can be tweaked
module.uses: table<string,table<PackerSpec>> -- Table of packer specs
module.packages: table<string,table<PackerSpec>> -- Table of packer specs
module.configs: table<string,function> -- Table of plugin config functions relating to the packer specs
module.binds: table<NestConfig>|function -> table<NestConfig> -- Table of NestConfig or function that returns Table of NestConfig
module.autocmds: table<AutoCmd>|function -> table<AutoCmd> -- Table of AutoCmds (see below) or function that returns a table of AutoCmds
@ -194,7 +194,7 @@ local module = {}
module.settings = {...} -- Doom-nvim provided object to change settings
-- Stores the packer.nvim config for all of the plugin dependencies
module.uses = {
module.packages = {
["example-plugin.nvim"] = { -- Use the repository name as the key
"GithubUser/example-plugin.nvim",
commit = "..." -- We like to pin plugins to commits to avoid issues upgrading.
@ -202,7 +202,7 @@ module.uses = {
}
module.configs = {
["example-plugin.nvim"] = function() -- key matches `module.uses` entry
["example-plugin.nvim"] = function() -- key matches `module.packages` entry
require('example-plugin').setup( doom.modules.example.settings ) -- Consumes `module.settings` and uses it to config the plugin
end
}
@ -409,9 +409,9 @@ char_counter.binds = {
### 7. Adding and lazyloading a plugin
Plugins are added using the `module.uses` field and are configured using the `module.configs` field.
Plugins are added using the `module.packages` field and are configured using the `module.configs` field.
We use the repository name as a key to connect the plugin to its config function.
The API for `module.uses` is passed to Packer nvim's use function. [DOCS](https://github.com/wbthomason/packer.nvim#specifying-plugins)
The API for `module.packages` is passed to Packer nvim's use function. [DOCS](https://github.com/wbthomason/packer.nvim#specifying-plugins)
In this example I will add [nui.nvim](https://github.com/MunifTanjim/nui.nvim) to display the results in a popup when
the user uses the `CountPrint` command.
@ -420,7 +420,7 @@ the user uses the `CountPrint` command.
-- lua/user/modules/char_counter/init.lua
-- Add these two fields to `char_counter` at the top of the file.
char_counter.uses = {
char_counter.packages = {
["nui.nvim"] = {
"MunifTanjim/nui.nvim",
cmd = { "CountPrint" } -- Here, nui.nvim wont be loaded until user does the `<leader>ic` or `:CountPrint` command.
@ -584,7 +584,7 @@ char_counter.settings = {
}
}
char_counter.uses = {
char_counter.packages = {
["nui.nvim"] = {
"MunifTanjim/nui.nvim",
cmd = { "CountPrint" }

6
lua/doom/core/config/init.lua

@ -195,7 +195,7 @@ config.load = function()
vim.opt.foldenable = true
vim.opt.foldtext = require("doom.core.functions").sugar_folds()
doom = config.defaults
doom.uses = {} -- Extra packages
doom.packages = {} -- Extra packages
doom.cmds = {} -- Extra commands
doom.autocmds = {} -- Extra autocommands
doom.binds = {} -- Extra binds
@ -221,10 +221,10 @@ config.load = function()
end
-- Iterate over existing packages, removing all packages that are about to be overriden
doom.uses = vim.tbl_filter(package_override_predicate, doom.uses)
doom.packages = vim.tbl_filter(package_override_predicate, doom.packages)
for _, packer_spec in ipairs(arg) do
table.insert(doom.uses, type(packer_spec) == "string" and { packer_spec } or packer_spec)
table.insert(doom.packages, type(packer_spec) == "string" and { packer_spec } or packer_spec)
end
end

2
lua/doom/modules/core/doom/init.lua

@ -4,7 +4,7 @@ required.settings = {
mapper = {},
}
required.uses = {
required.packages = {
["packer.nvim"] = {
"wbthomason/packer.nvim",
},

2
lua/doom/modules/core/nest/init.lua

@ -3,7 +3,7 @@ local nest = {}
nest.settings = {
}
nest.uses = {
nest.packages = {
["nest.nvim"] = {
"connorgmeehan/nest.nvim",
branch = "integrations-api",

2
lua/doom/modules/core/treesitter/init.lua

@ -39,7 +39,7 @@ treesitter.settings = {
},
}
treesitter.uses = {
treesitter.packages = {
["nvim-treesitter"] = {
"nvim-treesitter/nvim-treesitter",
commit = "3e2ac54e1638da214dab58f9edf01ad93f57261d",

2
lua/doom/modules/features/annotations/init.lua

@ -16,7 +16,7 @@ annotations.settings = {
},
}
annotations.uses = {
annotations.packages = {
["neogen"] = {
"danymat/neogen",
commit = "778a8537865a2c692ba4909b72e1b14ea98999c6",

2
lua/doom/modules/features/auto_install/init.lua

@ -7,7 +7,7 @@ auto_install.settings = {
local is_module_enabled = require("doom.utils").is_module_enabled
auto_install.uses = {
auto_install.packagesages = {
["DAPInstall.nvim"] = {
"Pocco81/DAPInstall.nvim",
commit = "24923c3819a450a772bb8f675926d530e829665f",

2
lua/doom/modules/features/auto_session/init.lua

@ -4,7 +4,7 @@ auto_session.settings = {
dir = vim.fn.stdpath("data") .. "/sessions/",
}
auto_session.uses = {
auto_session.packages = {
["persistence.nvim"] = {
"folke/persistence.nvim",
commit = "77cf5a6ee162013b97237ff25450080401849f85",

2
lua/doom/modules/features/autopairs/init.lua

@ -6,7 +6,7 @@ autopairs.settings = {
enable_moveright = true,
}
autopairs.uses = {
autopairs.packages = {
["nvim-autopairs"] = {
"windwp/nvim-autopairs",
commit = "6617498bea01c9c628406d7e23030da57f2f8718",

2
lua/doom/modules/features/colorizer/init.lua

@ -6,7 +6,7 @@ colorizer.settings = {
html = { names = false },
}
colorizer.uses = {
colorizer.packages = {
["nvim-colorizer.lua"] = {
"norcalli/nvim-colorizer.lua",
commit = "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6",

2
lua/doom/modules/features/comment/init.lua

@ -41,7 +41,7 @@ comment.settings = {
end,
}
comment.uses = {
comment.packages = {
["Comment.nvim"] = {
"numToStr/Comment.nvim",
commit = "8a2b2f3b302e3a35184b1107dfb3781aa76e442a",

2
lua/doom/modules/features/dap/init.lua

@ -35,7 +35,7 @@ dap.settings = {
},
}
dap.uses = {
dap.packagesages = {
["nvim-dap"] = {
"mfussenegger/nvim-dap",
commit = "3d0575a777610b364fea745b85ad497d56b8009a",

2
lua/doom/modules/features/dashboard/init.lua

@ -54,7 +54,7 @@ dashboard.settings = {
},
}
dashboard.uses = {
dashboard.packages = {
["dashboard-nvim"] = {
"glepnir/dashboard-nvim",
commit = "ba98ab86487b8eda3b0934b5423759944b5f7ebd",

2
lua/doom/modules/features/doom_reloader/init.lua

@ -11,7 +11,7 @@ doom_reloader.settings = {
},
}
doom_reloader.uses = {}
doom_reloader.packages = {}
doom_reloader.configs = {}
doom_reloader.autocmds = {

2
lua/doom/modules/features/doom_themes/init.lua

@ -4,7 +4,7 @@ doom_themes.settings = {}
doom_themes.configs = {}
doom_themes.uses = {
doom_themes.packages = {
["doom-themes.nvim"] = {
"GustavoPrietoP/doom-themes.nvim",
commit = "03d417d3eab71c320744f8da22251715ba6cee53",

2
lua/doom/modules/features/editorconfig/init.lua

@ -2,7 +2,7 @@ local editorconfig = {}
editorconfig.settings = {}
editorconfig.uses = {
editorconfig.packages = {
["editorconfig-vim"] = {
"editorconfig/editorconfig-vim",
commit = "a8e3e66deefb6122f476c27cee505aaae93f7109",

2
lua/doom/modules/features/explorer/init.lua

@ -74,7 +74,7 @@ explorer.settings = {
},
}
explorer.uses = {
explorer.packages = {
["nvim-tree.lua"] = {
"kyazdani42/nvim-tree.lua",
commit = "7b0ebf8b17d85abecccfd1c924090a28d5935b88",

2
lua/doom/modules/features/firenvim/init.lua

@ -22,7 +22,7 @@ firenvim.settings = {
},
}
firenvim.uses = {
firenvim.packagesages = {
["firenvim"] = {
"glacambre/firenvim",
commit = "668b350ce88cc9a2257644c67945c9abbdd36cb5",

2
lua/doom/modules/features/gitsigns/init.lua

@ -72,7 +72,7 @@ gitsigns.settings = {
},
}
gitsigns.uses = {
gitsigns.packages = {
["gitsigns.nvim"] = {
"lewis6991/gitsigns.nvim",
commit = "3791dfa1ee356a3250e0b74f63bad90e27455f60",

2
lua/doom/modules/features/illuminate/init.lua

@ -13,7 +13,7 @@ illuminate.settings = {
},
}
illuminate.uses = {
illuminate.packages = {
["vim-illuminate"] = {
"RRethy/vim-illuminate",
commit = "487563de7ed6195fd46da178cb38dc1ff110c1ce",

2
lua/doom/modules/features/indentlines/init.lua

@ -8,7 +8,7 @@ indentlines.settings = {
buftype_exclude = { "terminal" },
}
indentlines.uses = {
indentlines.packages = {
["indent-blankline.nvim"] = {
"lukas-reineke/indent-blankline.nvim",
commit = "9915d46ba9361784c70036bb7259c436249e5b0c",

2
lua/doom/modules/features/lazygit/init.lua

@ -2,7 +2,7 @@ local lazygit = {}
lazygit.settings = {}
lazygit.uses = {
lazygit.packages = {
["lazygit.nvim"] = {
"kdheepak/lazygit.nvim",
commit = "ca8ea75e5a1d838635fd2fcc5c3467a5bb33c4ec",

2
lua/doom/modules/features/linter/init.lua

@ -4,7 +4,7 @@ linter.settings = {
format_on_save = false,
}
linter.uses = {
linter.packages = {
["null-ls.nvim"] = {
"jose-elias-alvarez/null-ls.nvim",
commit = "71bb21da7faa6676629ebac5e8818b701da46f80",

2
lua/doom/modules/features/lsp/init.lua

@ -78,7 +78,7 @@ lsp.settings = {
}
local is_module_enabled = require("doom.utils").is_module_enabled
lsp.uses = {
lsp.packages = {
["nvim-lspconfig"] = {
"neovim/nvim-lspconfig",
commit = "63efd6ed156ae578c7e23278ec0a82776802106b",

2
lua/doom/modules/features/lsp_progress/init.lua

@ -3,7 +3,7 @@ local fidget = {}
fidget.settings = {
}
fidget.uses = {
fidget.packages = {
["fidget.nvim"] = {
"j-hui/fidget.nvim",
commit = "d47f2bbf7d984f69dc53bf2d37f9292e3e99ae8a",

2
lua/doom/modules/features/minimap/init.lua

@ -2,7 +2,7 @@ local minimap = {}
minimap.settings = {}
minimap.uses = {
minimap.packages = {
["minimap.vim"] = {
"wfxr/minimap.vim",
commit = "c8ea2a5550b95b007631bc83908c48a3368eb57c",

2
lua/doom/modules/features/neogit/init.lua

@ -2,7 +2,7 @@ local neogit = {}
neogit.settings = {}
neogit.uses = {
neogit.packages = {
["neogit"] = {
"TimUntersberger/neogit",
commit = "9987421e0724ce704d0035f50a7080c677a85d71",

2
lua/doom/modules/features/neorg/init.lua

@ -29,7 +29,7 @@ neorg.settings = {
},
}
neorg.uses = {
neorg.packages = {
["neorg"] = {
"nvim-neorg/neorg",
commit = "9aeaf79c5ad01930705a0534a35adbdba9eb5f13",

2
lua/doom/modules/features/projects/init.lua

@ -35,7 +35,7 @@ projects.settings ={
datapath = vim.fn.stdpath("data"),
}
projects.uses = {
projects.packages = {
["project.nvim"] = {
"ahmedkhalf/project.nvim",
commit = "cef52b8da07648b750d7f1e8fb93f12cb9482988",

2
lua/doom/modules/features/range_highlight/init.lua

@ -2,7 +2,7 @@ local range_highlight = {}
range_highlight.settings = {}
range_highlight.uses = {
range_highlight.packages = {
["range-highlight.nvim"] = {
"winston0410/range-highlight.nvim",
commit = "8b5e8ccb3460b2c3675f4639b9f54e64eaab36d9",

2
lua/doom/modules/features/ranger/init.lua

@ -2,7 +2,7 @@ local ranger = {}
ranger.settings = {}
ranger.uses = {
ranger.packages = {
["ranger.vim"] = {
"francoiscabrol/ranger.vim",
commit = "91e82debdf566dfaf47df3aef0a5fd823cedf41c",

2
lua/doom/modules/features/restclient/init.lua

@ -2,7 +2,7 @@ local restclient = {}
restclient.settings = {}
restclient.uses = {
restclient.packagesages = {
["rest.nvim"] = {
"NTBBloodbath/rest.nvim",
commit = "2826f6960fbd9adb1da9ff0d008aa2819d2d06b3",

2
lua/doom/modules/features/show_registers/init.lua

@ -2,7 +2,7 @@ local show_registers = {}
show_registers.settings = {}
show_registers.uses = {
show_registers.packages = {
["registers.nvim"] = {
"tversteeg/registers.nvim",
commit = "c66458fe5f83b57d40b678058a8eeb6340f9275c",

2
lua/doom/modules/features/snippets/init.lua

@ -5,7 +5,7 @@ snippets.settings = {
updateevents = "TextChanged,TextChangedI",
}
snippets.uses = {
snippets.packagesages = {
["LuaSnip"] = {
"L3MON4D3/LuaSnip",
commit = "80e68242cf8127844653060fbada32dca15579fc",

2
lua/doom/modules/features/statusline/init.lua

@ -14,7 +14,7 @@ statusline.settings = {
sections = {},
}
statusline.uses = {
statusline.packages = {
["galaxyline.nvim"] = {
"NTBBloodbath/galaxyline.nvim",
commit = "4d4f5fc8e20a10824117e5beea7ec6e445466a8f",

2
lua/doom/modules/features/statusline2/init.lua

@ -3,7 +3,7 @@ local statusline = {}
statusline.settings = {
}
statusline.uses = {
statusline.packagesages = {
["lualine.nvim"] = {
"nvim-lualine/lualine.nvim",
},

2
lua/doom/modules/features/suda/init.lua

@ -2,7 +2,7 @@ local suda = {}
suda.settings = {}
suda.uses = {
suda.packagesages = {
["suda.vim"] = {
"lambdalisue/suda.vim",
commit = "6bffe36862faa601d2de7e54f6e85c1435e832d0",

2
lua/doom/modules/features/superman/init.lua

@ -2,7 +2,7 @@ local superman = {}
superman.settings = {}
superman.uses = {
superman.packages = {
["vim-superman"] = {
"jez/vim-superman",
commit = "19d307446576d9118625c5d9d3c7a4c9bec5571a",

2
lua/doom/modules/features/symbols/init.lua

@ -16,7 +16,7 @@ symbols.settings = {
width = 25,
}
symbols.uses = {
symbols.packagesages = {
["symbols-outline.nvim"] = {
"simrat39/symbols-outline.nvim",
commit = "1361738c47892c3cee0d0b7a3b3bc7a8b48139c2",

2
lua/doom/modules/features/tabline/init.lua

@ -139,7 +139,7 @@ tabline.settings = {
},
}
tabline.uses = {
tabline.packages = {
["bufferline.nvim"] = {
"akinsho/bufferline.nvim",
commit = "e1202c6569353d03ef0cb3da11b839dba26854dd",

2
lua/doom/modules/features/telescope/init.lua

@ -46,7 +46,7 @@ telescope.settings = {
extensions = { "mapper" },
}
telescope.uses = {
telescope.packages = {
["telescope.nvim"] = {
"nvim-telescope/telescope.nvim",
commit = "1a72a92b641e1dab42036c07e2571b43c55bfaa1",

2
lua/doom/modules/features/terminal/init.lua

@ -22,7 +22,7 @@ terminal.settings = {
},
}
terminal.uses = {
terminal.packagesages = {
["toggleterm.nvim"] = {
"akinsho/toggleterm.nvim",
commit = "36704ddf3883842f3354e11da968d4c1201f0831",

2
lua/doom/modules/features/todo_comments/init.lua

@ -2,7 +2,7 @@ local todo_comments = {}
todo_comments.settings = {}
todo_comments.uses = {
todo_comments.packages = {
["todo-comments.nvim"] = {
"folke/todo-comments.nvim",
commit = "98b1ebf198836bdc226c0562b9f906584e6c400e",

2
lua/doom/modules/features/trouble/init.lua

@ -2,7 +2,7 @@ local trouble = {}
trouble.settings = {}
trouble.uses = {
trouble.packages = {
["trouble.nvim"] = {
"folke/trouble.nvim",
commit = "691d490cc4eadc430d226fa7d77aaa84e2e0a125",

2
lua/doom/modules/features/whichkey/init.lua

@ -61,7 +61,7 @@ whichkey.settings = {
triggers = "auto",
}
whichkey.uses = {
whichkey.packages = {
["which-key.nvim"] = {
"folke/which-key.nvim",
commit = "a3c19ec5754debb7bf38a8404e36a9287b282430",

2
lua/doom/modules/features/zen/init.lua

@ -48,7 +48,7 @@ zen.settings = {
},
}
zen.uses = {
zen.packages = {
["TrueZen.nvim"] = {
"Pocco81/TrueZen.nvim",
commit = "508b977d71650da5c9243698614a9a1416f116d4",

8
lua/doom/modules/init.lua

@ -53,9 +53,9 @@ packer.reset()
-- Handle the Modules
for module_name, module in pairs(doom.modules) do
-- Import dependencies with packer from module.uses
if module.uses then
for dependency_name, packer_spec in pairs(module.uses) do
-- Import dependencies with packer from module.packages
if module.packages then
for dependency_name, packer_spec in pairs(module.packages) do
-- Set packer_spec to configure function
if module.configs and module.configs[dependency_name] then
packer_spec.config = module.configs[dependency_name]
@ -83,7 +83,7 @@ for module_name, module in pairs(doom.modules) do
end
-- Handle extra user modules
for _, packer_spec in ipairs(doom.uses) do
for _, packer_spec in ipairs(doom.packages) do
use(packer_spec)
end

2
lua/doom/modules/langs/config/init.lua

@ -14,7 +14,7 @@ config.settings = {
-- yaml_language_server_name = 'yamlls', -- Currently broken
}
config.uses = {
config.packagesages = {
["SchemaStore.nvim"] = {
"b0o/SchemaStore.nvim",
commit = "0a3f765335acde2bdf33504a62fe944a5d6d907e",

2
lua/doom/modules/langs/lua/init.lua

@ -29,7 +29,7 @@ lua.settings = {
},
}
lua.uses = {
lua.packages = {
["lua-dev.nvim"] = {
"folke/lua-dev.nvim",
commit = "a0ee77789d9948adce64d98700cc90cecaef88d5",

2
lua/user/modules/char_counter/init.lua

@ -24,7 +24,7 @@ char_counter.settings = {
}
}
char_counter.uses = {
char_counter.packages = {
["nui.nvim"] = {
"MunifTanjim/nui.nvim",
cmd = { "CountPrint" },

Loading…
Cancel
Save