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
2e78c013
Commit
2e78c013
authored
4 years ago
by
最萌小汐
Browse files
Options
Downloads
Patches
Plain Diff
#462 use required name instead of full path
parent
3ee51ba3
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
-0
15 additions, 0 deletions
platform.lua
script/log.lua
+3
-3
3 additions, 3 deletions
script/log.lua
with
18 additions
and
3 deletions
platform.lua
+
15
−
0
View file @
2e78c013
...
...
@@ -41,3 +41,18 @@ else
package.path
=
rootPath
..
script
..
'/?.lua'
..
';'
..
rootPath
..
script
..
'/?/init.lua'
end
package.searchers
[
2
]
=
function
(
name
)
local
filename
,
err
=
package.searchpath
(
name
,
package.path
)
if
not
filename
then
return
err
end
local
f
=
io.open
(
filename
)
local
buf
=
f
:
read
'*a'
f
:
close
()
local
init
,
err
=
load
(
buf
,
'@'
..
name
)
if
not
init
then
return
err
end
return
init
,
filename
end
This diff is collapsed.
Click to expand it.
script/log.lua
+
3
−
3
View file @
2e78c013
...
...
@@ -22,9 +22,9 @@ m.size = 0
m
.
maxSize
=
100
*
1024
*
1024
local
function
trimSrc
(
src
)
src
=
src
:
sub
(
m
.
prefixLen
+
3
,
-
5
)
src
=
src
:
g
sub
(
'^[/\\]+'
,
''
)
src
=
src
:
gsub
(
'[\\/]+'
,
'.'
)
if
src
:
sub
(
1
,
1
)
==
'@'
then
src
=
src
:
sub
(
2
)
end
return
src
end
...
...
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