Skip to content

Commit

Permalink
fix(cpp): only check for Linux ARM for disabling/enabling clangd inst…
Browse files Browse the repository at this point in the history
…allation
  • Loading branch information
mehalter committed May 28, 2024
1 parent 2953062 commit 519be02
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lua/astrocommunity/pack/cpp/init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local machine = vim.loop.os_uname().machine
local is_arm = machine == "aarch64" or vim.startswith(machine, "arm")
local uname = (vim.uv or vim.loop).os_uname()
local is_linux_arm = uname.sysname == "Linux" and (uname.machine == "aarch64" or vim.startswith(uname.machine, "arm"))

return {
{
Expand All @@ -13,7 +13,7 @@ return {
},
},
})
if is_arm then opts.servers = require("astrocore").list_insert_unique(opts.servers, { "clangd" }) end
if is_linux_arm then opts.servers = require("astrocore").list_insert_unique(opts.servers, { "clangd" }) end
end,
},
{
Expand All @@ -30,7 +30,7 @@ return {
"williamboman/mason-lspconfig.nvim",
optional = true,
opts = function(_, opts)
if not is_arm then
if not is_linux_arm then
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "clangd" })
end
end,
Expand Down Expand Up @@ -91,7 +91,7 @@ return {
optional = true,
opts = function(_, opts)
local tools = { "codelldb" }
if not is_arm then table.insert(tools, "clangd") end
if not is_linux_arm then table.insert(tools, "clangd") end
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, tools)
end,
},
Expand Down

0 comments on commit 519be02

Please sign in to comment.