From 59fc0eae47750ede668b02491208cd01e833553e Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 5 Sep 2022 02:18:34 +0200 Subject: [PATCH] nvim: don't start server if in firenvim --- .config/nvim/lua/my/net.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.config/nvim/lua/my/net.lua b/.config/nvim/lua/my/net.lua index 3a09c00..2cb2f5a 100644 --- a/.config/nvim/lua/my/net.lua +++ b/.config/nvim/lua/my/net.lua @@ -1,11 +1,11 @@ -local sockdir = (vim.env['XDG_RUNTIME_DIR'] - or vim.env['XDG_STATE_HOME'] or vim.env['HOME'] .. '/.local/state') -vim.fn.mkdir(sockdir, 'p') -if vim.fn.filereadable(sockdir .. '/nvim.sock') == 0 then - vim.fn.serverstart(sockdir .. '/nvim.sock'); -end - -if vim.g.started_by_firenvim then +if not vim.g.started_by_firenvim then + local sockdir = (vim.env['XDG_RUNTIME_DIR'] + or vim.env['XDG_STATE_HOME'] or vim.env['HOME'] .. '/.local/state') + vim.fn.mkdir(sockdir, 'p') + if vim.fn.filereadable(sockdir .. '/nvim.sock') == 0 then + vim.fn.serverstart(sockdir .. '/nvim.sock'); + end +else vim.g.firenvim_config = { localSettings = { [".*"] = {