Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ unset PACKAGES
command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; }
command -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" curl"; }

AGENT_BINARIES_URI=https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.csharp.binaries/1.0.1
LS_CSHARP_VERSION="1.31.1"
AGENT_BINARIES_URI="https://github.com/OmniSharp/omnisharp-roslyn/releases/download/v${LS_CSHARP_VERSION}/omnisharp-linux-x64.tar.gz"
CHE_DIR=$HOME/che
LS_DIR=${CHE_DIR}/ls-csharp
LS_LAUNCHER=${LS_DIR}/launch.sh
Expand Down Expand Up @@ -83,13 +84,6 @@ elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then
${SUDO} scl enable rh-dotnetcore20 bash;
}

command -v nodejs >/dev/null 2>&1 || {
curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;
${SUDO} yum -y install nodejs;
}




# Install for Ubuntu 14.04, 16.04, 16.10 & Linux Mint 17, 18 (64 bit)
####################################
Expand Down Expand Up @@ -123,16 +117,6 @@ elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then
${SUDO} apt-get -y install dotnet-sdk-2.0.0-preview2-006497
}

command -v nodejs >/dev/null 2>&1 || {
{
curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} bash -;
};

${SUDO} apt-get update;
${SUDO} apt-get install -y nodejs;
}


# Debian 8
##########
elif echo ${LINUX_TYPE} | grep -qi "debian"; then
Expand All @@ -151,15 +135,6 @@ elif echo ${LINUX_TYPE} | grep -qi "debian"; then
${SUDO} ln -s /opt/dotnet/dotnet /usr/local/bin;
}

command -v nodejs >/dev/null 2>&1 || {
{
curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} bash -;
};

${SUDO} apt-get update;
${SUDO} apt-get install -y nodejs;
}

# Fedora 24, 25, 26
###########
elif echo ${LINUX_TYPE} | grep -qi "fedora"; then
Expand All @@ -177,12 +152,6 @@ elif echo ${LINUX_TYPE} | grep -qi "fedora"; then
${SUDO} ln -s /opt/dotnet/dotnet /usr/local/bin;
}

command -v nodejs >/dev/null 2>&1 || {
curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;
${SUDO} dnf -y install nodejs;
}


# CentOS 7.1 (64 bit) & Oracle Linux 7.1 (64 bit)
###############################
elif echo ${LINUX_TYPE} | grep -qi "centos"; then
Expand All @@ -199,12 +168,6 @@ elif echo ${LINUX_TYPE} | grep -qi "centos"; then
${SUDO} ln -s /opt/dotnet/dotnet /usr/local/bin;
}

command -v nodejs >/dev/null 2>&1 || {
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -;
${SUDO} yum -y install nodejs;
}


# SUSE Linux Enterprise Server (64 bit), openSUSE (64 bit)
###############
elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then
Expand All @@ -221,11 +184,6 @@ elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then
${SUDO} ln -s /opt/dotnet/dotnet /usr/local/bin;
}

command -v nodejs >/dev/null 2>&1 || {
${SUDO} zypper ar http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1/ Node.js
${SUDO} zypper in nodejs
}

else
>&2 echo "Unrecognized Linux Type"
>&2 cat /etc/os-release
Expand All @@ -238,10 +196,12 @@ fi
#####################


if [ ! -d "${LS_DIR}/node_modules" ]; then
curl -s ${AGENT_BINARIES_URI} | tar xzf - -C ${CHE_DIR}
if [ ! -f "${LS_DIR}/run" ]; then
echo "Downloading C# language server"
curl -s -L -o ${LS_DIR}/omnisharp-linux-x64.tar.gz ${AGENT_BINARIES_URI}
cd ${LS_DIR} && tar -xzf omnisharp-linux-x64.tar.gz
fi

touch ${LS_LAUNCHER}
chmod +x ${LS_LAUNCHER}
echo "nodejs ${LS_DIR}/node_modules/omnisharp-client/languageserver/server.js" > ${LS_LAUNCHER}
echo "${LS_DIR}/run -lsp" > ${LS_LAUNCHER}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@Singleton
public class TypeScriptLanguageServerConfig implements LanguageServerConfig {

private static final String REGEX = ".*\\.(ts|tsx)";
private static final String REGEX = ".*\\.(js|ts|tsx)";

private final Path launchScript;

Expand Down