File tree Expand file tree Collapse file tree 4 files changed +13
-1
lines changed Expand file tree Collapse file tree 4 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 11// Just some comment
22{
33 "Lua.misc.parameters" : [
4+ " --preview" ,
45 " --develop=true" ,
56 " --dbgport=11413" ,
67 ]
Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ local Template = {
208208 [' Lua.hint.arrayIndex' ] = Type .Boolean >> ' Auto' ,
209209 [' Lua.window.statusBar' ] = Type .Boolean >> true ,
210210 [' Lua.window.progressBar' ] = Type .Boolean >> true ,
211- [' Lua.format.enable' ] = Type .Boolean >> false ,
211+ [' Lua.format.enable' ] = Type .Boolean >> true ,
212212 [' Lua.IntelliSense.traceLocalSet' ] = Type .Boolean >> false ,
213213 [' Lua.IntelliSense.traceReturn' ] = Type .Boolean >> false ,
214214 [' Lua.IntelliSense.traceBeSetted' ] = Type .Boolean >> false ,
Original file line number Diff line number Diff line change @@ -33,3 +33,9 @@ FOOTPRINT = false
3333--- trace rpc, use command line: --rpclog=true
3434--- @type boolean
3535RPCLOG = false
36+
37+ -- enable preview features.
38+ --
39+ -- the current version is `formatting`
40+ --- @type boolean
41+ PREVIEW = false
Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ m.attributes = {}
6161function m .register (method )
6262 return function (attrs )
6363 m .attributes [method ] = attrs
64+ if attrs .preview and not PREVIEW then
65+ return
66+ end
6467 if attrs .capability then
6568 cap .filling (attrs .capability )
6669 end
@@ -999,6 +1002,7 @@ m.register 'textDocument/formatting' {
9991002 capability = {
10001003 documentFormattingProvider = true ,
10011004 },
1005+ preview = true ,
10021006 --- @async
10031007 function (params )
10041008 local uri = files .getRealUri (params .textDocument .uri )
@@ -1036,6 +1040,7 @@ m.register 'textDocument/rangeFormatting' {
10361040 capability = {
10371041 documentRangeFormattingProvider = true ,
10381042 },
1043+ preview = true ,
10391044 --- @async
10401045 function (params )
10411046 local uri = files .getRealUri (params .textDocument .uri )
You can’t perform that action at this time.
0 commit comments