-
-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: refactor utils so that
astrocore
is lazily loaded (#718)
- Loading branch information
Showing
61 changed files
with
301 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
local utils = require "astrocore" | ||
return { | ||
{ | ||
"nvim-treesitter/nvim-treesitter", | ||
optional = true, | ||
opts = function(_, opts) | ||
-- Ensure that opts.ensure_installed exists and is a table or string "all". | ||
if opts.ensure_installed ~= "all" then | ||
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "astro") | ||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, "astro") | ||
end | ||
end, | ||
}, | ||
{ | ||
"williamboman/mason-lspconfig.nvim", | ||
optional = true, | ||
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "astro") end, | ||
opts = function(_, opts) | ||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, "astro") | ||
end, | ||
}, | ||
{ | ||
"jay-babu/mason-nvim-dap.nvim", | ||
optional = true, | ||
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "js") end, | ||
opts = function(_, opts) | ||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, "js") | ||
end, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,32 @@ | ||
local utils = require "astrocore" | ||
return { | ||
{ | ||
"nvim-treesitter/nvim-treesitter", | ||
optional = true, | ||
opts = function(_, opts) | ||
if opts.ensure_installed ~= "all" then | ||
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "bash") | ||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, "bash") | ||
end | ||
end, | ||
}, | ||
{ | ||
"williamboman/mason-lspconfig.nvim", | ||
optional = true, | ||
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "bashls") end, | ||
opts = function(_, opts) | ||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, "bashls") | ||
end, | ||
}, | ||
{ | ||
"jay-babu/mason-null-ls.nvim", | ||
optional = true, | ||
opts = function(_, opts) | ||
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, { "shellcheck", "shfmt" }) | ||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "shellcheck", "shfmt" }) | ||
end, | ||
}, | ||
{ | ||
"jay-babu/mason-nvim-dap.nvim", | ||
optional = true, | ||
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "bash") end, | ||
opts = function(_, opts) | ||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, "bash") | ||
end, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
local utils = require "astrocore" | ||
return { | ||
{ | ||
"nvim-treesitter/nvim-treesitter", | ||
optional = true, | ||
opts = function(_, opts) | ||
if opts.ensure_installed ~= "all" then | ||
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "cmake") | ||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, "cmake") | ||
end | ||
end, | ||
}, | ||
{ | ||
"williamboman/mason-lspconfig.nvim", | ||
optional = true, | ||
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "neocmake") end, | ||
opts = function(_, opts) | ||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, "neocmake") | ||
end, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,33 @@ | ||
local utils = require "astrocore" | ||
return { | ||
-- CSharp support | ||
{ | ||
"nvim-treesitter/nvim-treesitter", | ||
optional = true, | ||
opts = function(_, opts) | ||
if opts.ensure_installed ~= "all" then | ||
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "c_sharp") | ||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, "c_sharp") | ||
end | ||
end, | ||
}, | ||
{ | ||
"jay-babu/mason-null-ls.nvim", | ||
optional = true, | ||
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "csharpier") end, | ||
opts = function(_, opts) | ||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, "csharpier") | ||
end, | ||
}, | ||
{ | ||
"williamboman/mason-lspconfig.nvim", | ||
optional = true, | ||
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "csharp_ls") end, | ||
opts = function(_, opts) | ||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, "csharp_ls") | ||
end, | ||
}, | ||
{ | ||
"jay-babu/mason-nvim-dap.nvim", | ||
optional = true, | ||
opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "coreclr") end, | ||
opts = function(_, opts) | ||
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, "coreclr") | ||
end, | ||
}, | ||
} |
Oops, something went wrong.