diff --git a/README.md b/README.md index 18211b8..2d02ab6 100644 --- a/README.md +++ b/README.md @@ -210,3 +210,34 @@ https://github.com/polserver/vscode-escript/issues. - In the new Visual Studio Code [Extension Development Host], open a POL distro folder that contains `pol.cfg` and `scripts/ecompile.cfg`. - Check the "ECompile Language Server" channel in the Output pane. + +## NVIM LSP integration +Run `npm install && npm build` in this folder. This installs all necessary + node modules in both the client and server folder (only the server is needed) + +nvim example configuration: +``` +vim.lsp.config.escriptlsp = { + root_markers = { + "pol.cfg" + }, + filetypes = { 'escript' }, + cmd = { + "node", + "/PATH_TO_VSESCRIPT/server/out/index.js", + "--stdio", + "--storageUri=/SOME_PATH/escriptlsp" + }, + init_options = { + configuration = { + polCommitId = "COMMIT HASH", + showModuleFunctionComments = true, + continueAnalysisOnError = true, + disableWorkspaceReferences = true, + referenceAllFunctions = true, + } + }, +} + +vim.lsp.enable('escriptlsp') +``` diff --git a/native/CMakeLists.txt b/native/CMakeLists.txt index 3ddf142..8062cbb 100644 --- a/native/CMakeLists.txt +++ b/native/CMakeLists.txt @@ -10,6 +10,8 @@ if(APPLE) set(PLATFORM darwin) elseif(WIN32) set(PLATFORM win32) +elseif(ANDROID) + set(PLATFORM android) else() set(PLATFORM linux) endif() @@ -23,7 +25,7 @@ endif() if(BUILD_OSX_UNIVERSAL_BINARY) set(ARCH universal) -elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)") +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*|aarch64)") set(ARCH arm64) else() set(ARCH x64)