Skip to content

Ar/typecheckfix #693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a853bf8
fix alias
Sep 27, 2021
83873c9
handle alias inheritance
Sep 29, 2021
2145e43
Merge branch 'master' into ar/typecheckfix
ArtistArthur Sep 29, 2021
6c44d00
improve typecheck and change infer: only infer out number and integer…
ArtistArthur Sep 29, 2021
3954846
Merge branch 'master' into ar/typecheckfix
ArtistArthur Sep 29, 2021
3b5ea31
Merge branch 'master' into ar/typecheckfix
ArtistArthur Sep 29, 2021
f61b730
improve typecheck
ArtistArthur Sep 30, 2021
a6b1f15
bin
ArtistArthur Sep 30, 2021
8e72143
Merge branch 'master' of github.com:sumneko/lua-language-server
ArtistArthur Sep 30, 2021
77548ff
Merge branch 'master' into ar/typecheckfix
ArtistArthur Sep 30, 2021
6e20694
improve
ArtistArthur Sep 30, 2021
c0762ff
Merge branch 'master' of github.com:sumneko/lua-language-server
ArtistArthur Sep 30, 2021
62249a7
remove bin
ArtistArthur Sep 30, 2021
b3395d9
Merge branch 'master' into ar/typecheckfix
ArtistArthur Sep 30, 2021
add1ab2
ask for loading plugin
sumneko Sep 30, 2021
c43f72f
improve
ArtistArthur Sep 30, 2021
38c9a69
improve comments
ArtistArthur Sep 30, 2021
8c256fc
beautify code
ArtistArthur Sep 30, 2021
934b5c9
#693 fix
sumneko Oct 1, 2021
4f543a8
Revert "#693 fix"
sumneko Oct 1, 2021
9afc1d8
#693 fix
sumneko Oct 1, 2021
26595d4
update debug for now
sumneko Oct 1, 2021
2183bf6
#693 no longer infer `nil`
sumneko Oct 1, 2021
47b53eb
add skynet meta
Gowa2017 Oct 1, 2021
98e3b26
infer config type by content
sumneko Oct 1, 2021
80cacc0
load config in `.luarc.json`
sumneko Oct 1, 2021
9175822
loading settings from `.luarc.json`
sumneko Oct 1, 2021
375ca5e
watch directory
sumneko Oct 1, 2021
a6a6100
Merge pull request #697 from Gowa2017/master
sumneko Oct 1, 2021
1eb1a9b
update changelog
sumneko Oct 1, 2021
6f15cb3
fix
sumneko Oct 1, 2021
8d393d7
2.4.0
sumneko Oct 1, 2021
6d4f656
fix #700 fix #701 check nil
sumneko Oct 1, 2021
9699af6
fix #698
sumneko Oct 1, 2021
a67ee53
fix changelog
sumneko Oct 1, 2021
f78be72
fix #699 check nil
sumneko Oct 1, 2021
70335a4
2.4.1
sumneko Oct 1, 2021
754b69b
更新编译脚本
actboy168 Oct 2, 2021
ad34dcc
Update make.lua
actboy168 Oct 2, 2021
e94c50a
Update launch.json
actboy168 Oct 2, 2021
52492c4
delete some variables not in skynet and alias a skynet message handler
Gowa2017 Oct 3, 2021
1d5e153
Merge pull request #705 from Gowa2017/master
sumneko Oct 3, 2021
04a19a0
init
ArtistArthur Oct 8, 2021
55ef030
Merge branch 'ar/typecheckfix' of github.com:ArtistArthur/lua-languag…
ArtistArthur Oct 8, 2021
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
5 changes: 3 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
"request": "launch",
"stopOnEntry": false,
"program": "${workspaceRoot}/test.lua",
"cpath": "${workspaceFolder}/bin/Windows/?.dll",
"luaexe": "${workspaceFolder}/bin/Windows/lua-language-server.exe",
"cpath": null,
"arg": [
],
"luaVersion": "latest",
"luaVersion": "5.4",
"consoleCoding": "utf8",
"sourceCoding": "utf8",
"outputCapture": [
Expand Down
9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# changelog

## 2.4.1
`2021-10-2`
* `FIX` broken with single file
* `FIX` [#698](https://github.com/sumneko/lua-language-server/issues/698)
* `FIX` [#699](https://github.com/sumneko/lua-language-server/issues/699)

## 2.4.0
`2021-10-1`
* `NEW` loading settings from `.luarc.json`
* `NEW` settings:
+ `Lua.diagnostics.libraryFiles`
+ `Lua.diagnostics.ignoredFiles`
Expand Down Expand Up @@ -33,6 +41,7 @@
---@module 'mylib'
local lib -- the same as `local lib = require 'mylib'`
```
* `NEW` add supports of `skynet`
* `CHG` hover: improve showing multi defines
* `CHG` hover: improve showing multi comments at enums
* `CHG` hover: shows method
Expand Down
11 changes: 11 additions & 0 deletions locale/en-us/script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,14 @@ An error occurred in the plugin, please report it to the plugin author.
Please check the details in the output or log.
Plugin path: {}
]]
PLUGIN_TRUST_LOAD = [[
The current settings try to load the plugin at this location:{}

Note that malicious plugin may harm your computer
]]
PLUGIN_TRUST_YES = [[
Trust and load this plugin
]]
PLUGIN_TRUST_NO = [[
Don't load this plugin
]]
11 changes: 11 additions & 0 deletions locale/zh-cn/script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,14 @@ PLUGIN_RUNTIME_ERROR = [[
请在输出或日志中查看详细信息。
插件路径:{}
]]
PLUGIN_TRUST_LOAD = [[
当前设置试图加载位于此位置的插件:{}

注意,恶意的插件可能会危害您的电脑
]]
PLUGIN_TRUST_YES = [[
信任并加载插件
]]
PLUGIN_TRUST_NO = [[
不要加载此插件
]]
46 changes: 33 additions & 13 deletions make.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
local lm = require 'luamake'
local platform = require 'bee.platform'
local fs = require 'bee.filesystem'
local exe = platform.OS == 'Windows' and ".exe" or ""

lm.EXE = "lua"
lm.bindir = "bin/"..platform.OS

lm.EXE_NAME = "lua-language-server"
lm.EXE_DIR = lm.bindir
lm.EXE_RESOURCE = "../../make/lua-language-server.rc"
lm:import "3rd/bee.lua/make.lua"

Expand All @@ -14,23 +20,37 @@ lm:lua_dll 'lpeglabel' {
}

lm:build 'install' {
'$luamake', 'lua', 'make/install.lua', lm.builddir,
'$luamake', 'lua', 'make/install.lua',
}

lm:copy "copy_bootstrap" {
input = "make/bootstrap.lua",
output = lm.bindir.."/main.lua",
}

lm:build "bee-test" {
lm.bindir.."/"..lm.EXE_NAME..exe, "3rd/bee.lua/test/test.lua",
pool = "console",
deps = {
'lua',
'lpeglabel',
'bee',
}
lm.EXE_NAME,
"copy_bootstrap"
},
}

local fs = require 'bee.filesystem'
local pf = require 'bee.platform'
local exe = pf.OS == 'Windows' and ".exe" or ""
lm:build 'unittest' {
fs.path 'bin' / pf.OS / ('lua-language-server' .. exe), 'test.lua', '-E',
lm:build 'unit-test' {
lm.bindir.."/"..lm.EXE_NAME..exe, 'test.lua',
pool = "console",
deps = {
'install',
"bee-test",
"lpeglabel",
},
windows = {
deps = "lua54"
}
}

lm:default 'unittest'
lm:default {
"bee-test",
"unit-test",
"install",
}
38 changes: 38 additions & 0 deletions make/bootstrap.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
local i = 1
while true do
if arg[i] == '-E' then
elseif arg[i] == '-e' then
i = i + 1
local expr = assert(arg[i], "'-e' needs argument")
assert(load(expr, "=(command line)"))()
else
break
end
i = i + 1
end

if arg[i] == nil then
return
end

for j = -1, #arg do
arg[j - i] = arg[j]
end
for j = #arg - i + 1, #arg do
arg[j] = nil
end

local root; do
local sep = package.config:sub(1,1)
local pattern = "["..sep.."][^"..sep.."]+"
root = package.cpath:match("(.+)"..pattern..pattern..pattern.."$")
end

local fs = require "bee.filesystem"
fs.current_path(fs.path(root))

package.path = table.concat({
root .. "/script/?.lua",
root .. "/script/?/init.lua",
}, ";")
assert(loadfile(arg[0]))(table.unpack(arg))
12 changes: 0 additions & 12 deletions make/install.lua
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
local builddir = ...
local fs = require 'bee.filesystem'
local pf = require 'bee.platform'

local CWD = fs.current_path()
local output = CWD / 'bin' / pf.OS
local bindir = CWD / builddir / 'bin'
local exe = pf.OS == 'Windows' and ".exe" or ""
local dll = pf.OS == 'Windows' and ".dll" or ".so"
local OVERWRITE = fs.copy_options.overwrite_existing

fs.create_directories(output)
fs.copy_file(bindir / 'lpeglabel'..dll, output / 'lpeglabel'..dll, OVERWRITE)
fs.copy_file(bindir / 'bee'..dll, output / 'bee'..dll, OVERWRITE)
fs.copy_file(bindir / 'lua'..exe, output / 'lua-language-server'..exe, OVERWRITE)

if pf.OS == 'Windows' then
fs.copy_file(bindir / 'lua54'..dll, output / 'lua54'..dll, OVERWRITE)
require 'msvc'.copy_vcrt('x64', output)
end
1 change: 1 addition & 0 deletions meta/3rd/skynet/config.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
words = { "skynet.start" }
Loading