Skip to content

Commit

Permalink
fix(astro): fix various bugs and enabled better usage of other packs
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Oct 17, 2024
1 parent 7c489c2 commit de04a80
Showing 1 changed file with 3 additions and 44 deletions.
47 changes: 3 additions & 44 deletions lua/astrocommunity/pack/astro/init.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
return {
{ import = "astrocommunity.pack.typescript" },
{
"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 = require("astrocore").list_insert_unique(opts.ensure_installed, { "astro", "scss" })
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "astro" })
end
end,
},
Expand All @@ -16,54 +17,12 @@ return {
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "astro" })
end,
},
{
"AstroNvim/astrolsp",
---@type AstroLSPOpts
opts = {
---@diagnostic disable: missing-fields
config = {
svelte = {
settings = {
typescript = {
updateImportsOnFileMove = { enabled = "always" },
inlayHints = {
parameterNames = { enabled = "all" },
parameterTypes = { enabled = true },
variableTypes = { enabled = true },
propertyDeclarationTypes = { enabled = true },
functionLikeReturnTypes = { enabled = true },
enumMemberValues = { enabled = true },
},
},
javascript = {
updateImportsOnFileMove = { enabled = "always" },
inlayHints = {
parameterNames = { enabled = "literals" },
parameterTypes = { enabled = true },
variableTypes = { enabled = true },
propertyDeclarationTypes = { enabled = true },
functionLikeReturnTypes = { enabled = true },
enumMemberValues = { enabled = true },
},
},
},
},
},
},
},
{
"jay-babu/mason-nvim-dap.nvim",
optional = true,
opts = function(_, opts)
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "js" })
end,
},
{
"WhoIsSethDaniel/mason-tool-installer.nvim",
optional = true,
opts = function(_, opts)
opts.ensure_installed =
require("astrocore").list_insert_unique(opts.ensure_installed, { "astro-language-server", "js-debug-adapter" })
require("astrocore").list_insert_unique(opts.ensure_installed, { "astro-language-server" })
end,
},
}

0 comments on commit de04a80

Please sign in to comment.