File tree Expand file tree Collapse file tree 4 files changed +9
-3
lines changed
Expand file tree Collapse file tree 4 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 22
33## 3.7.0
44* ` NEW ` support ` ---@type ` and ` --[[@as]] ` for return statement
5+ * ` NEW ` commandline parameter ` --force-accept-workspace ` : allowing the use of the root directory or home directory as the workspace
56* ` FIX ` wrong hover and signature for method with varargs and overloads
67* ` FIX ` [ #2155 ]
78* ` FIX ` [ #2224 ]
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ local function loadArgs()
3636 end
3737 end
3838 if key then
39- _G [key :upper ()] = getValue (value )
39+ _G [key :upper (): gsub ( ' - ' , ' _ ' ) ] = getValue (value )
4040 end
4141 end
4242end
Original file line number Diff line number Diff line change @@ -77,3 +77,6 @@ jit = false
7777-- connect to client by socket
7878--- @type integer
7979SOCKET = 0
80+
81+ -- Allowing the use of the root directory or home directory as the workspace
82+ FORCE_ACCEPT_WORKSPACE = false
Original file line number Diff line number Diff line change @@ -50,8 +50,10 @@ function m.create(uri)
5050 m .folders [# m .folders + 1 ] = scp
5151 if uri == furi .encode ' /'
5252 or uri == furi .encode (os.getenv ' HOME' or ' ' ) then
53- client .showMessage (' Error' , lang .script (' WORKSPACE_NOT_ALLOWED' , furi .decode (uri )))
54- scp :set (' bad root' , true )
53+ if not FORCE_ACCEPT_WORKSPACE then
54+ client .showMessage (' Error' , lang .script (' WORKSPACE_NOT_ALLOWED' , furi .decode (uri )))
55+ scp :set (' bad root' , true )
56+ end
5557 end
5658end
5759
You can’t perform that action at this time.
0 commit comments