From dd9e7f900fa2e5b0a374f69ab011fdb050fcabdf Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 20 Dec 2022 09:52:26 +0800 Subject: fix(gdscript): support get the port from env variable (#2313) * fix(gdscript): support get the port from env variable * fix: format --- lua/lspconfig/server_configurations/gdscript.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/gdscript.lua b/lua/lspconfig/server_configurations/gdscript.lua index 1491212a..86d4d0f5 100644 --- a/lua/lspconfig/server_configurations/gdscript.lua +++ b/lua/lspconfig/server_configurations/gdscript.lua @@ -1,9 +1,10 @@ local util = require 'lspconfig.util' -local cmd = { 'nc', 'localhost', '6008' } +local port = os.getenv 'GDScript_Port' or '6008' +local cmd = { 'nc', 'localhost', port } if vim.fn.has 'nvim-0.8' == 1 then - cmd = vim.lsp.rpc.connect('127.0.0.1', '6008') + cmd = vim.lsp.rpc.connect('127.0.0.1', port) end return { -- cgit v1.2.3-70-g09d2