Skip to content

Commit

Permalink
Use node_bin variable to use runtime from the lsp_utils settings
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl committed Feb 22, 2021
1 parent dc710f7 commit 406b75c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion LSP-typescript.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"command": ["node", "${server_path}", "--stdio"],
"command": ["${node_bin}", "${server_path}", "--stdio"],
"languages": [
{
"languageId": "javascriptreact",
Expand Down
12 changes: 3 additions & 9 deletions plugin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import os
import sublime
from LSP.plugin import ClientConfig
from LSP.plugin import uri_to_filename
from LSP.plugin import WorkspaceFolder
Expand All @@ -8,6 +6,8 @@
from LSP.plugin.core.views import point_to_offset
from lsp_utils import NpmClientHandler
from lsp_utils import request_handler
import os
import sublime


def plugin_loaded():
Expand All @@ -21,13 +21,7 @@ def plugin_unloaded():
class LspTypescriptPlugin(NpmClientHandler):
package_name = __package__
server_directory = 'typescript-language-server'
server_binary_path = os.path.join(
server_directory, 'node_modules', 'typescript-language-server', 'lib', 'cli.js'
)

@classmethod
def install_in_cache(cls) -> bool:
return False
server_binary_path = os.path.join(server_directory, 'node_modules', 'typescript-language-server', 'lib', 'cli.js')

@classmethod
def is_allowed_to_start(
Expand Down

0 comments on commit 406b75c

Please sign in to comment.