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
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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')
```
4 changes: 3 additions & 1 deletion native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ if(APPLE)
set(PLATFORM darwin)
elseif(WIN32)
set(PLATFORM win32)
elseif(ANDROID)
set(PLATFORM android)
else()
set(PLATFORM linux)
endif()
Expand All @@ -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)
Expand Down