Disable nvim-lspconfig on all platforms but Linux

This commit is contained in:
Imbus 2024-08-18 16:28:10 +02:00
parent 78055e25b6
commit c6a1fbd32d
2 changed files with 12 additions and 0 deletions

View file

@ -7,6 +7,15 @@
vim.g.mapleader = ' ' vim.g.mapleader = ' '
vim.g.maplocalleader = ' ' vim.g.maplocalleader = ' '
-- Arch and platform detection. can be used as conditions for certain plugins.
-- If there is a better/more idiomatic solution, please enlighten me.
-- For a full summary of this table, run ":lua vim.inspect(vim.g.os_uname)"
-- Shows up as undefined but executes and behaves flawlessly as of 2024-08-18
---@diagnostic disable-next-line: undefined-field
vim.g.os_uname = vim.loop.os_uname()
vim.g.sysname = vim.g.os_uname.sysname -- "Linux, FreeBSD, ..."
vim.g.arch = vim.g.os_uname.machine -- "x86_64, ..."
-- Set to true if you have a Nerd Font installed and selected in the terminal -- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = true vim.g.have_nerd_font = true

View file

@ -1,5 +1,8 @@
return { -- LSP Configuration & Plugins return { -- LSP Configuration & Plugins
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
cond = function()
return vim.g.sysname == 'Linux' -- Temporary fix for FreeBSD
end,
dependencies = { dependencies = {
-- Automatically install LSPs and related tools to stdpath for Neovim -- Automatically install LSPs and related tools to stdpath for Neovim
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants { 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants