Comments (42)
@young40
服务端:安装msvc,递归更新全部子模块,执行“编译”task。
客户端:安装nodejs,在client目录中执行npm install
。
VSCode插件市场上有编译好的插件,你可以直接安装。
from lua-language-server.
有很多地方都不太理解, 不过还是编译出来了, 非常激动, 特来感谢🙏
from lua-language-server.
@sumneko @shuxiao9058 PR已发. #19
@sumneko 如果能联系上actboy168的话, 麻烦你请他看下 actboy168/lni#2 如果可以合并的话, 麻烦他给合并一下. 谢谢啦🙏
from lua-language-server.
暂时没有改名的打算,看Marketplace的算法再过2~3个月应该就能排第一了,也刚好给我重构的时间(目前的实现有很多问题,已经构思了重构方案)。你安利的时候可以先说是“淡蓝色的Lua”。谢谢你的建议和关心!
from lua-language-server.
抱歉我没有os环境
from lua-language-server.
你好,用的的可执行程序和库我都在mac下编译过了,前端也调用了mac版的lua-language-server
require的路径提示是错的,都会跳转到当前文件,其它的好像没什么问题,不知道应该改哪些地方呢
from lua-language-server.
可能是文件路径表现不一致(比如是否忽略大小写;正斜杠或反斜杠等)导致没有找到文件。以后有条件的话我会解决这个问题。
from lua-language-server.
请教一下 macOS 上, 怎么编译的? @Xiaobin0860
@sumneko 能否简单列一个win上编译的文档, 好参考一下.
from lua-language-server.
我是需要在macOS上用, 非常感谢哈. 我再研究一下哈.
from lua-language-server.
服务器端等于说是要编译一个定制的Lua是吧? @sumneko
谢谢哈. 🙏
from lua-language-server.
有很多地方都不太理解, 不过还是编译出来了, 非常激动, 特来感谢🙏
能发一下坑和解决方法吗?我也想试一下!
from lua-language-server.
-
bee.lua在最新的macOS 10.14.4上运行有问题
参见: actboy168/bee.lua#3
整个工程有两份bee.lua, 我都修改了. -
lni的编译需要去掉一行
// extern "C" __declspec(dllexport) -
本库下面的make.lua没有区分操作系统, 应该是win的配置.
去掉rcedit相关的代码
lua/lpeglabel
lm:shared_library 'lni' {
deps = 'lua',
sources = {
'lni/src/main.cpp',
},
includes = {"bee.lua/3rd/lua/src"}
}
lm:shared_library 'lpeglabel' {
deps = 'lua',
sources = 'lpeglabel/*.c',
-- ldflags = '/EXPORT:luaopen_lpeglabel',
includes = {"bee.lua/3rd/lua/src"}
}
from lua-language-server.
所以,可以提交一个merge request,我也试下
from lua-language-server.
这几个修改, 分散到几个库里面的. 不太好提哈.
luamake你看了吗?
from lua-language-server.
虽然编译出来了, 运行的时候, 还是会报缺这缺那...我晚上再接着研究
from lua-language-server.
欢迎任何pull request,跨平台也确实是想实现的东西,只是没有相关环境难以调试,如果你能帮我解决的话就再好不过了
from lua-language-server.
在vs code商店安装好扩展.
把编译好的lua-language-server放到~/.vscode/extensions/sumneko.lua-0.8.4/server/bin
几个so文件, 放到 ~/.vscode/extensions/sumneko.lua-0.8.4/server/ 下面.
修改~/.vscode/extensions/sumneko.lua-0.8.4/client/out/extension.js
把lua-language-server.exe 的 .exe 去掉, 重启下vs code, 可以正常工作.
感谢 @sumneko , 插件很棒!
from lua-language-server.
@young40 我这边编译还是报错
➜ lua-language-server (master) ✔ cd 3rd/luamake
➜ luamake (545892a) ✔ ninja -f ninja/macos.ninja (545892a|) ✔
[0/3] cd 3rd/bee.lua && ninja -f ninja/macos.ninja
[2/2] build/macos/bin/bootstrap test/test.lua
FAILED: build/macos/_/test
build/macos/bin/bootstrap test/test.lua
build/macos/bin/bootstrap: error loading module 'bee.filesystem' from file 'build/macos/bin/bee.so':
dlopen(build/macos/bin/bee.so, 6): Symbol not found: __ZNSt3__16__itoa8__u32toaEjPc
Referenced from: build/macos/bin/bee.so
Expected in: flat namespace
in build/macos/bin/bee.so
stack traceback:
[C]: in ?
[C]: in function 'require'
./test/test_platform.lua:49: in main chunk
[C]: in function 'require'
test/test.lua:21: in main chunk
...-server/3rd/luamake/3rd/bee.lua/build/macos/bin/main.lua:24: in main chunk
[C]: in ?
ninja: build stopped: subcommand failed.
FAILED: build/macos/_/bee
cd 3rd/bee.lua && ninja -f ninja/macos.ninja
ninja: build stopped: subcommand failed.
from lua-language-server.
参考下这个issue: actboy168/bee.lua#3
需要修改下endpoint.cpp
from lua-language-server.
@young40 运行又遇到一个问题
➜ server (master) ✔ bin/lua-language-server publish.lua (master|✚2
bin/lua-language-server: error loading module 'lpeglabel' from file '/usr/local/lib/lua/5.3/lpeglabel.so':
dlopen(/usr/local/lib/lua/5.3/lpeglabel.so, 6): Symbol not found: _lua_getuservalue
Referenced from: /usr/local/lib/lua/5.3/lpeglabel.so
Expected in: flat namespace
in /usr/local/lib/lua/5.3/lpeglabel.so
stack traceback:
[C]: in ?
[C]: in function 'require'
...workspace/lua-language-server/server/src/json/decode.lua:1: in main chunk
[C]: in function 'require'
...a/workspace/lua-language-server/server/src/json/init.lua:2: in main chunk
[C]: in function 'require'
publish.lua:10: in main chunk
[C]: in ?
from lua-language-server.
我没有遇到这个问题. 从日志上看, 似乎是你系统里面有了一份lpeglable.so (/usr/local/lib/lua/5.3/lpeglabel.so)
可能是因为版本问题不兼容, 尝试把系统里面的这份给删除了?
另外, publish.lua, 看起来像是发布整个工程用的.
我的做法是, 在vs code扩展商店装好插件之后, 替换文件来实现的.
我平时不用VS code, 就做一个测试. 接下来要用这个当服务端, 跑起来给Emacs用.
from lua-language-server.
@young40 我也是用Emacs+TabNine,哈哈
from lua-language-server.
目前mac 系统下vscode插件商店安装后还是dll文件并不是so?
from lua-language-server.
@Jackson-soft 非windows系统需要自己编译
from lua-language-server.
@young40 可否帮我在 readme
中写一个关于macos环境的使用方式?
from lua-language-server.
@sumneko 抱歉刚看到.
没问题哈. 我找时间写一下哈.
from lua-language-server.
@sumneko 简单写了一下, 我的英文太差了...
另外又加了一个编译后尝试安装的脚本.
from lua-language-server.
是不是给这个项目起一个名字? 我看在VScode Marketplace里面叫“Lua”, 搜索Lua的话, 会有很多结果, 并且本项目目前排名第二, 第一是一个很久没人维护的项目, 下载量非常大, 这个项目挺吃亏的.
比如, 假设我需要给朋友推荐这个项目, 让他在Market里面搜索...挺难分辨出来的.
from lua-language-server.
@young40 我更新了 uri 与路径的转换实现,可否手动更新一下脚本,帮我测试一下在unix中是否能正常工作?
from lua-language-server.
你好,最新版的 OSX 编译出错,请帮忙看一下:
mellon@collie:lua-language-server $ ./osx.sh
updating submodule ...
build luamake ...
[0/3] cd 3rd/bee.lua && ninja -f ninja/macos.ninja
[89/89] build/macos/bin/bootstrap test/test.lua
..................................................................................
Ran 82 tests in 0.086 seconds, 82 successes, 0 failures
OK
[3/3] cp 3rd/bee.lua/build/macos/bin/bee.so bee.so
/Users/mellon/Code/Lua/lua-language-server
[1/61] Compile C build/macos/obj/lua/lctype.obj
[2/61] Compile C build/macos/obj/lua/linit.obj
[3/61] Compile C build/macos/obj/lua/lcorolib.obj
[4/61] Compile C build/macos/obj/lua/lfunc.obj
[5/61] Compile C build/macos/obj/lua/ldblib.obj
[6/61] Compile C build/macos/obj/lua/lbaselib.obj
[7/61] Compile C build/macos/obj/lua/lmem.obj
[8/61] Compile C build/macos/obj/lua/ldump.obj
[9/61] Compile C build/macos/obj/lua/lmathlib.obj
[10/61] Compile C build/macos/obj/lua/ldo.obj
[11/61] Compile C build/macos/obj/lua/lopcodes.obj
[12/61] Compile C build/macos/obj/lua/loadlib.obj
[13/61] Compile C build/macos/obj/lua/liolib.obj
[14/61] Compile C build/macos/obj/lua/lauxlib.obj
[15/61] Compile C build/macos/obj/lua/loslib.obj
[16/61] Compile C build/macos/obj/lua/lobject.obj
[17/61] Compile C build/macos/obj/lua/lstate.obj
[18/61] Compile C build/macos/obj/lua/lstring.obj
[19/61] Compile C build/macos/obj/lua/ldebug.obj
[20/61] Compile C build/macos/obj/lua/ltablib.obj
[21/61] Compile C build/macos/obj/lua/ltm.obj
[22/61] Compile C build/macos/obj/lua/lzio.obj
[23/61] Compile C build/macos/obj/lua/lutf8lib.obj
[24/61] Compile C build/macos/obj/lua/llex.obj
[25/61] Compile C build/macos/obj/lua/lua.obj
[26/61] Compile C build/macos/obj/lua/lapi.obj
[27/61] Compile C build/macos/obj/lua/ltable.obj
[28/61] Compile C build/macos/obj/lua/lundump.obj
[29/61] Compile C build/macos/obj/lua/lgc.obj
[30/61] Compile C build/macos/obj/lua/lcode.obj
[31/61] Compile C build/macos/obj/bee/lua-seri.obj
[32/61] Compile CXX build/macos/obj/bee/exception.obj
[33/61] Compile CXX build/macos/obj/bee/error.obj
[34/61] Compile C build/macos/obj/lua/lparser.obj
[35/61] Compile C build/macos/obj/lua/lstrlib.obj
[36/61] Compile CXX build/macos/obj/bee/file_helper.obj
[37/61] Compile CXX build/macos/obj/bee/lua_embed.obj
[38/61] Compile CXX build/macos/obj/bee/socket.obj
[39/61] Compile CXX build/macos/obj/bee/lua_platform.obj
[40/61] Compile CXX build/macos/obj/bee/lua_serialization.obj
[41/61] Compile C build/macos/obj/lpeglabel/lpcap.obj
[42/61] Compile C build/macos/obj/lpeglabel/lpprint.obj
[43/61] Compile C build/macos/obj/lpeglabel/lpvm.obj
[44/61] Compile C build/macos/obj/lpeglabel/lpcode.obj
[45/61] Compile CXX build/macos/obj/bee/lua_socket.obj
[46/61] Compile C build/macos/obj/lpeglabel/lptree.obj
[47/61] Compile CXX build/macos/obj/bee/endpoint.obj
[48/61] Compile CXX build/macos/obj/bee/lua_filewatch.obj
[49/61] Compile C build/macos/obj/lua/lvm.obj
[50/61] Link Executable build/macos/bin/lua
[51/61] Compile CXX build/macos/obj/lni/main.obj
[52/61] Link SharedLibrary build/macos/bin/lpeglabel.so
[53/61] Link SharedLibrary build/macos/bin/lni.so
[54/61] Compile CXX build/macos/obj/bee/lua_subprocess.obj
[55/61] Compile CXX build/macos/obj/bee/path_helper.obj
[56/61] Compile CXX build/macos/obj/bee/lua_thread.obj
[57/61] Compile CXX build/macos/obj/bee/subprocess_posix.obj
[58/61] Compile CXX build/macos/obj/bee/fsevent_osx.obj
[59/61] Compile CXX build/macos/obj/bee/lua_filesystem.obj
[60/61] Link SharedLibrary build/macos/bin/bee.so
[61/61] /Users/mellon/Code/Lua/lua-language-server/./3rd/luamake/luamake lua make/install.lua
版本号为:0.9.5
清理目录...
开始复制文件...
复制了[222]个文件
更新NodeModules...
> [email protected] postinstall /Users/mellon/Code/Lua/lua-language-server/publish/0.9.5/client
> vscode-install
Detected VS Code engine version: ^1.23.0
Found minimal version that qualifies engine range: 1.23.0
Fetching vscode.d.ts from: https://raw.githubusercontent.com/Microsoft/vscode/7c7da59c2333a1306c41e6e7b68d7f0caa7b3d45/src/vs/vscode.d.ts
vscode.d.ts successfully installed!
added 92 packages from 402 contributors and audited 131 packages in 19.443s
found 0 vulnerabilities
开始测试...
测试[core]...
测试[core]用时[0.099]
测试[definition]...
测试[definition]用时[0.373]
测试[rename]...
测试[rename]用时[0.017]
测试[highlight]...
测试[highlight]用时[0.017]
测试[references]...
测试[references]用时[0.030]
测试[diagnostics]...
测试[diagnostics]用时[0.273]
测试[type_inference]...
测试[type_inference]用时[0.114]
测试[find_lib]...
测试[find_lib]用时[0.054]
测试[hover]...
测试[hover]用时[0.370]
测试[completion]...
测试[completion]用时[0.213]
测试[signature]...
测试[signature]用时[0.074]
测试[document_symbol]...
测试[document_symbol]用时[0.049]
测试[crossfile]...
./bin/lua-language-server: publish.lua:87: /Users/mellon/Code/Lua/lua-language-server/publish/0.9.5/server/bin/lua-language-server: ...lua-language-server/server/test/crossfile/definition.lua:95: assertion failed!
stack traceback:
[C]: in function 'assert'
...lua-language-server/server/test/crossfile/definition.lua:95: in function 'TEST'
...lua-language-server/server/test/crossfile/definition.lua:125: in main chunk
[C]: in function 'require'
...e/Lua/lua-language-server/server/test/crossfile/init.lua:1: in main chunk
[C]: in function 'require'
...a/lua-language-server/publish/0.9.5/server/test/main.lua:24: in local 'test'
...a/lua-language-server/publish/0.9.5/server/test/main.lua:40: in local 'main'
...a/lua-language-server/publish/0.9.5/server/test/main.lua:46: in main chunk
[C]: in ?
stack traceback:
[C]: in function 'error'
publish.lua:87: in local 'runTest'
publish.lua:160: in main chunk
[C]: in ?
from lua-language-server.
@kidlj 请更新再试一下
from lua-language-server.
mellon@collie:lua-language-server $ git pull
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 13 (delta 5), reused 8 (delta 4), pack-reused 0
Unpacking objects: 100% (13/13), done.
From github.com:sumneko/lua-language-server
aa80daf..17b4a45 master -> origin/master
Updating aa80daf..17b4a45
Fast-forward
azure-pipelines.yml | 23 +++++++++++++++++++++++
server/test/crossfile/completion.lua | 56 +++++++++++++++++++++++++++++---------------------------
server/test/crossfile/definition.lua | 2 ++
3 files changed, 54 insertions(+), 27 deletions(-)
create mode 100644 azure-pipelines.yml
更新以后 OSX build 还是出错了:
开始测试...
测试[core]...
测试[core]用时[0.100]
测试[definition]...
测试[definition]用时[0.375]
测试[rename]...
测试[rename]用时[0.018]
测试[highlight]...
测试[highlight]用时[0.018]
测试[references]...
测试[references]用时[0.029]
测试[diagnostics]...
测试[diagnostics]用时[0.282]
测试[type_inference]...
测试[type_inference]用时[0.115]
测试[find_lib]...
测试[find_lib]用时[0.051]
测试[hover]...
测试[hover]用时[0.372]
测试[completion]...
测试[completion]用时[0.207]
测试[signature]...
测试[signature]用时[0.069]
测试[document_symbol]...
测试[document_symbol]用时[0.048]
测试[crossfile]...
./bin/lua-language-server: publish.lua:87: /Users/mellon/Code/Lua/lua-language-server/publish/0.9.5/server/bin/lua-language-server: ...lua-language-server/server/test/crossfile/completion.lua:97: assertion failed!
stack traceback:
[C]: in function 'assert'
...lua-language-server/server/test/crossfile/completion.lua:97: in function 'TEST'
...lua-language-server/server/test/crossfile/completion.lua:361: in main chunk
[C]: in function 'require'
...e/Lua/lua-language-server/server/test/crossfile/init.lua:3: in main chunk
[C]: in function 'require'
...a/lua-language-server/publish/0.9.5/server/test/main.lua:24: in local 'test'
...a/lua-language-server/publish/0.9.5/server/test/main.lua:40: in local 'main'
...a/lua-language-server/publish/0.9.5/server/test/main.lua:46: in main chunk
[C]: in ?
stack traceback:
[C]: in function 'error'
publish.lua:87: in local 'runTest'
publish.lua:160: in main chunk
[C]: in ?
from lua-language-server.
@kidlj 再试一次,如果还是不行,你可以自己修改一下测试,然后用pull request提交给我。
from lua-language-server.
你好,测试通过了,出现了 ./bin/lua-language-server: Too many open files
的错误:
开始测试...
测试[core]...
测试[core]用时[0.108]
测试[definition]...
测试[definition]用时[0.376]
测试[rename]...
测试[rename]用时[0.017]
测试[highlight]...
测试[highlight]用时[0.017]
测试[references]...
测试[references]用时[0.029]
测试[diagnostics]...
测试[diagnostics]用时[0.274]
测试[type_inference]...
测试[type_inference]用时[0.117]
测试[find_lib]...
测试[find_lib]用时[0.054]
测试[hover]...
测试[hover]用时[0.392]
测试[completion]...
测试[completion]用时[0.222]
测试[signature]...
测试[signature]用时[0.073]
测试[document_symbol]...
测试[document_symbol]用时[0.049]
测试[crossfile]...
测试[crossfile]用时[0.190]
测试[full]...
基准编译测试[vm.txt]单次耗时:0.0696919333
基准诊断测试[vm.txt]单次耗时:0.0154956769
基准编译测试[largeGlobal.txt]单次耗时:1.3334330000
基准诊断测试[largeGlobal.txt]单次耗时:0.6221045000
测试[full]用时[5.029]
测试完成
删除多余文件...
清理发布目录...
复制到发布目录...
./bin/lua-language-server: Too many open files
stack traceback:
[C]: in function 'bee.filesystem.copy_file'
publish.lua:59: in upvalue 'copy'
publish.lua:51: in upvalue 'copy'
publish.lua:51: in upvalue 'copy'
publish.lua:51: in local 'copy'
publish.lua:64: in function <publish.lua:39>
publish.lua:178: in main chunk
[C]: in ?
from lua-language-server.
这个我也不是很清楚,你看看是不是有进程泄露了?
from lua-language-server.
@sumneko 没有检测到进程数量急剧变化。我也抽时间研究下代码,谢谢 :)
from lua-language-server.
@kidlj 我在 linux.sh
中看到一段代码:
# avoid too many file opened error
ulimit -n 4000
应该和你遇到的问题有关。
from lua-language-server.
./bin/lua-language-server: Too many open files
stack traceback:
[C]: in function 'bee.filesystem.copy_file'
publish.lua:59: in upvalue 'copy'
publish.lua:51: in upvalue 'copy'
publish.lua:51: in upvalue 'copy'
publish.lua:51: in local 'copy'
publish.lua:64: in function publish.lua:39
publish.lua:178: in main chunk
[C]: in ?
@kidlj @sumneko 遇到同样的问题,而且检查osx.sh脚本没看到问题,请问有解决办法了么?
from lua-language-server.
@JasonZe 你试试能否使用 linux.sh
中的解决方式,如果成功的话请告诉我。
from lua-language-server.
@JasonZe 你试试能否使用
linux.sh
中的解决方式,如果成功的话请告诉我。
加了 ulimit -n 4000 就好了,谢谢。
from lua-language-server.
用 @Jackson-soft 的方法,加上 ulimit -n 4000 我这边 osx 也 ok 了。谢谢。
from lua-language-server.
Has supported OSX.
from lua-language-server.
Related Issues (20)
- New line triggered replace tab indent to spaces HOT 10
- xmake function scope related support HOT 3
- luals not distinguishes between foo and bar.foo when require('foo') HOT 3
- Infer the type of the returned expression from the return type declaration
- Feature request: Inline hint size HOT 1
- Support auto complete of callback arguments where callback is defined via a local variable
- Two Rule Suggestions: multiple returns in function calls / table definitions and string concatenation
- 让两个注解都生效@enum,@type HOT 8
- Code colors completely gone
- Validation of function-type parameters
- Added the setting to use spaces instead of tabs when completing keywordSnippet. HOT 2
- lua_lsp is abnormally consuming memory. HOT 5
- Build fails with version 3.9.3 on OpenBSD
- When the subclass inherits the constructor of the parent class, generics do not work (the type of `self` cannot be used for annotation) HOT 1
- Function Prototype Narrowing with nils HOT 2
- Overload intellisense issue with type of parameters
- Overload intellise prototype issue with meta functions HOT 2
- `inject-field` error (`exact`) is not working as expected? HOT 4
- Typed field overrides the type of other fields HOT 1
- The type is not determined after the bitwise operation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lua-language-server.