Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lua-language-server-srb2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LJ Sonic
lua-language-server-srb2
Commits
b237d035
Commit
b237d035
authored
5 years ago
by
最萌小汐
Browse files
Options
Downloads
Patches
Plain Diff
#110 更新cpath计算方式
parent
27a141bb
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
platform.lua
+15
-5
15 additions, 5 deletions
platform.lua
script-beta/debugger.lua
+1
-1
1 addition, 1 deletion
script-beta/debugger.lua
with
16 additions
and
6 deletions
platform.lua
+
15
−
5
View file @
b237d035
...
...
@@ -9,11 +9,21 @@ local function findExePath()
end
local
exePath
=
findExePath
()
local
exeDir
=
exePath
:
gsub
(
'[^/\\]-$'
,
''
)
local
dll
=
exePath
:
sub
(
-
4
)
==
'.exe'
and
'.dll'
or
'.so'
package.cpath
=
exeDir
..
'?'
..
dll
if
not
package.loadlib
(
exeDir
..
'bee'
..
dll
,
'luaopen_bee_platform'
)
then
error
(
[[It doesn't seem to support your OS, please build it in your OS, see https://github.com/sumneko/vscode-lua/wiki/Build]]
)
local
exeDir
=
exePath
:
match
(
'(.+)[/\\][%w_.-]+$'
)
local
dll
=
package.cpath
:
match
'[/\\]%?%.([a-z]+)'
package.cpath
=
(
'%s/?.%s'
):
format
(
exeDir
,
dll
)
if
not
package.loadlib
(
exeDir
..
'/bee.'
..
dll
,
'luaopen_bee_platform'
)
then
error
((
[[It doesn't seem to support your OS, please build it in your OS, see https://github.com/sumneko/vscode-lua/wiki/Build
exePath: %s
exeDir: %s
dll: %s
cpath: %s
]]
):
format
(
exePath
,
exeDir
,
dll
,
package.cpath
))
end
local
fs
=
require
'bee.filesystem'
...
...
This diff is collapsed.
Click to expand it.
script-beta/debugger.lua
+
1
−
1
View file @
b237d035
local
wait
=
...
local
fs
=
require
'bee.filesystem'
local
extensionPath
=
fs
.
path
(
os.getenv
'USERPROFILE'
)
/
'.vscode'
/
'extensions'
local
extensionPath
=
fs
.
path
(
os.getenv
'USERPROFILE'
or
''
)
/
'.vscode'
/
'extensions'
log
.
debug
(
'Search extensions at:'
,
extensionPath
:
string
())
if
not
fs
.
is_directory
(
extensionPath
)
then
log
.
debug
(
'Extension path is not a directory.'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment