From c6a1fbd32d081d20cd4bccbefcb036a9ec5d03ef Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sun, 18 Aug 2024 16:28:10 +0200 Subject: [PATCH] Disable nvim-lspconfig on all platforms but Linux --- init.lua | 9 +++++++++ lua/plugins/nvim-lspconfig.lua | 3 +++ 2 files changed, 12 insertions(+) diff --git a/init.lua b/init.lua index 2660de1..ab7fbaa 100644 --- a/init.lua +++ b/init.lua @@ -7,6 +7,15 @@ vim.g.mapleader = ' ' 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 vim.g.have_nerd_font = true diff --git a/lua/plugins/nvim-lspconfig.lua b/lua/plugins/nvim-lspconfig.lua index 677618c..53047b2 100644 --- a/lua/plugins/nvim-lspconfig.lua +++ b/lua/plugins/nvim-lspconfig.lua @@ -1,5 +1,8 @@ return { -- LSP Configuration & Plugins 'neovim/nvim-lspconfig', + cond = function() + return vim.g.sysname == 'Linux' -- Temporary fix for FreeBSD + end, dependencies = { -- Automatically install LSPs and related tools to stdpath for Neovim { 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants