protocol.lua 182 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534
  1. --[[
  2. THIS FILE IS GENERATED by scripts/gen_lsp.lua
  3. DO NOT EDIT MANUALLY
  4. Based on LSP protocol 3.18
  5. Regenerate:
  6. nvim -l scripts/gen_lsp.lua gen --version 3.18
  7. --]]
  8. ---@meta
  9. error('Cannot require a meta file')
  10. ---@alias lsp.null nil
  11. ---@alias uinteger integer
  12. ---@alias decimal number
  13. ---@alias lsp.DocumentUri string
  14. ---@alias lsp.URI string
  15. ---@class lsp.ImplementationParams: lsp.TextDocumentPositionParams, lsp.WorkDoneProgressParams, lsp.PartialResultParams
  16. ---Represents a location inside a resource, such as a line
  17. ---inside a text file.
  18. ---@class lsp.Location
  19. ---
  20. ---@field uri lsp.DocumentUri
  21. ---
  22. ---@field range lsp.Range
  23. ---@class lsp.ImplementationRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.ImplementationOptions, lsp.StaticRegistrationOptions
  24. ---@class lsp.TypeDefinitionParams: lsp.TextDocumentPositionParams, lsp.WorkDoneProgressParams, lsp.PartialResultParams
  25. ---@class lsp.TypeDefinitionRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.TypeDefinitionOptions, lsp.StaticRegistrationOptions
  26. ---A workspace folder inside a client.
  27. ---@class lsp.WorkspaceFolder
  28. ---
  29. ---The associated URI for this workspace folder.
  30. ---@field uri lsp.URI
  31. ---
  32. ---The name of the workspace folder. Used to refer to this
  33. ---workspace folder in the user interface.
  34. ---@field name string
  35. ---The parameters of a `workspace/didChangeWorkspaceFolders` notification.
  36. ---@class lsp.DidChangeWorkspaceFoldersParams
  37. ---
  38. ---The actual workspace folder change event.
  39. ---@field event lsp.WorkspaceFoldersChangeEvent
  40. ---The parameters of a configuration request.
  41. ---@class lsp.ConfigurationParams
  42. ---
  43. ---@field items lsp.ConfigurationItem[]
  44. ---Parameters for a {@link DocumentColorRequest}.
  45. ---@class lsp.DocumentColorParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  46. ---
  47. ---The text document.
  48. ---@field textDocument lsp.TextDocumentIdentifier
  49. ---Represents a color range from a document.
  50. ---@class lsp.ColorInformation
  51. ---
  52. ---The range in the document where this color appears.
  53. ---@field range lsp.Range
  54. ---
  55. ---The actual color value for this color range.
  56. ---@field color lsp.Color
  57. ---@class lsp.DocumentColorRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.DocumentColorOptions, lsp.StaticRegistrationOptions
  58. ---Parameters for a {@link ColorPresentationRequest}.
  59. ---@class lsp.ColorPresentationParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  60. ---
  61. ---The text document.
  62. ---@field textDocument lsp.TextDocumentIdentifier
  63. ---
  64. ---The color to request presentations for.
  65. ---@field color lsp.Color
  66. ---
  67. ---The range where the color would be inserted. Serves as a context.
  68. ---@field range lsp.Range
  69. ---@class lsp.ColorPresentation
  70. ---
  71. ---The label of this color presentation. It will be shown on the color
  72. ---picker header. By default this is also the text that is inserted when selecting
  73. ---this color presentation.
  74. ---@field label string
  75. ---
  76. ---An {@link TextEdit edit} which is applied to a document when selecting
  77. ---this presentation for the color. When `falsy` the {@link ColorPresentation.label label}
  78. ---is used.
  79. ---@field textEdit? lsp.TextEdit
  80. ---
  81. ---An optional array of additional {@link TextEdit text edits} that are applied when
  82. ---selecting this color presentation. Edits must not overlap with the main {@link ColorPresentation.textEdit edit} nor with themselves.
  83. ---@field additionalTextEdits? lsp.TextEdit[]
  84. ---@class lsp.WorkDoneProgressOptions
  85. ---
  86. ---@field workDoneProgress? boolean
  87. ---General text document registration options.
  88. ---@class lsp.TextDocumentRegistrationOptions
  89. ---
  90. ---A document selector to identify the scope of the registration. If set to null
  91. ---the document selector provided on the client side will be used.
  92. ---@field documentSelector lsp.DocumentSelector|lsp.null
  93. ---Parameters for a {@link FoldingRangeRequest}.
  94. ---@class lsp.FoldingRangeParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  95. ---
  96. ---The text document.
  97. ---@field textDocument lsp.TextDocumentIdentifier
  98. ---Represents a folding range. To be valid, start and end line must be bigger than zero and smaller
  99. ---than the number of lines in the document. Clients are free to ignore invalid ranges.
  100. ---@class lsp.FoldingRange
  101. ---
  102. ---The zero-based start line of the range to fold. The folded area starts after the line's last character.
  103. ---To be valid, the end must be zero or larger and smaller than the number of lines in the document.
  104. ---@field startLine uinteger
  105. ---
  106. ---The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.
  107. ---@field startCharacter? uinteger
  108. ---
  109. ---The zero-based end line of the range to fold. The folded area ends with the line's last character.
  110. ---To be valid, the end must be zero or larger and smaller than the number of lines in the document.
  111. ---@field endLine uinteger
  112. ---
  113. ---The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.
  114. ---@field endCharacter? uinteger
  115. ---
  116. ---Describes the kind of the folding range such as 'comment' or 'region'. The kind
  117. ---is used to categorize folding ranges and used by commands like 'Fold all comments'.
  118. ---See {@link FoldingRangeKind} for an enumeration of standardized kinds.
  119. ---@field kind? lsp.FoldingRangeKind
  120. ---
  121. ---The text that the client should show when the specified range is
  122. ---collapsed. If not defined or not supported by the client, a default
  123. ---will be chosen by the client.
  124. ---
  125. ---@since 3.17.0
  126. ---@field collapsedText? string
  127. ---@class lsp.FoldingRangeRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.FoldingRangeOptions, lsp.StaticRegistrationOptions
  128. ---@class lsp.DeclarationParams: lsp.TextDocumentPositionParams, lsp.WorkDoneProgressParams, lsp.PartialResultParams
  129. ---@class lsp.DeclarationRegistrationOptions: lsp.DeclarationOptions, lsp.TextDocumentRegistrationOptions, lsp.StaticRegistrationOptions
  130. ---A parameter literal used in selection range requests.
  131. ---@class lsp.SelectionRangeParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  132. ---
  133. ---The text document.
  134. ---@field textDocument lsp.TextDocumentIdentifier
  135. ---
  136. ---The positions inside the text document.
  137. ---@field positions lsp.Position[]
  138. ---A selection range represents a part of a selection hierarchy. A selection range
  139. ---may have a parent selection range that contains it.
  140. ---@class lsp.SelectionRange
  141. ---
  142. ---The {@link Range range} of this selection range.
  143. ---@field range lsp.Range
  144. ---
  145. ---The parent selection range containing this range. Therefore `parent.range` must contain `this.range`.
  146. ---@field parent? lsp.SelectionRange
  147. ---@class lsp.SelectionRangeRegistrationOptions: lsp.SelectionRangeOptions, lsp.TextDocumentRegistrationOptions, lsp.StaticRegistrationOptions
  148. ---@class lsp.WorkDoneProgressCreateParams
  149. ---
  150. ---The token to be used to report progress.
  151. ---@field token lsp.ProgressToken
  152. ---@class lsp.WorkDoneProgressCancelParams
  153. ---
  154. ---The token to be used to report progress.
  155. ---@field token lsp.ProgressToken
  156. ---The parameter of a `textDocument/prepareCallHierarchy` request.
  157. ---
  158. ---@since 3.16.0
  159. ---@class lsp.CallHierarchyPrepareParams: lsp.TextDocumentPositionParams, lsp.WorkDoneProgressParams
  160. ---Represents programming constructs like functions or constructors in the context
  161. ---of call hierarchy.
  162. ---
  163. ---@since 3.16.0
  164. ---@class lsp.CallHierarchyItem
  165. ---
  166. ---The name of this item.
  167. ---@field name string
  168. ---
  169. ---The kind of this item.
  170. ---@field kind lsp.SymbolKind
  171. ---
  172. ---Tags for this item.
  173. ---@field tags? lsp.SymbolTag[]
  174. ---
  175. ---More detail for this item, e.g. the signature of a function.
  176. ---@field detail? string
  177. ---
  178. ---The resource identifier of this item.
  179. ---@field uri lsp.DocumentUri
  180. ---
  181. ---The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.
  182. ---@field range lsp.Range
  183. ---
  184. ---The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function.
  185. ---Must be contained by the {@link CallHierarchyItem.range `range`}.
  186. ---@field selectionRange lsp.Range
  187. ---
  188. ---A data entry field that is preserved between a call hierarchy prepare and
  189. ---incoming calls or outgoing calls requests.
  190. ---@field data? lsp.LSPAny
  191. ---Call hierarchy options used during static or dynamic registration.
  192. ---
  193. ---@since 3.16.0
  194. ---@class lsp.CallHierarchyRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.CallHierarchyOptions, lsp.StaticRegistrationOptions
  195. ---The parameter of a `callHierarchy/incomingCalls` request.
  196. ---
  197. ---@since 3.16.0
  198. ---@class lsp.CallHierarchyIncomingCallsParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  199. ---
  200. ---@field item lsp.CallHierarchyItem
  201. ---Represents an incoming call, e.g. a caller of a method or constructor.
  202. ---
  203. ---@since 3.16.0
  204. ---@class lsp.CallHierarchyIncomingCall
  205. ---
  206. ---The item that makes the call.
  207. ---@field from lsp.CallHierarchyItem
  208. ---
  209. ---The ranges at which the calls appear. This is relative to the caller
  210. ---denoted by {@link CallHierarchyIncomingCall.from `this.from`}.
  211. ---@field fromRanges lsp.Range[]
  212. ---The parameter of a `callHierarchy/outgoingCalls` request.
  213. ---
  214. ---@since 3.16.0
  215. ---@class lsp.CallHierarchyOutgoingCallsParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  216. ---
  217. ---@field item lsp.CallHierarchyItem
  218. ---Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.
  219. ---
  220. ---@since 3.16.0
  221. ---@class lsp.CallHierarchyOutgoingCall
  222. ---
  223. ---The item that is called.
  224. ---@field to lsp.CallHierarchyItem
  225. ---
  226. ---The range at which this item is called. This is the range relative to the caller, e.g the item
  227. ---passed to {@link CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls `provideCallHierarchyOutgoingCalls`}
  228. ---and not {@link CallHierarchyOutgoingCall.to `this.to`}.
  229. ---@field fromRanges lsp.Range[]
  230. ---@since 3.16.0
  231. ---@class lsp.SemanticTokensParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  232. ---
  233. ---The text document.
  234. ---@field textDocument lsp.TextDocumentIdentifier
  235. ---@since 3.16.0
  236. ---@class lsp.SemanticTokens
  237. ---
  238. ---An optional result id. If provided and clients support delta updating
  239. ---the client will include the result id in the next semantic token request.
  240. ---A server can then instead of computing all semantic tokens again simply
  241. ---send a delta.
  242. ---@field resultId? string
  243. ---
  244. ---The actual tokens.
  245. ---@field data uinteger[]
  246. ---@since 3.16.0
  247. ---@class lsp.SemanticTokensPartialResult
  248. ---
  249. ---@field data uinteger[]
  250. ---@since 3.16.0
  251. ---@class lsp.SemanticTokensRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.SemanticTokensOptions, lsp.StaticRegistrationOptions
  252. ---@since 3.16.0
  253. ---@class lsp.SemanticTokensDeltaParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  254. ---
  255. ---The text document.
  256. ---@field textDocument lsp.TextDocumentIdentifier
  257. ---
  258. ---The result id of a previous response. The result Id can either point to a full response
  259. ---or a delta response depending on what was received last.
  260. ---@field previousResultId string
  261. ---@since 3.16.0
  262. ---@class lsp.SemanticTokensDelta
  263. ---
  264. ---@field resultId? string
  265. ---
  266. ---The semantic token edits to transform a previous result into a new result.
  267. ---@field edits lsp.SemanticTokensEdit[]
  268. ---@since 3.16.0
  269. ---@class lsp.SemanticTokensDeltaPartialResult
  270. ---
  271. ---@field edits lsp.SemanticTokensEdit[]
  272. ---@since 3.16.0
  273. ---@class lsp.SemanticTokensRangeParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  274. ---
  275. ---The text document.
  276. ---@field textDocument lsp.TextDocumentIdentifier
  277. ---
  278. ---The range the semantic tokens are requested for.
  279. ---@field range lsp.Range
  280. ---Params to show a resource in the UI.
  281. ---
  282. ---@since 3.16.0
  283. ---@class lsp.ShowDocumentParams
  284. ---
  285. ---The uri to show.
  286. ---@field uri lsp.URI
  287. ---
  288. ---Indicates to show the resource in an external program.
  289. ---To show, for example, `https://code.visualstudio.com/`
  290. ---in the default WEB browser set `external` to `true`.
  291. ---@field external? boolean
  292. ---
  293. ---An optional property to indicate whether the editor
  294. ---showing the document should take focus or not.
  295. ---Clients might ignore this property if an external
  296. ---program is started.
  297. ---@field takeFocus? boolean
  298. ---
  299. ---An optional selection range if the document is a text
  300. ---document. Clients might ignore the property if an
  301. ---external program is started or the file is not a text
  302. ---file.
  303. ---@field selection? lsp.Range
  304. ---The result of a showDocument request.
  305. ---
  306. ---@since 3.16.0
  307. ---@class lsp.ShowDocumentResult
  308. ---
  309. ---A boolean indicating if the show was successful.
  310. ---@field success boolean
  311. ---@class lsp.LinkedEditingRangeParams: lsp.TextDocumentPositionParams, lsp.WorkDoneProgressParams
  312. ---The result of a linked editing range request.
  313. ---
  314. ---@since 3.16.0
  315. ---@class lsp.LinkedEditingRanges
  316. ---
  317. ---A list of ranges that can be edited together. The ranges must have
  318. ---identical length and contain identical text content. The ranges cannot overlap.
  319. ---@field ranges lsp.Range[]
  320. ---
  321. ---An optional word pattern (regular expression) that describes valid contents for
  322. ---the given ranges. If no pattern is provided, the client configuration's word
  323. ---pattern will be used.
  324. ---@field wordPattern? string
  325. ---@class lsp.LinkedEditingRangeRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.LinkedEditingRangeOptions, lsp.StaticRegistrationOptions
  326. ---The parameters sent in notifications/requests for user-initiated creation of
  327. ---files.
  328. ---
  329. ---@since 3.16.0
  330. ---@class lsp.CreateFilesParams
  331. ---
  332. ---An array of all files/folders created in this operation.
  333. ---@field files lsp.FileCreate[]
  334. ---A workspace edit represents changes to many resources managed in the workspace. The edit
  335. ---should either provide `changes` or `documentChanges`. If documentChanges are present
  336. ---they are preferred over `changes` if the client can handle versioned document edits.
  337. ---
  338. ---Since version 3.13.0 a workspace edit can contain resource operations as well. If resource
  339. ---operations are present clients need to execute the operations in the order in which they
  340. ---are provided. So a workspace edit for example can consist of the following two changes:
  341. ---(1) a create file a.txt and (2) a text document edit which insert text into file a.txt.
  342. ---
  343. ---An invalid sequence (e.g. (1) delete file a.txt and (2) insert text into file a.txt) will
  344. ---cause failure of the operation. How the client recovers from the failure is described by
  345. ---the client capability: `workspace.workspaceEdit.failureHandling`
  346. ---@class lsp.WorkspaceEdit
  347. ---
  348. ---Holds changes to existing resources.
  349. ---@field changes? table<lsp.DocumentUri, lsp.TextEdit[]>
  350. ---
  351. ---Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes
  352. ---are either an array of `TextDocumentEdit`s to express changes to n different text documents
  353. ---where each text document edit addresses a specific version of a text document. Or it can contain
  354. ---above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations.
  355. ---
  356. ---Whether a client supports versioned document edits is expressed via
  357. ---`workspace.workspaceEdit.documentChanges` client capability.
  358. ---
  359. ---If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then
  360. ---only plain `TextEdit`s using the `changes` property are supported.
  361. ---@field documentChanges? (lsp.TextDocumentEdit|lsp.CreateFile|lsp.RenameFile|lsp.DeleteFile)[]
  362. ---
  363. ---A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and
  364. ---delete file / folder operations.
  365. ---
  366. ---Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`.
  367. ---
  368. ---@since 3.16.0
  369. ---@field changeAnnotations? table<lsp.ChangeAnnotationIdentifier, lsp.ChangeAnnotation>
  370. ---The options to register for file operations.
  371. ---
  372. ---@since 3.16.0
  373. ---@class lsp.FileOperationRegistrationOptions
  374. ---
  375. ---The actual filters.
  376. ---@field filters lsp.FileOperationFilter[]
  377. ---The parameters sent in notifications/requests for user-initiated renames of
  378. ---files.
  379. ---
  380. ---@since 3.16.0
  381. ---@class lsp.RenameFilesParams
  382. ---
  383. ---An array of all files/folders renamed in this operation. When a folder is renamed, only
  384. ---the folder will be included, and not its children.
  385. ---@field files lsp.FileRename[]
  386. ---The parameters sent in notifications/requests for user-initiated deletes of
  387. ---files.
  388. ---
  389. ---@since 3.16.0
  390. ---@class lsp.DeleteFilesParams
  391. ---
  392. ---An array of all files/folders deleted in this operation.
  393. ---@field files lsp.FileDelete[]
  394. ---@class lsp.MonikerParams: lsp.TextDocumentPositionParams, lsp.WorkDoneProgressParams, lsp.PartialResultParams
  395. ---Moniker definition to match LSIF 0.5 moniker definition.
  396. ---
  397. ---@since 3.16.0
  398. ---@class lsp.Moniker
  399. ---
  400. ---The scheme of the moniker. For example tsc or .Net
  401. ---@field scheme string
  402. ---
  403. ---The identifier of the moniker. The value is opaque in LSIF however
  404. ---schema owners are allowed to define the structure if they want.
  405. ---@field identifier string
  406. ---
  407. ---The scope in which the moniker is unique
  408. ---@field unique lsp.UniquenessLevel
  409. ---
  410. ---The moniker kind if known.
  411. ---@field kind? lsp.MonikerKind
  412. ---@class lsp.MonikerRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.MonikerOptions
  413. ---The parameter of a `textDocument/prepareTypeHierarchy` request.
  414. ---
  415. ---@since 3.17.0
  416. ---@class lsp.TypeHierarchyPrepareParams: lsp.TextDocumentPositionParams, lsp.WorkDoneProgressParams
  417. ---@since 3.17.0
  418. ---@class lsp.TypeHierarchyItem
  419. ---
  420. ---The name of this item.
  421. ---@field name string
  422. ---
  423. ---The kind of this item.
  424. ---@field kind lsp.SymbolKind
  425. ---
  426. ---Tags for this item.
  427. ---@field tags? lsp.SymbolTag[]
  428. ---
  429. ---More detail for this item, e.g. the signature of a function.
  430. ---@field detail? string
  431. ---
  432. ---The resource identifier of this item.
  433. ---@field uri lsp.DocumentUri
  434. ---
  435. ---The range enclosing this symbol not including leading/trailing whitespace
  436. ---but everything else, e.g. comments and code.
  437. ---@field range lsp.Range
  438. ---
  439. ---The range that should be selected and revealed when this symbol is being
  440. ---picked, e.g. the name of a function. Must be contained by the
  441. ---{@link TypeHierarchyItem.range `range`}.
  442. ---@field selectionRange lsp.Range
  443. ---
  444. ---A data entry field that is preserved between a type hierarchy prepare and
  445. ---supertypes or subtypes requests. It could also be used to identify the
  446. ---type hierarchy in the server, helping improve the performance on
  447. ---resolving supertypes and subtypes.
  448. ---@field data? lsp.LSPAny
  449. ---Type hierarchy options used during static or dynamic registration.
  450. ---
  451. ---@since 3.17.0
  452. ---@class lsp.TypeHierarchyRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.TypeHierarchyOptions, lsp.StaticRegistrationOptions
  453. ---The parameter of a `typeHierarchy/supertypes` request.
  454. ---
  455. ---@since 3.17.0
  456. ---@class lsp.TypeHierarchySupertypesParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  457. ---
  458. ---@field item lsp.TypeHierarchyItem
  459. ---The parameter of a `typeHierarchy/subtypes` request.
  460. ---
  461. ---@since 3.17.0
  462. ---@class lsp.TypeHierarchySubtypesParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  463. ---
  464. ---@field item lsp.TypeHierarchyItem
  465. ---A parameter literal used in inline value requests.
  466. ---
  467. ---@since 3.17.0
  468. ---@class lsp.InlineValueParams: lsp.WorkDoneProgressParams
  469. ---
  470. ---The text document.
  471. ---@field textDocument lsp.TextDocumentIdentifier
  472. ---
  473. ---The document range for which inline values should be computed.
  474. ---@field range lsp.Range
  475. ---
  476. ---Additional information about the context in which inline values were
  477. ---requested.
  478. ---@field context lsp.InlineValueContext
  479. ---Inline value options used during static or dynamic registration.
  480. ---
  481. ---@since 3.17.0
  482. ---@class lsp.InlineValueRegistrationOptions: lsp.InlineValueOptions, lsp.TextDocumentRegistrationOptions, lsp.StaticRegistrationOptions
  483. ---A parameter literal used in inlay hint requests.
  484. ---
  485. ---@since 3.17.0
  486. ---@class lsp.InlayHintParams: lsp.WorkDoneProgressParams
  487. ---
  488. ---The text document.
  489. ---@field textDocument lsp.TextDocumentIdentifier
  490. ---
  491. ---The document range for which inlay hints should be computed.
  492. ---@field range lsp.Range
  493. ---Inlay hint information.
  494. ---
  495. ---@since 3.17.0
  496. ---@class lsp.InlayHint
  497. ---
  498. ---The position of this hint.
  499. ---
  500. ---If multiple hints have the same position, they will be shown in the order
  501. ---they appear in the response.
  502. ---@field position lsp.Position
  503. ---
  504. ---The label of this hint. A human readable string or an array of
  505. ---InlayHintLabelPart label parts.
  506. ---
  507. ---*Note* that neither the string nor the label part can be empty.
  508. ---@field label string|lsp.InlayHintLabelPart[]
  509. ---
  510. ---The kind of this hint. Can be omitted in which case the client
  511. ---should fall back to a reasonable default.
  512. ---@field kind? lsp.InlayHintKind
  513. ---
  514. ---Optional text edits that are performed when accepting this inlay hint.
  515. ---
  516. ---*Note* that edits are expected to change the document so that the inlay
  517. ---hint (or its nearest variant) is now part of the document and the inlay
  518. ---hint itself is now obsolete.
  519. ---@field textEdits? lsp.TextEdit[]
  520. ---
  521. ---The tooltip text when you hover over this item.
  522. ---@field tooltip? string|lsp.MarkupContent
  523. ---
  524. ---Render padding before the hint.
  525. ---
  526. ---Note: Padding should use the editor's background color, not the
  527. ---background color of the hint itself. That means padding can be used
  528. ---to visually align/separate an inlay hint.
  529. ---@field paddingLeft? boolean
  530. ---
  531. ---Render padding after the hint.
  532. ---
  533. ---Note: Padding should use the editor's background color, not the
  534. ---background color of the hint itself. That means padding can be used
  535. ---to visually align/separate an inlay hint.
  536. ---@field paddingRight? boolean
  537. ---
  538. ---A data entry field that is preserved on an inlay hint between
  539. ---a `textDocument/inlayHint` and a `inlayHint/resolve` request.
  540. ---@field data? lsp.LSPAny
  541. ---Inlay hint options used during static or dynamic registration.
  542. ---
  543. ---@since 3.17.0
  544. ---@class lsp.InlayHintRegistrationOptions: lsp.InlayHintOptions, lsp.TextDocumentRegistrationOptions, lsp.StaticRegistrationOptions
  545. ---Parameters of the document diagnostic request.
  546. ---
  547. ---@since 3.17.0
  548. ---@class lsp.DocumentDiagnosticParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  549. ---
  550. ---The text document.
  551. ---@field textDocument lsp.TextDocumentIdentifier
  552. ---
  553. ---The additional identifier provided during registration.
  554. ---@field identifier? string
  555. ---
  556. ---The result id of a previous response if provided.
  557. ---@field previousResultId? string
  558. ---A partial result for a document diagnostic report.
  559. ---
  560. ---@since 3.17.0
  561. ---@class lsp.DocumentDiagnosticReportPartialResult
  562. ---
  563. ---@field relatedDocuments table<lsp.DocumentUri, lsp.FullDocumentDiagnosticReport|lsp.UnchangedDocumentDiagnosticReport>
  564. ---Cancellation data returned from a diagnostic request.
  565. ---
  566. ---@since 3.17.0
  567. ---@class lsp.DiagnosticServerCancellationData
  568. ---
  569. ---@field retriggerRequest boolean
  570. ---Diagnostic registration options.
  571. ---
  572. ---@since 3.17.0
  573. ---@class lsp.DiagnosticRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.DiagnosticOptions, lsp.StaticRegistrationOptions
  574. ---Parameters of the workspace diagnostic request.
  575. ---
  576. ---@since 3.17.0
  577. ---@class lsp.WorkspaceDiagnosticParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  578. ---
  579. ---The additional identifier provided during registration.
  580. ---@field identifier? string
  581. ---
  582. ---The currently known diagnostic reports with their
  583. ---previous result ids.
  584. ---@field previousResultIds lsp.PreviousResultId[]
  585. ---A workspace diagnostic report.
  586. ---
  587. ---@since 3.17.0
  588. ---@class lsp.WorkspaceDiagnosticReport
  589. ---
  590. ---@field items lsp.WorkspaceDocumentDiagnosticReport[]
  591. ---A partial result for a workspace diagnostic report.
  592. ---
  593. ---@since 3.17.0
  594. ---@class lsp.WorkspaceDiagnosticReportPartialResult
  595. ---
  596. ---@field items lsp.WorkspaceDocumentDiagnosticReport[]
  597. ---The params sent in an open notebook document notification.
  598. ---
  599. ---@since 3.17.0
  600. ---@class lsp.DidOpenNotebookDocumentParams
  601. ---
  602. ---The notebook document that got opened.
  603. ---@field notebookDocument lsp.NotebookDocument
  604. ---
  605. ---The text documents that represent the content
  606. ---of a notebook cell.
  607. ---@field cellTextDocuments lsp.TextDocumentItem[]
  608. ---Registration options specific to a notebook.
  609. ---
  610. ---@since 3.17.0
  611. ---@class lsp.NotebookDocumentSyncRegistrationOptions: lsp.NotebookDocumentSyncOptions, lsp.StaticRegistrationOptions
  612. ---The params sent in a change notebook document notification.
  613. ---
  614. ---@since 3.17.0
  615. ---@class lsp.DidChangeNotebookDocumentParams
  616. ---
  617. ---The notebook document that did change. The version number points
  618. ---to the version after all provided changes have been applied. If
  619. ---only the text document content of a cell changes the notebook version
  620. ---doesn't necessarily have to change.
  621. ---@field notebookDocument lsp.VersionedNotebookDocumentIdentifier
  622. ---
  623. ---The actual changes to the notebook document.
  624. ---
  625. ---The changes describe single state changes to the notebook document.
  626. ---So if there are two changes c1 (at array index 0) and c2 (at array
  627. ---index 1) for a notebook in state S then c1 moves the notebook from
  628. ---S to S' and c2 from S' to S''. So c1 is computed on the state S and
  629. ---c2 is computed on the state S'.
  630. ---
  631. ---To mirror the content of a notebook using change events use the following approach:
  632. ---- start with the same initial content
  633. ---- apply the 'notebookDocument/didChange' notifications in the order you receive them.
  634. ---- apply the `NotebookChangeEvent`s in a single notification in the order
  635. --- you receive them.
  636. ---@field change lsp.NotebookDocumentChangeEvent
  637. ---The params sent in a save notebook document notification.
  638. ---
  639. ---@since 3.17.0
  640. ---@class lsp.DidSaveNotebookDocumentParams
  641. ---
  642. ---The notebook document that got saved.
  643. ---@field notebookDocument lsp.NotebookDocumentIdentifier
  644. ---The params sent in a close notebook document notification.
  645. ---
  646. ---@since 3.17.0
  647. ---@class lsp.DidCloseNotebookDocumentParams
  648. ---
  649. ---The notebook document that got closed.
  650. ---@field notebookDocument lsp.NotebookDocumentIdentifier
  651. ---
  652. ---The text documents that represent the content
  653. ---of a notebook cell that got closed.
  654. ---@field cellTextDocuments lsp.TextDocumentIdentifier[]
  655. ---A parameter literal used in inline completion requests.
  656. ---
  657. ---@since 3.18.0
  658. ---@proposed
  659. ---@class lsp.InlineCompletionParams: lsp.TextDocumentPositionParams, lsp.WorkDoneProgressParams
  660. ---
  661. ---Additional information about the context in which inline completions were
  662. ---requested.
  663. ---@field context lsp.InlineCompletionContext
  664. ---Represents a collection of {@link InlineCompletionItem inline completion items} to be presented in the editor.
  665. ---
  666. ---@since 3.18.0
  667. ---@proposed
  668. ---@class lsp.InlineCompletionList
  669. ---
  670. ---The inline completion items
  671. ---@field items lsp.InlineCompletionItem[]
  672. ---An inline completion item represents a text snippet that is proposed inline to complete text that is being typed.
  673. ---
  674. ---@since 3.18.0
  675. ---@proposed
  676. ---@class lsp.InlineCompletionItem
  677. ---
  678. ---The text to replace the range with. Must be set.
  679. ---@field insertText string|lsp.StringValue
  680. ---
  681. ---A text that is used to decide if this inline completion should be shown. When `falsy` the {@link InlineCompletionItem.insertText} is used.
  682. ---@field filterText? string
  683. ---
  684. ---The range to replace. Must begin and end on the same line.
  685. ---@field range? lsp.Range
  686. ---
  687. ---An optional {@link Command} that is executed *after* inserting this completion.
  688. ---@field command? lsp.Command
  689. ---Inline completion options used during static or dynamic registration.
  690. ---
  691. ---@since 3.18.0
  692. ---@proposed
  693. ---@class lsp.InlineCompletionRegistrationOptions: lsp.InlineCompletionOptions, lsp.TextDocumentRegistrationOptions, lsp.StaticRegistrationOptions
  694. ---@class lsp.RegistrationParams
  695. ---
  696. ---@field registrations lsp.Registration[]
  697. ---@class lsp.UnregistrationParams
  698. ---
  699. ---@field unregisterations lsp.Unregistration[]
  700. ---@class lsp.InitializeParams: lsp._InitializeParams, lsp.WorkspaceFoldersInitializeParams
  701. ---The result returned from an initialize request.
  702. ---@class lsp.InitializeResult
  703. ---
  704. ---The capabilities the language server provides.
  705. ---@field capabilities lsp.ServerCapabilities
  706. ---
  707. ---Information about the server.
  708. ---
  709. ---@since 3.15.0
  710. ---@field serverInfo? lsp.ServerInfo
  711. ---The data type of the ResponseError if the
  712. ---initialize request fails.
  713. ---@class lsp.InitializeError
  714. ---
  715. ---Indicates whether the client execute the following retry logic:
  716. ---(1) show the message provided by the ResponseError to the user
  717. ---(2) user selects retry or cancel
  718. ---(3) if user selected retry the initialize method is sent again.
  719. ---@field retry boolean
  720. ---@class lsp.InitializedParams
  721. ---The parameters of a change configuration notification.
  722. ---@class lsp.DidChangeConfigurationParams
  723. ---
  724. ---The actual changed settings
  725. ---@field settings lsp.LSPAny
  726. ---@class lsp.DidChangeConfigurationRegistrationOptions
  727. ---
  728. ---@field section? string|string[]
  729. ---The parameters of a notification message.
  730. ---@class lsp.ShowMessageParams
  731. ---
  732. ---The message type. See {@link MessageType}
  733. ---@field type lsp.MessageType
  734. ---
  735. ---The actual message.
  736. ---@field message string
  737. ---@class lsp.ShowMessageRequestParams
  738. ---
  739. ---The message type. See {@link MessageType}
  740. ---@field type lsp.MessageType
  741. ---
  742. ---The actual message.
  743. ---@field message string
  744. ---
  745. ---The message action items to present.
  746. ---@field actions? lsp.MessageActionItem[]
  747. ---@class lsp.MessageActionItem
  748. ---
  749. ---A short title like 'Retry', 'Open Log' etc.
  750. ---@field title string
  751. ---The log message parameters.
  752. ---@class lsp.LogMessageParams
  753. ---
  754. ---The message type. See {@link MessageType}
  755. ---@field type lsp.MessageType
  756. ---
  757. ---The actual message.
  758. ---@field message string
  759. ---The parameters sent in an open text document notification
  760. ---@class lsp.DidOpenTextDocumentParams
  761. ---
  762. ---The document that was opened.
  763. ---@field textDocument lsp.TextDocumentItem
  764. ---The change text document notification's parameters.
  765. ---@class lsp.DidChangeTextDocumentParams
  766. ---
  767. ---The document that did change. The version number points
  768. ---to the version after all provided content changes have
  769. ---been applied.
  770. ---@field textDocument lsp.VersionedTextDocumentIdentifier
  771. ---
  772. ---The actual content changes. The content changes describe single state changes
  773. ---to the document. So if there are two content changes c1 (at array index 0) and
  774. ---c2 (at array index 1) for a document in state S then c1 moves the document from
  775. ---S to S' and c2 from S' to S''. So c1 is computed on the state S and c2 is computed
  776. ---on the state S'.
  777. ---
  778. ---To mirror the content of a document using change events use the following approach:
  779. ---- start with the same initial content
  780. ---- apply the 'textDocument/didChange' notifications in the order you receive them.
  781. ---- apply the `TextDocumentContentChangeEvent`s in a single notification in the order
  782. --- you receive them.
  783. ---@field contentChanges lsp.TextDocumentContentChangeEvent[]
  784. ---Describe options to be used when registered for text document change events.
  785. ---@class lsp.TextDocumentChangeRegistrationOptions: lsp.TextDocumentRegistrationOptions
  786. ---
  787. ---How documents are synced to the server.
  788. ---@field syncKind lsp.TextDocumentSyncKind
  789. ---The parameters sent in a close text document notification
  790. ---@class lsp.DidCloseTextDocumentParams
  791. ---
  792. ---The document that was closed.
  793. ---@field textDocument lsp.TextDocumentIdentifier
  794. ---The parameters sent in a save text document notification
  795. ---@class lsp.DidSaveTextDocumentParams
  796. ---
  797. ---The document that was saved.
  798. ---@field textDocument lsp.TextDocumentIdentifier
  799. ---
  800. ---Optional the content when saved. Depends on the includeText value
  801. ---when the save notification was requested.
  802. ---@field text? string
  803. ---Save registration options.
  804. ---@class lsp.TextDocumentSaveRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.SaveOptions
  805. ---The parameters sent in a will save text document notification.
  806. ---@class lsp.WillSaveTextDocumentParams
  807. ---
  808. ---The document that will be saved.
  809. ---@field textDocument lsp.TextDocumentIdentifier
  810. ---
  811. ---The 'TextDocumentSaveReason'.
  812. ---@field reason lsp.TextDocumentSaveReason
  813. ---A text edit applicable to a text document.
  814. ---@class lsp.TextEdit
  815. ---
  816. ---The range of the text document to be manipulated. To insert
  817. ---text into a document create a range where start === end.
  818. ---@field range lsp.Range
  819. ---
  820. ---The string to be inserted. For delete operations use an
  821. ---empty string.
  822. ---@field newText string
  823. ---The watched files change notification's parameters.
  824. ---@class lsp.DidChangeWatchedFilesParams
  825. ---
  826. ---The actual file events.
  827. ---@field changes lsp.FileEvent[]
  828. ---Describe options to be used when registered for text document change events.
  829. ---@class lsp.DidChangeWatchedFilesRegistrationOptions
  830. ---
  831. ---The watchers to register.
  832. ---@field watchers lsp.FileSystemWatcher[]
  833. ---The publish diagnostic notification's parameters.
  834. ---@class lsp.PublishDiagnosticsParams
  835. ---
  836. ---The URI for which diagnostic information is reported.
  837. ---@field uri lsp.DocumentUri
  838. ---
  839. ---Optional the version number of the document the diagnostics are published for.
  840. ---
  841. ---@since 3.15.0
  842. ---@field version? integer
  843. ---
  844. ---An array of diagnostic information items.
  845. ---@field diagnostics lsp.Diagnostic[]
  846. ---Completion parameters
  847. ---@class lsp.CompletionParams: lsp.TextDocumentPositionParams, lsp.WorkDoneProgressParams, lsp.PartialResultParams
  848. ---
  849. ---The completion context. This is only available it the client specifies
  850. ---to send this using the client capability `textDocument.completion.contextSupport === true`
  851. ---@field context? lsp.CompletionContext
  852. ---A completion item represents a text snippet that is
  853. ---proposed to complete text that is being typed.
  854. ---@class lsp.CompletionItem
  855. ---
  856. ---The label of this completion item.
  857. ---
  858. ---The label property is also by default the text that
  859. ---is inserted when selecting this completion.
  860. ---
  861. ---If label details are provided the label itself should
  862. ---be an unqualified name of the completion item.
  863. ---@field label string
  864. ---
  865. ---Additional details for the label
  866. ---
  867. ---@since 3.17.0
  868. ---@field labelDetails? lsp.CompletionItemLabelDetails
  869. ---
  870. ---The kind of this completion item. Based of the kind
  871. ---an icon is chosen by the editor.
  872. ---@field kind? lsp.CompletionItemKind
  873. ---
  874. ---Tags for this completion item.
  875. ---
  876. ---@since 3.15.0
  877. ---@field tags? lsp.CompletionItemTag[]
  878. ---
  879. ---A human-readable string with additional information
  880. ---about this item, like type or symbol information.
  881. ---@field detail? string
  882. ---
  883. ---A human-readable string that represents a doc-comment.
  884. ---@field documentation? string|lsp.MarkupContent
  885. ---
  886. ---Indicates if this item is deprecated.
  887. ---@deprecated Use `tags` instead.
  888. ---@field deprecated? boolean
  889. ---
  890. ---Select this item when showing.
  891. ---
  892. ---*Note* that only one completion item can be selected and that the
  893. ---tool / client decides which item that is. The rule is that the *first*
  894. ---item of those that match best is selected.
  895. ---@field preselect? boolean
  896. ---
  897. ---A string that should be used when comparing this item
  898. ---with other items. When `falsy` the {@link CompletionItem.label label}
  899. ---is used.
  900. ---@field sortText? string
  901. ---
  902. ---A string that should be used when filtering a set of
  903. ---completion items. When `falsy` the {@link CompletionItem.label label}
  904. ---is used.
  905. ---@field filterText? string
  906. ---
  907. ---A string that should be inserted into a document when selecting
  908. ---this completion. When `falsy` the {@link CompletionItem.label label}
  909. ---is used.
  910. ---
  911. ---The `insertText` is subject to interpretation by the client side.
  912. ---Some tools might not take the string literally. For example
  913. ---VS Code when code complete is requested in this example
  914. ---`con<cursor position>` and a completion item with an `insertText` of
  915. ---`console` is provided it will only insert `sole`. Therefore it is
  916. ---recommended to use `textEdit` instead since it avoids additional client
  917. ---side interpretation.
  918. ---@field insertText? string
  919. ---
  920. ---The format of the insert text. The format applies to both the
  921. ---`insertText` property and the `newText` property of a provided
  922. ---`textEdit`. If omitted defaults to `InsertTextFormat.PlainText`.
  923. ---
  924. ---Please note that the insertTextFormat doesn't apply to
  925. ---`additionalTextEdits`.
  926. ---@field insertTextFormat? lsp.InsertTextFormat
  927. ---
  928. ---How whitespace and indentation is handled during completion
  929. ---item insertion. If not provided the clients default value depends on
  930. ---the `textDocument.completion.insertTextMode` client capability.
  931. ---
  932. ---@since 3.16.0
  933. ---@field insertTextMode? lsp.InsertTextMode
  934. ---
  935. ---An {@link TextEdit edit} which is applied to a document when selecting
  936. ---this completion. When an edit is provided the value of
  937. ---{@link CompletionItem.insertText insertText} is ignored.
  938. ---
  939. ---Most editors support two different operations when accepting a completion
  940. ---item. One is to insert a completion text and the other is to replace an
  941. ---existing text with a completion text. Since this can usually not be
  942. ---predetermined by a server it can report both ranges. Clients need to
  943. ---signal support for `InsertReplaceEdits` via the
  944. ---`textDocument.completion.insertReplaceSupport` client capability
  945. ---property.
  946. ---
  947. ---*Note 1:* The text edit's range as well as both ranges from an insert
  948. ---replace edit must be a [single line] and they must contain the position
  949. ---at which completion has been requested.
  950. ---*Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range
  951. ---must be a prefix of the edit's replace range, that means it must be
  952. ---contained and starting at the same position.
  953. ---
  954. ---@since 3.16.0 additional type `InsertReplaceEdit`
  955. ---@field textEdit? lsp.TextEdit|lsp.InsertReplaceEdit
  956. ---
  957. ---The edit text used if the completion item is part of a CompletionList and
  958. ---CompletionList defines an item default for the text edit range.
  959. ---
  960. ---Clients will only honor this property if they opt into completion list
  961. ---item defaults using the capability `completionList.itemDefaults`.
  962. ---
  963. ---If not provided and a list's default range is provided the label
  964. ---property is used as a text.
  965. ---
  966. ---@since 3.17.0
  967. ---@field textEditText? string
  968. ---
  969. ---An optional array of additional {@link TextEdit text edits} that are applied when
  970. ---selecting this completion. Edits must not overlap (including the same insert position)
  971. ---with the main {@link CompletionItem.textEdit edit} nor with themselves.
  972. ---
  973. ---Additional text edits should be used to change text unrelated to the current cursor position
  974. ---(for example adding an import statement at the top of the file if the completion item will
  975. ---insert an unqualified type).
  976. ---@field additionalTextEdits? lsp.TextEdit[]
  977. ---
  978. ---An optional set of characters that when pressed while this completion is active will accept it first and
  979. ---then type that character. *Note* that all commit characters should have `length=1` and that superfluous
  980. ---characters will be ignored.
  981. ---@field commitCharacters? string[]
  982. ---
  983. ---An optional {@link Command command} that is executed *after* inserting this completion. *Note* that
  984. ---additional modifications to the current document should be described with the
  985. ---{@link CompletionItem.additionalTextEdits additionalTextEdits}-property.
  986. ---@field command? lsp.Command
  987. ---
  988. ---A data entry field that is preserved on a completion item between a
  989. ---{@link CompletionRequest} and a {@link CompletionResolveRequest}.
  990. ---@field data? lsp.LSPAny
  991. ---Represents a collection of {@link CompletionItem completion items} to be presented
  992. ---in the editor.
  993. ---@class lsp.CompletionList
  994. ---
  995. ---This list it not complete. Further typing results in recomputing this list.
  996. ---
  997. ---Recomputed lists have all their items replaced (not appended) in the
  998. ---incomplete completion sessions.
  999. ---@field isIncomplete boolean
  1000. ---
  1001. ---In many cases the items of an actual completion result share the same
  1002. ---value for properties like `commitCharacters` or the range of a text
  1003. ---edit. A completion list can therefore define item defaults which will
  1004. ---be used if a completion item itself doesn't specify the value.
  1005. ---
  1006. ---If a completion list specifies a default value and a completion item
  1007. ---also specifies a corresponding value the one from the item is used.
  1008. ---
  1009. ---Servers are only allowed to return default values if the client
  1010. ---signals support for this via the `completionList.itemDefaults`
  1011. ---capability.
  1012. ---
  1013. ---@since 3.17.0
  1014. ---@field itemDefaults? lsp.CompletionItemDefaults
  1015. ---
  1016. ---The completion items.
  1017. ---@field items lsp.CompletionItem[]
  1018. ---Registration options for a {@link CompletionRequest}.
  1019. ---@class lsp.CompletionRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.CompletionOptions
  1020. ---Parameters for a {@link HoverRequest}.
  1021. ---@class lsp.HoverParams: lsp.TextDocumentPositionParams, lsp.WorkDoneProgressParams
  1022. ---The result of a hover request.
  1023. ---@class lsp.Hover
  1024. ---
  1025. ---The hover's content
  1026. ---@field contents lsp.MarkupContent|lsp.MarkedString|lsp.MarkedString[]
  1027. ---
  1028. ---An optional range inside the text document that is used to
  1029. ---visualize the hover, e.g. by changing the background color.
  1030. ---@field range? lsp.Range
  1031. ---Registration options for a {@link HoverRequest}.
  1032. ---@class lsp.HoverRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.HoverOptions
  1033. ---Parameters for a {@link SignatureHelpRequest}.
  1034. ---@class lsp.SignatureHelpParams: lsp.TextDocumentPositionParams, lsp.WorkDoneProgressParams
  1035. ---
  1036. ---The signature help context. This is only available if the client specifies
  1037. ---to send this using the client capability `textDocument.signatureHelp.contextSupport === true`
  1038. ---
  1039. ---@since 3.15.0
  1040. ---@field context? lsp.SignatureHelpContext
  1041. ---Signature help represents the signature of something
  1042. ---callable. There can be multiple signature but only one
  1043. ---active and only one active parameter.
  1044. ---@class lsp.SignatureHelp
  1045. ---
  1046. ---One or more signatures.
  1047. ---@field signatures lsp.SignatureInformation[]
  1048. ---
  1049. ---The active signature. If omitted or the value lies outside the
  1050. ---range of `signatures` the value defaults to zero or is ignored if
  1051. ---the `SignatureHelp` has no signatures.
  1052. ---
  1053. ---Whenever possible implementors should make an active decision about
  1054. ---the active signature and shouldn't rely on a default value.
  1055. ---
  1056. ---In future version of the protocol this property might become
  1057. ---mandatory to better express this.
  1058. ---@field activeSignature? uinteger
  1059. ---
  1060. ---The active parameter of the active signature.
  1061. ---
  1062. ---If `null`, no parameter of the signature is active (for example a named
  1063. ---argument that does not match any declared parameters). This is only valid
  1064. ---if the client specifies the client capability
  1065. ---`textDocument.signatureHelp.noActiveParameterSupport === true`
  1066. ---
  1067. ---If omitted or the value lies outside the range of
  1068. ---`signatures[activeSignature].parameters` defaults to 0 if the active
  1069. ---signature has parameters.
  1070. ---
  1071. ---If the active signature has no parameters it is ignored.
  1072. ---
  1073. ---In future version of the protocol this property might become
  1074. ---mandatory (but still nullable) to better express the active parameter if
  1075. ---the active signature does have any.
  1076. ---@field activeParameter? uinteger|lsp.null
  1077. ---Registration options for a {@link SignatureHelpRequest}.
  1078. ---@class lsp.SignatureHelpRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.SignatureHelpOptions
  1079. ---Parameters for a {@link DefinitionRequest}.
  1080. ---@class lsp.DefinitionParams: lsp.TextDocumentPositionParams, lsp.WorkDoneProgressParams, lsp.PartialResultParams
  1081. ---Registration options for a {@link DefinitionRequest}.
  1082. ---@class lsp.DefinitionRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.DefinitionOptions
  1083. ---Parameters for a {@link ReferencesRequest}.
  1084. ---@class lsp.ReferenceParams: lsp.TextDocumentPositionParams, lsp.WorkDoneProgressParams, lsp.PartialResultParams
  1085. ---
  1086. ---@field context lsp.ReferenceContext
  1087. ---Registration options for a {@link ReferencesRequest}.
  1088. ---@class lsp.ReferenceRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.ReferenceOptions
  1089. ---Parameters for a {@link DocumentHighlightRequest}.
  1090. ---@class lsp.DocumentHighlightParams: lsp.TextDocumentPositionParams, lsp.WorkDoneProgressParams, lsp.PartialResultParams
  1091. ---A document highlight is a range inside a text document which deserves
  1092. ---special attention. Usually a document highlight is visualized by changing
  1093. ---the background color of its range.
  1094. ---@class lsp.DocumentHighlight
  1095. ---
  1096. ---The range this highlight applies to.
  1097. ---@field range lsp.Range
  1098. ---
  1099. ---The highlight kind, default is {@link DocumentHighlightKind.Text text}.
  1100. ---@field kind? lsp.DocumentHighlightKind
  1101. ---Registration options for a {@link DocumentHighlightRequest}.
  1102. ---@class lsp.DocumentHighlightRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.DocumentHighlightOptions
  1103. ---Parameters for a {@link DocumentSymbolRequest}.
  1104. ---@class lsp.DocumentSymbolParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  1105. ---
  1106. ---The text document.
  1107. ---@field textDocument lsp.TextDocumentIdentifier
  1108. ---Represents information about programming constructs like variables, classes,
  1109. ---interfaces etc.
  1110. ---@class lsp.SymbolInformation: lsp.BaseSymbolInformation
  1111. ---
  1112. ---Indicates if this symbol is deprecated.
  1113. ---
  1114. ---@deprecated Use tags instead
  1115. ---@field deprecated? boolean
  1116. ---
  1117. ---The location of this symbol. The location's range is used by a tool
  1118. ---to reveal the location in the editor. If the symbol is selected in the
  1119. ---tool the range's start information is used to position the cursor. So
  1120. ---the range usually spans more than the actual symbol's name and does
  1121. ---normally include things like visibility modifiers.
  1122. ---
  1123. ---The range doesn't have to denote a node range in the sense of an abstract
  1124. ---syntax tree. It can therefore not be used to re-construct a hierarchy of
  1125. ---the symbols.
  1126. ---@field location lsp.Location
  1127. ---Represents programming constructs like variables, classes, interfaces etc.
  1128. ---that appear in a document. Document symbols can be hierarchical and they
  1129. ---have two ranges: one that encloses its definition and one that points to
  1130. ---its most interesting range, e.g. the range of an identifier.
  1131. ---@class lsp.DocumentSymbol
  1132. ---
  1133. ---The name of this symbol. Will be displayed in the user interface and therefore must not be
  1134. ---an empty string or a string only consisting of white spaces.
  1135. ---@field name string
  1136. ---
  1137. ---More detail for this symbol, e.g the signature of a function.
  1138. ---@field detail? string
  1139. ---
  1140. ---The kind of this symbol.
  1141. ---@field kind lsp.SymbolKind
  1142. ---
  1143. ---Tags for this document symbol.
  1144. ---
  1145. ---@since 3.16.0
  1146. ---@field tags? lsp.SymbolTag[]
  1147. ---
  1148. ---Indicates if this symbol is deprecated.
  1149. ---
  1150. ---@deprecated Use tags instead
  1151. ---@field deprecated? boolean
  1152. ---
  1153. ---The range enclosing this symbol not including leading/trailing whitespace but everything else
  1154. ---like comments. This information is typically used to determine if the clients cursor is
  1155. ---inside the symbol to reveal in the symbol in the UI.
  1156. ---@field range lsp.Range
  1157. ---
  1158. ---The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
  1159. ---Must be contained by the `range`.
  1160. ---@field selectionRange lsp.Range
  1161. ---
  1162. ---Children of this symbol, e.g. properties of a class.
  1163. ---@field children? lsp.DocumentSymbol[]
  1164. ---Registration options for a {@link DocumentSymbolRequest}.
  1165. ---@class lsp.DocumentSymbolRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.DocumentSymbolOptions
  1166. ---The parameters of a {@link CodeActionRequest}.
  1167. ---@class lsp.CodeActionParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  1168. ---
  1169. ---The document in which the command was invoked.
  1170. ---@field textDocument lsp.TextDocumentIdentifier
  1171. ---
  1172. ---The range for which the command was invoked.
  1173. ---@field range lsp.Range
  1174. ---
  1175. ---Context carrying additional information.
  1176. ---@field context lsp.CodeActionContext
  1177. ---Represents a reference to a command. Provides a title which
  1178. ---will be used to represent a command in the UI and, optionally,
  1179. ---an array of arguments which will be passed to the command handler
  1180. ---function when invoked.
  1181. ---@class lsp.Command
  1182. ---
  1183. ---Title of the command, like `save`.
  1184. ---@field title string
  1185. ---
  1186. ---An optional tooltip.
  1187. ---
  1188. ---@since 3.18.0
  1189. ---@proposed
  1190. ---@field tooltip? string
  1191. ---
  1192. ---The identifier of the actual command handler.
  1193. ---@field command string
  1194. ---
  1195. ---Arguments that the command handler should be
  1196. ---invoked with.
  1197. ---@field arguments? lsp.LSPAny[]
  1198. ---A code action represents a change that can be performed in code, e.g. to fix a problem or
  1199. ---to refactor code.
  1200. ---
  1201. ---A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed.
  1202. ---@class lsp.CodeAction
  1203. ---
  1204. ---A short, human-readable, title for this code action.
  1205. ---@field title string
  1206. ---
  1207. ---The kind of the code action.
  1208. ---
  1209. ---Used to filter code actions.
  1210. ---@field kind? lsp.CodeActionKind
  1211. ---
  1212. ---The diagnostics that this code action resolves.
  1213. ---@field diagnostics? lsp.Diagnostic[]
  1214. ---
  1215. ---Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted
  1216. ---by keybindings.
  1217. ---
  1218. ---A quick fix should be marked preferred if it properly addresses the underlying error.
  1219. ---A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
  1220. ---
  1221. ---@since 3.15.0
  1222. ---@field isPreferred? boolean
  1223. ---
  1224. ---Marks that the code action cannot currently be applied.
  1225. ---
  1226. ---Clients should follow the following guidelines regarding disabled code actions:
  1227. ---
  1228. --- - Disabled code actions are not shown in automatic [lightbulbs](https://code.visualstudio.com/docs/editor/editingevolved#_code-action)
  1229. --- code action menus.
  1230. ---
  1231. --- - Disabled actions are shown as faded out in the code action menu when the user requests a more specific type
  1232. --- of code action, such as refactorings.
  1233. ---
  1234. --- - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions)
  1235. --- that auto applies a code action and only disabled code actions are returned, the client should show the user an
  1236. --- error message with `reason` in the editor.
  1237. ---
  1238. ---@since 3.16.0
  1239. ---@field disabled? lsp.CodeActionDisabled
  1240. ---
  1241. ---The workspace edit this code action performs.
  1242. ---@field edit? lsp.WorkspaceEdit
  1243. ---
  1244. ---A command this code action executes. If a code action
  1245. ---provides an edit and a command, first the edit is
  1246. ---executed and then the command.
  1247. ---@field command? lsp.Command
  1248. ---
  1249. ---A data entry field that is preserved on a code action between
  1250. ---a `textDocument/codeAction` and a `codeAction/resolve` request.
  1251. ---
  1252. ---@since 3.16.0
  1253. ---@field data? lsp.LSPAny
  1254. ---Registration options for a {@link CodeActionRequest}.
  1255. ---@class lsp.CodeActionRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.CodeActionOptions
  1256. ---The parameters of a {@link WorkspaceSymbolRequest}.
  1257. ---@class lsp.WorkspaceSymbolParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  1258. ---
  1259. ---A query string to filter symbols by. Clients may send an empty
  1260. ---string here to request all symbols.
  1261. ---
  1262. ---The `query`-parameter should be interpreted in a *relaxed way* as editors
  1263. ---will apply their own highlighting and scoring on the results. A good rule
  1264. ---of thumb is to match case-insensitive and to simply check that the
  1265. ---characters of *query* appear in their order in a candidate symbol.
  1266. ---Servers shouldn't use prefix, substring, or similar strict matching.
  1267. ---@field query string
  1268. ---A special workspace symbol that supports locations without a range.
  1269. ---
  1270. ---See also SymbolInformation.
  1271. ---
  1272. ---@since 3.17.0
  1273. ---@class lsp.WorkspaceSymbol: lsp.BaseSymbolInformation
  1274. ---
  1275. ---The location of the symbol. Whether a server is allowed to
  1276. ---return a location without a range depends on the client
  1277. ---capability `workspace.symbol.resolveSupport`.
  1278. ---
  1279. ---See SymbolInformation#location for more details.
  1280. ---@field location lsp.Location|lsp.LocationUriOnly
  1281. ---
  1282. ---A data entry field that is preserved on a workspace symbol between a
  1283. ---workspace symbol request and a workspace symbol resolve request.
  1284. ---@field data? lsp.LSPAny
  1285. ---Registration options for a {@link WorkspaceSymbolRequest}.
  1286. ---@class lsp.WorkspaceSymbolRegistrationOptions: lsp.WorkspaceSymbolOptions
  1287. ---The parameters of a {@link CodeLensRequest}.
  1288. ---@class lsp.CodeLensParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  1289. ---
  1290. ---The document to request code lens for.
  1291. ---@field textDocument lsp.TextDocumentIdentifier
  1292. ---A code lens represents a {@link Command command} that should be shown along with
  1293. ---source text, like the number of references, a way to run tests, etc.
  1294. ---
  1295. ---A code lens is _unresolved_ when no command is associated to it. For performance
  1296. ---reasons the creation of a code lens and resolving should be done in two stages.
  1297. ---@class lsp.CodeLens
  1298. ---
  1299. ---The range in which this code lens is valid. Should only span a single line.
  1300. ---@field range lsp.Range
  1301. ---
  1302. ---The command this code lens represents.
  1303. ---@field command? lsp.Command
  1304. ---
  1305. ---A data entry field that is preserved on a code lens item between
  1306. ---a {@link CodeLensRequest} and a {@link CodeLensResolveRequest}
  1307. ---@field data? lsp.LSPAny
  1308. ---Registration options for a {@link CodeLensRequest}.
  1309. ---@class lsp.CodeLensRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.CodeLensOptions
  1310. ---The parameters of a {@link DocumentLinkRequest}.
  1311. ---@class lsp.DocumentLinkParams: lsp.WorkDoneProgressParams, lsp.PartialResultParams
  1312. ---
  1313. ---The document to provide document links for.
  1314. ---@field textDocument lsp.TextDocumentIdentifier
  1315. ---A document link is a range in a text document that links to an internal or external resource, like another
  1316. ---text document or a web site.
  1317. ---@class lsp.DocumentLink
  1318. ---
  1319. ---The range this link applies to.
  1320. ---@field range lsp.Range
  1321. ---
  1322. ---The uri this link points to. If missing a resolve request is sent later.
  1323. ---@field target? lsp.URI
  1324. ---
  1325. ---The tooltip text when you hover over this link.
  1326. ---
  1327. ---If a tooltip is provided, is will be displayed in a string that includes instructions on how to
  1328. ---trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,
  1329. ---user settings, and localization.
  1330. ---
  1331. ---@since 3.15.0
  1332. ---@field tooltip? string
  1333. ---
  1334. ---A data entry field that is preserved on a document link between a
  1335. ---DocumentLinkRequest and a DocumentLinkResolveRequest.
  1336. ---@field data? lsp.LSPAny
  1337. ---Registration options for a {@link DocumentLinkRequest}.
  1338. ---@class lsp.DocumentLinkRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.DocumentLinkOptions
  1339. ---The parameters of a {@link DocumentFormattingRequest}.
  1340. ---@class lsp.DocumentFormattingParams: lsp.WorkDoneProgressParams
  1341. ---
  1342. ---The document to format.
  1343. ---@field textDocument lsp.TextDocumentIdentifier
  1344. ---
  1345. ---The format options.
  1346. ---@field options lsp.FormattingOptions
  1347. ---Registration options for a {@link DocumentFormattingRequest}.
  1348. ---@class lsp.DocumentFormattingRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.DocumentFormattingOptions
  1349. ---The parameters of a {@link DocumentRangeFormattingRequest}.
  1350. ---@class lsp.DocumentRangeFormattingParams: lsp.WorkDoneProgressParams
  1351. ---
  1352. ---The document to format.
  1353. ---@field textDocument lsp.TextDocumentIdentifier
  1354. ---
  1355. ---The range to format
  1356. ---@field range lsp.Range
  1357. ---
  1358. ---The format options
  1359. ---@field options lsp.FormattingOptions
  1360. ---Registration options for a {@link DocumentRangeFormattingRequest}.
  1361. ---@class lsp.DocumentRangeFormattingRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.DocumentRangeFormattingOptions
  1362. ---The parameters of a {@link DocumentRangesFormattingRequest}.
  1363. ---
  1364. ---@since 3.18.0
  1365. ---@proposed
  1366. ---@class lsp.DocumentRangesFormattingParams: lsp.WorkDoneProgressParams
  1367. ---
  1368. ---The document to format.
  1369. ---@field textDocument lsp.TextDocumentIdentifier
  1370. ---
  1371. ---The ranges to format
  1372. ---@field ranges lsp.Range[]
  1373. ---
  1374. ---The format options
  1375. ---@field options lsp.FormattingOptions
  1376. ---The parameters of a {@link DocumentOnTypeFormattingRequest}.
  1377. ---@class lsp.DocumentOnTypeFormattingParams
  1378. ---
  1379. ---The document to format.
  1380. ---@field textDocument lsp.TextDocumentIdentifier
  1381. ---
  1382. ---The position around which the on type formatting should happen.
  1383. ---This is not necessarily the exact position where the character denoted
  1384. ---by the property `ch` got typed.
  1385. ---@field position lsp.Position
  1386. ---
  1387. ---The character that has been typed that triggered the formatting
  1388. ---on type request. That is not necessarily the last character that
  1389. ---got inserted into the document since the client could auto insert
  1390. ---characters as well (e.g. like automatic brace completion).
  1391. ---@field ch string
  1392. ---
  1393. ---The formatting options.
  1394. ---@field options lsp.FormattingOptions
  1395. ---Registration options for a {@link DocumentOnTypeFormattingRequest}.
  1396. ---@class lsp.DocumentOnTypeFormattingRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.DocumentOnTypeFormattingOptions
  1397. ---The parameters of a {@link RenameRequest}.
  1398. ---@class lsp.RenameParams: lsp.WorkDoneProgressParams
  1399. ---
  1400. ---The document to rename.
  1401. ---@field textDocument lsp.TextDocumentIdentifier
  1402. ---
  1403. ---The position at which this request was sent.
  1404. ---@field position lsp.Position
  1405. ---
  1406. ---The new name of the symbol. If the given name is not valid the
  1407. ---request must return a {@link ResponseError} with an
  1408. ---appropriate message set.
  1409. ---@field newName string
  1410. ---Registration options for a {@link RenameRequest}.
  1411. ---@class lsp.RenameRegistrationOptions: lsp.TextDocumentRegistrationOptions, lsp.RenameOptions
  1412. ---@class lsp.PrepareRenameParams: lsp.TextDocumentPositionParams, lsp.WorkDoneProgressParams
  1413. ---The parameters of a {@link ExecuteCommandRequest}.
  1414. ---@class lsp.ExecuteCommandParams: lsp.WorkDoneProgressParams
  1415. ---
  1416. ---The identifier of the actual command handler.
  1417. ---@field command string
  1418. ---
  1419. ---Arguments that the command should be invoked with.
  1420. ---@field arguments? lsp.LSPAny[]
  1421. ---Registration options for a {@link ExecuteCommandRequest}.
  1422. ---@class lsp.ExecuteCommandRegistrationOptions: lsp.ExecuteCommandOptions
  1423. ---The parameters passed via an apply workspace edit request.
  1424. ---@class lsp.ApplyWorkspaceEditParams
  1425. ---
  1426. ---An optional label of the workspace edit. This label is
  1427. ---presented in the user interface for example on an undo
  1428. ---stack to undo the workspace edit.
  1429. ---@field label? string
  1430. ---
  1431. ---The edits to apply.
  1432. ---@field edit lsp.WorkspaceEdit
  1433. ---
  1434. ---Additional data about the edit.
  1435. ---
  1436. ---@since 3.18.0
  1437. ---@proposed
  1438. ---@field metadata? lsp.WorkspaceEditMetadata
  1439. ---The result returned from the apply workspace edit request.
  1440. ---
  1441. ---@since 3.17 renamed from ApplyWorkspaceEditResponse
  1442. ---@class lsp.ApplyWorkspaceEditResult
  1443. ---
  1444. ---Indicates whether the edit was applied or not.
  1445. ---@field applied boolean
  1446. ---
  1447. ---An optional textual description for why the edit was not applied.
  1448. ---This may be used by the server for diagnostic logging or to provide
  1449. ---a suitable error for a request that triggered the edit.
  1450. ---@field failureReason? string
  1451. ---
  1452. ---Depending on the client's failure handling strategy `failedChange` might
  1453. ---contain the index of the change that failed. This property is only available
  1454. ---if the client signals a `failureHandlingStrategy` in its client capabilities.
  1455. ---@field failedChange? uinteger
  1456. ---@class lsp.WorkDoneProgressBegin
  1457. ---
  1458. ---@field kind "begin"
  1459. ---
  1460. ---Mandatory title of the progress operation. Used to briefly inform about
  1461. ---the kind of operation being performed.
  1462. ---
  1463. ---Examples: "Indexing" or "Linking dependencies".
  1464. ---@field title string
  1465. ---
  1466. ---Controls if a cancel button should show to allow the user to cancel the
  1467. ---long running operation. Clients that don't support cancellation are allowed
  1468. ---to ignore the setting.
  1469. ---@field cancellable? boolean
  1470. ---
  1471. ---Optional, more detailed associated progress message. Contains
  1472. ---complementary information to the `title`.
  1473. ---
  1474. ---Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
  1475. ---If unset, the previous progress message (if any) is still valid.
  1476. ---@field message? string
  1477. ---
  1478. ---Optional progress percentage to display (value 100 is considered 100%).
  1479. ---If not provided infinite progress is assumed and clients are allowed
  1480. ---to ignore the `percentage` value in subsequent in report notifications.
  1481. ---
  1482. ---The value should be steadily rising. Clients are free to ignore values
  1483. ---that are not following this rule. The value range is [0, 100].
  1484. ---@field percentage? uinteger
  1485. ---@class lsp.WorkDoneProgressReport
  1486. ---
  1487. ---@field kind "report"
  1488. ---
  1489. ---Controls enablement state of a cancel button.
  1490. ---
  1491. ---Clients that don't support cancellation or don't support controlling the button's
  1492. ---enablement state are allowed to ignore the property.
  1493. ---@field cancellable? boolean
  1494. ---
  1495. ---Optional, more detailed associated progress message. Contains
  1496. ---complementary information to the `title`.
  1497. ---
  1498. ---Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
  1499. ---If unset, the previous progress message (if any) is still valid.
  1500. ---@field message? string
  1501. ---
  1502. ---Optional progress percentage to display (value 100 is considered 100%).
  1503. ---If not provided infinite progress is assumed and clients are allowed
  1504. ---to ignore the `percentage` value in subsequent in report notifications.
  1505. ---
  1506. ---The value should be steadily rising. Clients are free to ignore values
  1507. ---that are not following this rule. The value range is [0, 100]
  1508. ---@field percentage? uinteger
  1509. ---@class lsp.WorkDoneProgressEnd
  1510. ---
  1511. ---@field kind "end"
  1512. ---
  1513. ---Optional, a final message indicating to for example indicate the outcome
  1514. ---of the operation.
  1515. ---@field message? string
  1516. ---@class lsp.SetTraceParams
  1517. ---
  1518. ---@field value lsp.TraceValue
  1519. ---@class lsp.LogTraceParams
  1520. ---
  1521. ---@field message string
  1522. ---
  1523. ---@field verbose? string
  1524. ---@class lsp.CancelParams
  1525. ---
  1526. ---The request id to cancel.
  1527. ---@field id integer|string
  1528. ---@class lsp.ProgressParams
  1529. ---
  1530. ---The progress token provided by the client or server.
  1531. ---@field token lsp.ProgressToken
  1532. ---
  1533. ---The progress data.
  1534. ---@field value lsp.LSPAny
  1535. ---A parameter literal used in requests to pass a text document and a position inside that
  1536. ---document.
  1537. ---@class lsp.TextDocumentPositionParams
  1538. ---
  1539. ---The text document.
  1540. ---@field textDocument lsp.TextDocumentIdentifier
  1541. ---
  1542. ---The position inside the text document.
  1543. ---@field position lsp.Position
  1544. ---@class lsp.WorkDoneProgressParams
  1545. ---
  1546. ---An optional token that a server can use to report work done progress.
  1547. ---@field workDoneToken? lsp.ProgressToken
  1548. ---@class lsp.PartialResultParams
  1549. ---
  1550. ---An optional token that a server can use to report partial results (e.g. streaming) to
  1551. ---the client.
  1552. ---@field partialResultToken? lsp.ProgressToken
  1553. ---Represents the connection of two locations. Provides additional metadata over normal {@link Location locations},
  1554. ---including an origin range.
  1555. ---@class lsp.LocationLink
  1556. ---
  1557. ---Span of the origin of this link.
  1558. ---
  1559. ---Used as the underlined span for mouse interaction. Defaults to the word range at
  1560. ---the definition position.
  1561. ---@field originSelectionRange? lsp.Range
  1562. ---
  1563. ---The target resource identifier of this link.
  1564. ---@field targetUri lsp.DocumentUri
  1565. ---
  1566. ---The full target range of this link. If the target for example is a symbol then target range is the
  1567. ---range enclosing this symbol not including leading/trailing whitespace but everything else
  1568. ---like comments. This information is typically used to highlight the range in the editor.
  1569. ---@field targetRange lsp.Range
  1570. ---
  1571. ---The range that should be selected and revealed when this link is being followed, e.g the name of a function.
  1572. ---Must be contained by the `targetRange`. See also `DocumentSymbol#range`
  1573. ---@field targetSelectionRange lsp.Range
  1574. ---A range in a text document expressed as (zero-based) start and end positions.
  1575. ---
  1576. ---If you want to specify a range that contains a line including the line ending
  1577. ---character(s) then use an end position denoting the start of the next line.
  1578. ---For example:
  1579. ---```ts
  1580. ---{
  1581. --- start: { line: 5, character: 23 }
  1582. --- end : { line 6, character : 0 }
  1583. ---}
  1584. ---```
  1585. ---@class lsp.Range
  1586. ---
  1587. ---The range's start position.
  1588. ---@field start lsp.Position
  1589. ---
  1590. ---The range's end position.
  1591. ---@field end lsp.Position
  1592. ---@class lsp.ImplementationOptions: lsp.WorkDoneProgressOptions
  1593. ---Static registration options to be returned in the initialize
  1594. ---request.
  1595. ---@class lsp.StaticRegistrationOptions
  1596. ---
  1597. ---The id used to register the request. The id can be used to deregister
  1598. ---the request again. See also Registration#id.
  1599. ---@field id? string
  1600. ---@class lsp.TypeDefinitionOptions: lsp.WorkDoneProgressOptions
  1601. ---The workspace folder change event.
  1602. ---@class lsp.WorkspaceFoldersChangeEvent
  1603. ---
  1604. ---The array of added workspace folders
  1605. ---@field added lsp.WorkspaceFolder[]
  1606. ---
  1607. ---The array of the removed workspace folders
  1608. ---@field removed lsp.WorkspaceFolder[]
  1609. ---@class lsp.ConfigurationItem
  1610. ---
  1611. ---The scope to get the configuration section for.
  1612. ---@field scopeUri? lsp.URI
  1613. ---
  1614. ---The configuration section asked for.
  1615. ---@field section? string
  1616. ---A literal to identify a text document in the client.
  1617. ---@class lsp.TextDocumentIdentifier
  1618. ---
  1619. ---The text document's uri.
  1620. ---@field uri lsp.DocumentUri
  1621. ---Represents a color in RGBA space.
  1622. ---@class lsp.Color
  1623. ---
  1624. ---The red component of this color in the range [0-1].
  1625. ---@field red decimal
  1626. ---
  1627. ---The green component of this color in the range [0-1].
  1628. ---@field green decimal
  1629. ---
  1630. ---The blue component of this color in the range [0-1].
  1631. ---@field blue decimal
  1632. ---
  1633. ---The alpha component of this color in the range [0-1].
  1634. ---@field alpha decimal
  1635. ---@class lsp.DocumentColorOptions: lsp.WorkDoneProgressOptions
  1636. ---@class lsp.FoldingRangeOptions: lsp.WorkDoneProgressOptions
  1637. ---@class lsp.DeclarationOptions: lsp.WorkDoneProgressOptions
  1638. ---Position in a text document expressed as zero-based line and character
  1639. ---offset. Prior to 3.17 the offsets were always based on a UTF-16 string
  1640. ---representation. So a string of the form `a𐐀b` the character offset of the
  1641. ---character `a` is 0, the character offset of `𐐀` is 1 and the character
  1642. ---offset of b is 3 since `𐐀` is represented using two code units in UTF-16.
  1643. ---Since 3.17 clients and servers can agree on a different string encoding
  1644. ---representation (e.g. UTF-8). The client announces it's supported encoding
  1645. ---via the client capability [`general.positionEncodings`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#clientCapabilities).
  1646. ---The value is an array of position encodings the client supports, with
  1647. ---decreasing preference (e.g. the encoding at index `0` is the most preferred
  1648. ---one). To stay backwards compatible the only mandatory encoding is UTF-16
  1649. ---represented via the string `utf-16`. The server can pick one of the
  1650. ---encodings offered by the client and signals that encoding back to the
  1651. ---client via the initialize result's property
  1652. ---[`capabilities.positionEncoding`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#serverCapabilities). If the string value
  1653. ---`utf-16` is missing from the client's capability `general.positionEncodings`
  1654. ---servers can safely assume that the client supports UTF-16. If the server
  1655. ---omits the position encoding in its initialize result the encoding defaults
  1656. ---to the string value `utf-16`. Implementation considerations: since the
  1657. ---conversion from one encoding into another requires the content of the
  1658. ---file / line the conversion is best done where the file is read which is
  1659. ---usually on the server side.
  1660. ---
  1661. ---Positions are line end character agnostic. So you can not specify a position
  1662. ---that denotes `\r|\n` or `\n|` where `|` represents the character offset.
  1663. ---
  1664. ---@since 3.17.0 - support for negotiated position encoding.
  1665. ---@class lsp.Position
  1666. ---
  1667. ---Line position in a document (zero-based).
  1668. ---
  1669. ---If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document.
  1670. ---If a line number is negative, it defaults to 0.
  1671. ---@field line uinteger
  1672. ---
  1673. ---Character offset on a line in a document (zero-based).
  1674. ---
  1675. ---The meaning of this offset is determined by the negotiated
  1676. ---`PositionEncodingKind`.
  1677. ---
  1678. ---If the character value is greater than the line length it defaults back to the
  1679. ---line length.
  1680. ---@field character uinteger
  1681. ---@class lsp.SelectionRangeOptions: lsp.WorkDoneProgressOptions
  1682. ---Call hierarchy options used during static registration.
  1683. ---
  1684. ---@since 3.16.0
  1685. ---@class lsp.CallHierarchyOptions: lsp.WorkDoneProgressOptions
  1686. ---@since 3.16.0
  1687. ---@class lsp.SemanticTokensOptions: lsp.WorkDoneProgressOptions
  1688. ---
  1689. ---The legend used by the server
  1690. ---@field legend lsp.SemanticTokensLegend
  1691. ---
  1692. ---Server supports providing semantic tokens for a specific range
  1693. ---of a document.
  1694. ---@field range? boolean|lsp._anonym1.range
  1695. ---
  1696. ---Server supports providing semantic tokens for a full document.
  1697. ---@field full? boolean|lsp.SemanticTokensFullDelta
  1698. ---@since 3.16.0
  1699. ---@class lsp.SemanticTokensEdit
  1700. ---
  1701. ---The start offset of the edit.
  1702. ---@field start uinteger
  1703. ---
  1704. ---The count of elements to remove.
  1705. ---@field deleteCount uinteger
  1706. ---
  1707. ---The elements to insert.
  1708. ---@field data? uinteger[]
  1709. ---@class lsp.LinkedEditingRangeOptions: lsp.WorkDoneProgressOptions
  1710. ---Represents information on a file/folder create.
  1711. ---
  1712. ---@since 3.16.0
  1713. ---@class lsp.FileCreate
  1714. ---
  1715. ---A file:// URI for the location of the file/folder being created.
  1716. ---@field uri string
  1717. ---Describes textual changes on a text document. A TextDocumentEdit describes all changes
  1718. ---on a document version Si and after they are applied move the document to version Si+1.
  1719. ---So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any
  1720. ---kind of ordering. However the edits must be non overlapping.
  1721. ---@class lsp.TextDocumentEdit
  1722. ---
  1723. ---The text document to change.
  1724. ---@field textDocument lsp.OptionalVersionedTextDocumentIdentifier
  1725. ---
  1726. ---The edits to be applied.
  1727. ---
  1728. ---@since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a
  1729. ---client capability.
  1730. ---
  1731. ---@since 3.18.0 - support for SnippetTextEdit. This is guarded using a
  1732. ---client capability.
  1733. ---@field edits (lsp.TextEdit|lsp.AnnotatedTextEdit|lsp.SnippetTextEdit)[]
  1734. ---Create file operation.
  1735. ---@class lsp.CreateFile: lsp.ResourceOperation
  1736. ---
  1737. ---A create
  1738. ---@field kind "create"
  1739. ---
  1740. ---The resource to create.
  1741. ---@field uri lsp.DocumentUri
  1742. ---
  1743. ---Additional options
  1744. ---@field options? lsp.CreateFileOptions
  1745. ---Rename file operation
  1746. ---@class lsp.RenameFile: lsp.ResourceOperation
  1747. ---
  1748. ---A rename
  1749. ---@field kind "rename"
  1750. ---
  1751. ---The old (existing) location.
  1752. ---@field oldUri lsp.DocumentUri
  1753. ---
  1754. ---The new location.
  1755. ---@field newUri lsp.DocumentUri
  1756. ---
  1757. ---Rename options.
  1758. ---@field options? lsp.RenameFileOptions
  1759. ---Delete file operation
  1760. ---@class lsp.DeleteFile: lsp.ResourceOperation
  1761. ---
  1762. ---A delete
  1763. ---@field kind "delete"
  1764. ---
  1765. ---The file to delete.
  1766. ---@field uri lsp.DocumentUri
  1767. ---
  1768. ---Delete options.
  1769. ---@field options? lsp.DeleteFileOptions
  1770. ---Additional information that describes document changes.
  1771. ---
  1772. ---@since 3.16.0
  1773. ---@class lsp.ChangeAnnotation
  1774. ---
  1775. ---A human-readable string describing the actual change. The string
  1776. ---is rendered prominent in the user interface.
  1777. ---@field label string
  1778. ---
  1779. ---A flag which indicates that user confirmation is needed
  1780. ---before applying the change.
  1781. ---@field needsConfirmation? boolean
  1782. ---
  1783. ---A human-readable string which is rendered less prominent in
  1784. ---the user interface.
  1785. ---@field description? string
  1786. ---A filter to describe in which file operation requests or notifications
  1787. ---the server is interested in receiving.
  1788. ---
  1789. ---@since 3.16.0
  1790. ---@class lsp.FileOperationFilter
  1791. ---
  1792. ---A Uri scheme like `file` or `untitled`.
  1793. ---@field scheme? string
  1794. ---
  1795. ---The actual file operation pattern.
  1796. ---@field pattern lsp.FileOperationPattern
  1797. ---Represents information on a file/folder rename.
  1798. ---
  1799. ---@since 3.16.0
  1800. ---@class lsp.FileRename
  1801. ---
  1802. ---A file:// URI for the original location of the file/folder being renamed.
  1803. ---@field oldUri string
  1804. ---
  1805. ---A file:// URI for the new location of the file/folder being renamed.
  1806. ---@field newUri string
  1807. ---Represents information on a file/folder delete.
  1808. ---
  1809. ---@since 3.16.0
  1810. ---@class lsp.FileDelete
  1811. ---
  1812. ---A file:// URI for the location of the file/folder being deleted.
  1813. ---@field uri string
  1814. ---@class lsp.MonikerOptions: lsp.WorkDoneProgressOptions
  1815. ---Type hierarchy options used during static registration.
  1816. ---
  1817. ---@since 3.17.0
  1818. ---@class lsp.TypeHierarchyOptions: lsp.WorkDoneProgressOptions
  1819. ---@since 3.17.0
  1820. ---@class lsp.InlineValueContext
  1821. ---
  1822. ---The stack frame (as a DAP Id) where the execution has stopped.
  1823. ---@field frameId integer
  1824. ---
  1825. ---The document range where execution has stopped.
  1826. ---Typically the end position of the range denotes the line where the inline values are shown.
  1827. ---@field stoppedLocation lsp.Range
  1828. ---Provide inline value as text.
  1829. ---
  1830. ---@since 3.17.0
  1831. ---@class lsp.InlineValueText
  1832. ---
  1833. ---The document range for which the inline value applies.
  1834. ---@field range lsp.Range
  1835. ---
  1836. ---The text of the inline value.
  1837. ---@field text string
  1838. ---Provide inline value through a variable lookup.
  1839. ---If only a range is specified, the variable name will be extracted from the underlying document.
  1840. ---An optional variable name can be used to override the extracted name.
  1841. ---
  1842. ---@since 3.17.0
  1843. ---@class lsp.InlineValueVariableLookup
  1844. ---
  1845. ---The document range for which the inline value applies.
  1846. ---The range is used to extract the variable name from the underlying document.
  1847. ---@field range lsp.Range
  1848. ---
  1849. ---If specified the name of the variable to look up.
  1850. ---@field variableName? string
  1851. ---
  1852. ---How to perform the lookup.
  1853. ---@field caseSensitiveLookup boolean
  1854. ---Provide an inline value through an expression evaluation.
  1855. ---If only a range is specified, the expression will be extracted from the underlying document.
  1856. ---An optional expression can be used to override the extracted expression.
  1857. ---
  1858. ---@since 3.17.0
  1859. ---@class lsp.InlineValueEvaluatableExpression
  1860. ---
  1861. ---The document range for which the inline value applies.
  1862. ---The range is used to extract the evaluatable expression from the underlying document.
  1863. ---@field range lsp.Range
  1864. ---
  1865. ---If specified the expression overrides the extracted expression.
  1866. ---@field expression? string
  1867. ---Inline value options used during static registration.
  1868. ---
  1869. ---@since 3.17.0
  1870. ---@class lsp.InlineValueOptions: lsp.WorkDoneProgressOptions
  1871. ---An inlay hint label part allows for interactive and composite labels
  1872. ---of inlay hints.
  1873. ---
  1874. ---@since 3.17.0
  1875. ---@class lsp.InlayHintLabelPart
  1876. ---
  1877. ---The value of this label part.
  1878. ---@field value string
  1879. ---
  1880. ---The tooltip text when you hover over this label part. Depending on
  1881. ---the client capability `inlayHint.resolveSupport` clients might resolve
  1882. ---this property late using the resolve request.
  1883. ---@field tooltip? string|lsp.MarkupContent
  1884. ---
  1885. ---An optional source code location that represents this
  1886. ---label part.
  1887. ---
  1888. ---The editor will use this location for the hover and for code navigation
  1889. ---features: This part will become a clickable link that resolves to the
  1890. ---definition of the symbol at the given location (not necessarily the
  1891. ---location itself), it shows the hover that shows at the given location,
  1892. ---and it shows a context menu with further code navigation commands.
  1893. ---
  1894. ---Depending on the client capability `inlayHint.resolveSupport` clients
  1895. ---might resolve this property late using the resolve request.
  1896. ---@field location? lsp.Location
  1897. ---
  1898. ---An optional command for this label part.
  1899. ---
  1900. ---Depending on the client capability `inlayHint.resolveSupport` clients
  1901. ---might resolve this property late using the resolve request.
  1902. ---@field command? lsp.Command
  1903. ---A `MarkupContent` literal represents a string value which content is interpreted base on its
  1904. ---kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds.
  1905. ---
  1906. ---If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues.
  1907. ---See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
  1908. ---
  1909. ---Here is an example how such a string can be constructed using JavaScript / TypeScript:
  1910. ---```ts
  1911. ---let markdown: MarkdownContent = {
  1912. --- kind: MarkupKind.Markdown,
  1913. --- value: [
  1914. --- '# Header',
  1915. --- 'Some text',
  1916. --- '```typescript',
  1917. --- 'someCode();',
  1918. --- '```'
  1919. --- ].join('\n')
  1920. ---};
  1921. ---```
  1922. ---
  1923. ---*Please Note* that clients might sanitize the return markdown. A client could decide to
  1924. ---remove HTML from the markdown to avoid script execution.
  1925. ---@class lsp.MarkupContent
  1926. ---
  1927. ---The type of the Markup
  1928. ---@field kind lsp.MarkupKind
  1929. ---
  1930. ---The content itself
  1931. ---@field value string
  1932. ---Inlay hint options used during static registration.
  1933. ---
  1934. ---@since 3.17.0
  1935. ---@class lsp.InlayHintOptions: lsp.WorkDoneProgressOptions
  1936. ---
  1937. ---The server provides support to resolve additional
  1938. ---information for an inlay hint item.
  1939. ---@field resolveProvider? boolean
  1940. ---A full diagnostic report with a set of related documents.
  1941. ---
  1942. ---@since 3.17.0
  1943. ---@class lsp.RelatedFullDocumentDiagnosticReport: lsp.FullDocumentDiagnosticReport
  1944. ---
  1945. ---Diagnostics of related documents. This information is useful
  1946. ---in programming languages where code in a file A can generate
  1947. ---diagnostics in a file B which A depends on. An example of
  1948. ---such a language is C/C++ where marco definitions in a file
  1949. ---a.cpp and result in errors in a header file b.hpp.
  1950. ---
  1951. ---@since 3.17.0
  1952. ---@field relatedDocuments? table<lsp.DocumentUri, lsp.FullDocumentDiagnosticReport|lsp.UnchangedDocumentDiagnosticReport>
  1953. ---An unchanged diagnostic report with a set of related documents.
  1954. ---
  1955. ---@since 3.17.0
  1956. ---@class lsp.RelatedUnchangedDocumentDiagnosticReport: lsp.UnchangedDocumentDiagnosticReport
  1957. ---
  1958. ---Diagnostics of related documents. This information is useful
  1959. ---in programming languages where code in a file A can generate
  1960. ---diagnostics in a file B which A depends on. An example of
  1961. ---such a language is C/C++ where marco definitions in a file
  1962. ---a.cpp and result in errors in a header file b.hpp.
  1963. ---
  1964. ---@since 3.17.0
  1965. ---@field relatedDocuments? table<lsp.DocumentUri, lsp.FullDocumentDiagnosticReport|lsp.UnchangedDocumentDiagnosticReport>
  1966. ---A diagnostic report with a full set of problems.
  1967. ---
  1968. ---@since 3.17.0
  1969. ---@class lsp.FullDocumentDiagnosticReport
  1970. ---
  1971. ---A full document diagnostic report.
  1972. ---@field kind "full"
  1973. ---
  1974. ---An optional result id. If provided it will
  1975. ---be sent on the next diagnostic request for the
  1976. ---same document.
  1977. ---@field resultId? string
  1978. ---
  1979. ---The actual items.
  1980. ---@field items lsp.Diagnostic[]
  1981. ---A diagnostic report indicating that the last returned
  1982. ---report is still accurate.
  1983. ---
  1984. ---@since 3.17.0
  1985. ---@class lsp.UnchangedDocumentDiagnosticReport
  1986. ---
  1987. ---A document diagnostic report indicating
  1988. ---no changes to the last result. A server can
  1989. ---only return `unchanged` if result ids are
  1990. ---provided.
  1991. ---@field kind "unchanged"
  1992. ---
  1993. ---A result id which will be sent on the next
  1994. ---diagnostic request for the same document.
  1995. ---@field resultId string
  1996. ---Diagnostic options.
  1997. ---
  1998. ---@since 3.17.0
  1999. ---@class lsp.DiagnosticOptions: lsp.WorkDoneProgressOptions
  2000. ---
  2001. ---An optional identifier under which the diagnostics are
  2002. ---managed by the client.
  2003. ---@field identifier? string
  2004. ---
  2005. ---Whether the language has inter file dependencies meaning that
  2006. ---editing code in one file can result in a different diagnostic
  2007. ---set in another file. Inter file dependencies are common for
  2008. ---most programming languages and typically uncommon for linters.
  2009. ---@field interFileDependencies boolean
  2010. ---
  2011. ---The server provides support for workspace diagnostics as well.
  2012. ---@field workspaceDiagnostics boolean
  2013. ---A previous result id in a workspace pull request.
  2014. ---
  2015. ---@since 3.17.0
  2016. ---@class lsp.PreviousResultId
  2017. ---
  2018. ---The URI for which the client knowns a
  2019. ---result id.
  2020. ---@field uri lsp.DocumentUri
  2021. ---
  2022. ---The value of the previous result id.
  2023. ---@field value string
  2024. ---A notebook document.
  2025. ---
  2026. ---@since 3.17.0
  2027. ---@class lsp.NotebookDocument
  2028. ---
  2029. ---The notebook document's uri.
  2030. ---@field uri lsp.URI
  2031. ---
  2032. ---The type of the notebook.
  2033. ---@field notebookType string
  2034. ---
  2035. ---The version number of this document (it will increase after each
  2036. ---change, including undo/redo).
  2037. ---@field version integer
  2038. ---
  2039. ---Additional metadata stored with the notebook
  2040. ---document.
  2041. ---
  2042. ---Note: should always be an object literal (e.g. LSPObject)
  2043. ---@field metadata? lsp.LSPObject
  2044. ---
  2045. ---The cells of a notebook.
  2046. ---@field cells lsp.NotebookCell[]
  2047. ---An item to transfer a text document from the client to the
  2048. ---server.
  2049. ---@class lsp.TextDocumentItem
  2050. ---
  2051. ---The text document's uri.
  2052. ---@field uri lsp.DocumentUri
  2053. ---
  2054. ---The text document's language identifier.
  2055. ---@field languageId lsp.LanguageKind
  2056. ---
  2057. ---The version number of this document (it will increase after each
  2058. ---change, including undo/redo).
  2059. ---@field version integer
  2060. ---
  2061. ---The content of the opened text document.
  2062. ---@field text string
  2063. ---Options specific to a notebook plus its cells
  2064. ---to be synced to the server.
  2065. ---
  2066. ---If a selector provides a notebook document
  2067. ---filter but no cell selector all cells of a
  2068. ---matching notebook document will be synced.
  2069. ---
  2070. ---If a selector provides no notebook document
  2071. ---filter but only a cell selector all notebook
  2072. ---document that contain at least one matching
  2073. ---cell will be synced.
  2074. ---
  2075. ---@since 3.17.0
  2076. ---@class lsp.NotebookDocumentSyncOptions
  2077. ---
  2078. ---The notebooks to be synced
  2079. ---@field notebookSelector (lsp.NotebookDocumentFilterWithNotebook|lsp.NotebookDocumentFilterWithCells)[]
  2080. ---
  2081. ---Whether save notification should be forwarded to
  2082. ---the server. Will only be honored if mode === `notebook`.
  2083. ---@field save? boolean
  2084. ---A versioned notebook document identifier.
  2085. ---
  2086. ---@since 3.17.0
  2087. ---@class lsp.VersionedNotebookDocumentIdentifier
  2088. ---
  2089. ---The version number of this notebook document.
  2090. ---@field version integer
  2091. ---
  2092. ---The notebook document's uri.
  2093. ---@field uri lsp.URI
  2094. ---A change event for a notebook document.
  2095. ---
  2096. ---@since 3.17.0
  2097. ---@class lsp.NotebookDocumentChangeEvent
  2098. ---
  2099. ---The changed meta data if any.
  2100. ---
  2101. ---Note: should always be an object literal (e.g. LSPObject)
  2102. ---@field metadata? lsp.LSPObject
  2103. ---
  2104. ---Changes to cells
  2105. ---@field cells? lsp.NotebookDocumentCellChanges
  2106. ---A literal to identify a notebook document in the client.
  2107. ---
  2108. ---@since 3.17.0
  2109. ---@class lsp.NotebookDocumentIdentifier
  2110. ---
  2111. ---The notebook document's uri.
  2112. ---@field uri lsp.URI
  2113. ---Provides information about the context in which an inline completion was requested.
  2114. ---
  2115. ---@since 3.18.0
  2116. ---@proposed
  2117. ---@class lsp.InlineCompletionContext
  2118. ---
  2119. ---Describes how the inline completion was triggered.
  2120. ---@field triggerKind lsp.InlineCompletionTriggerKind
  2121. ---
  2122. ---Provides information about the currently selected item in the autocomplete widget if it is visible.
  2123. ---@field selectedCompletionInfo? lsp.SelectedCompletionInfo
  2124. ---A string value used as a snippet is a template which allows to insert text
  2125. ---and to control the editor cursor when insertion happens.
  2126. ---
  2127. ---A snippet can define tab stops and placeholders with `$1`, `$2`
  2128. ---and `${3:foo}`. `$0` defines the final tab stop, it defaults to
  2129. ---the end of the snippet. Variables are defined with `$name` and
  2130. ---`${name:default value}`.
  2131. ---
  2132. ---@since 3.18.0
  2133. ---@proposed
  2134. ---@class lsp.StringValue
  2135. ---
  2136. ---The kind of string value.
  2137. ---@field kind "snippet"
  2138. ---
  2139. ---The snippet string.
  2140. ---@field value string
  2141. ---Inline completion options used during static registration.
  2142. ---
  2143. ---@since 3.18.0
  2144. ---@proposed
  2145. ---@class lsp.InlineCompletionOptions: lsp.WorkDoneProgressOptions
  2146. ---General parameters to register for a notification or to register a provider.
  2147. ---@class lsp.Registration
  2148. ---
  2149. ---The id used to register the request. The id can be used to deregister
  2150. ---the request again.
  2151. ---@field id string
  2152. ---
  2153. ---The method / capability to register for.
  2154. ---@field method string
  2155. ---
  2156. ---Options necessary for the registration.
  2157. ---@field registerOptions? lsp.LSPAny
  2158. ---General parameters to unregister a request or notification.
  2159. ---@class lsp.Unregistration
  2160. ---
  2161. ---The id used to unregister the request or notification. Usually an id
  2162. ---provided during the register request.
  2163. ---@field id string
  2164. ---
  2165. ---The method to unregister for.
  2166. ---@field method string
  2167. ---The initialize parameters
  2168. ---@class lsp._InitializeParams: lsp.WorkDoneProgressParams
  2169. ---
  2170. ---The process Id of the parent process that started
  2171. ---the server.
  2172. ---
  2173. ---Is `null` if the process has not been started by another process.
  2174. ---If the parent process is not alive then the server should exit.
  2175. ---@field processId integer|lsp.null
  2176. ---
  2177. ---Information about the client
  2178. ---
  2179. ---@since 3.15.0
  2180. ---@field clientInfo? lsp.ClientInfo
  2181. ---
  2182. ---The locale the client is currently showing the user interface
  2183. ---in. This must not necessarily be the locale of the operating
  2184. ---system.
  2185. ---
  2186. ---Uses IETF language tags as the value's syntax
  2187. ---(See https://en.wikipedia.org/wiki/IETF_language_tag)
  2188. ---
  2189. ---@since 3.16.0
  2190. ---@field locale? string
  2191. ---
  2192. ---The rootPath of the workspace. Is null
  2193. ---if no folder is open.
  2194. ---
  2195. ---@deprecated in favour of rootUri.
  2196. ---@field rootPath? string|lsp.null
  2197. ---
  2198. ---The rootUri of the workspace. Is null if no
  2199. ---folder is open. If both `rootPath` and `rootUri` are set
  2200. ---`rootUri` wins.
  2201. ---
  2202. ---@deprecated in favour of workspaceFolders.
  2203. ---@field rootUri lsp.DocumentUri|lsp.null
  2204. ---
  2205. ---The capabilities provided by the client (editor or tool)
  2206. ---@field capabilities lsp.ClientCapabilities
  2207. ---
  2208. ---User provided initialization options.
  2209. ---@field initializationOptions? lsp.LSPAny
  2210. ---
  2211. ---The initial trace setting. If omitted trace is disabled ('off').
  2212. ---@field trace? lsp.TraceValue
  2213. ---@class lsp.WorkspaceFoldersInitializeParams
  2214. ---
  2215. ---The workspace folders configured in the client when the server starts.
  2216. ---
  2217. ---This property is only available if the client supports workspace folders.
  2218. ---It can be `null` if the client supports workspace folders but none are
  2219. ---configured.
  2220. ---
  2221. ---@since 3.6.0
  2222. ---@field workspaceFolders? lsp.WorkspaceFolder[]|lsp.null
  2223. ---Defines the capabilities provided by a language
  2224. ---server.
  2225. ---@class lsp.ServerCapabilities
  2226. ---
  2227. ---The position encoding the server picked from the encodings offered
  2228. ---by the client via the client capability `general.positionEncodings`.
  2229. ---
  2230. ---If the client didn't provide any position encodings the only valid
  2231. ---value that a server can return is 'utf-16'.
  2232. ---
  2233. ---If omitted it defaults to 'utf-16'.
  2234. ---
  2235. ---@since 3.17.0
  2236. ---@field positionEncoding? lsp.PositionEncodingKind
  2237. ---
  2238. ---Defines how text documents are synced. Is either a detailed structure
  2239. ---defining each notification or for backwards compatibility the
  2240. ---TextDocumentSyncKind number.
  2241. ---@field textDocumentSync? lsp.TextDocumentSyncOptions|lsp.TextDocumentSyncKind
  2242. ---
  2243. ---Defines how notebook documents are synced.
  2244. ---
  2245. ---@since 3.17.0
  2246. ---@field notebookDocumentSync? lsp.NotebookDocumentSyncOptions|lsp.NotebookDocumentSyncRegistrationOptions
  2247. ---
  2248. ---The server provides completion support.
  2249. ---@field completionProvider? lsp.CompletionOptions
  2250. ---
  2251. ---The server provides hover support.
  2252. ---@field hoverProvider? boolean|lsp.HoverOptions
  2253. ---
  2254. ---The server provides signature help support.
  2255. ---@field signatureHelpProvider? lsp.SignatureHelpOptions
  2256. ---
  2257. ---The server provides Goto Declaration support.
  2258. ---@field declarationProvider? boolean|lsp.DeclarationOptions|lsp.DeclarationRegistrationOptions
  2259. ---
  2260. ---The server provides goto definition support.
  2261. ---@field definitionProvider? boolean|lsp.DefinitionOptions
  2262. ---
  2263. ---The server provides Goto Type Definition support.
  2264. ---@field typeDefinitionProvider? boolean|lsp.TypeDefinitionOptions|lsp.TypeDefinitionRegistrationOptions
  2265. ---
  2266. ---The server provides Goto Implementation support.
  2267. ---@field implementationProvider? boolean|lsp.ImplementationOptions|lsp.ImplementationRegistrationOptions
  2268. ---
  2269. ---The server provides find references support.
  2270. ---@field referencesProvider? boolean|lsp.ReferenceOptions
  2271. ---
  2272. ---The server provides document highlight support.
  2273. ---@field documentHighlightProvider? boolean|lsp.DocumentHighlightOptions
  2274. ---
  2275. ---The server provides document symbol support.
  2276. ---@field documentSymbolProvider? boolean|lsp.DocumentSymbolOptions
  2277. ---
  2278. ---The server provides code actions. CodeActionOptions may only be
  2279. ---specified if the client states that it supports
  2280. ---`codeActionLiteralSupport` in its initial `initialize` request.
  2281. ---@field codeActionProvider? boolean|lsp.CodeActionOptions
  2282. ---
  2283. ---The server provides code lens.
  2284. ---@field codeLensProvider? lsp.CodeLensOptions
  2285. ---
  2286. ---The server provides document link support.
  2287. ---@field documentLinkProvider? lsp.DocumentLinkOptions
  2288. ---
  2289. ---The server provides color provider support.
  2290. ---@field colorProvider? boolean|lsp.DocumentColorOptions|lsp.DocumentColorRegistrationOptions
  2291. ---
  2292. ---The server provides workspace symbol support.
  2293. ---@field workspaceSymbolProvider? boolean|lsp.WorkspaceSymbolOptions
  2294. ---
  2295. ---The server provides document formatting.
  2296. ---@field documentFormattingProvider? boolean|lsp.DocumentFormattingOptions
  2297. ---
  2298. ---The server provides document range formatting.
  2299. ---@field documentRangeFormattingProvider? boolean|lsp.DocumentRangeFormattingOptions
  2300. ---
  2301. ---The server provides document formatting on typing.
  2302. ---@field documentOnTypeFormattingProvider? lsp.DocumentOnTypeFormattingOptions
  2303. ---
  2304. ---The server provides rename support. RenameOptions may only be
  2305. ---specified if the client states that it supports
  2306. ---`prepareSupport` in its initial `initialize` request.
  2307. ---@field renameProvider? boolean|lsp.RenameOptions
  2308. ---
  2309. ---The server provides folding provider support.
  2310. ---@field foldingRangeProvider? boolean|lsp.FoldingRangeOptions|lsp.FoldingRangeRegistrationOptions
  2311. ---
  2312. ---The server provides selection range support.
  2313. ---@field selectionRangeProvider? boolean|lsp.SelectionRangeOptions|lsp.SelectionRangeRegistrationOptions
  2314. ---
  2315. ---The server provides execute command support.
  2316. ---@field executeCommandProvider? lsp.ExecuteCommandOptions
  2317. ---
  2318. ---The server provides call hierarchy support.
  2319. ---
  2320. ---@since 3.16.0
  2321. ---@field callHierarchyProvider? boolean|lsp.CallHierarchyOptions|lsp.CallHierarchyRegistrationOptions
  2322. ---
  2323. ---The server provides linked editing range support.
  2324. ---
  2325. ---@since 3.16.0
  2326. ---@field linkedEditingRangeProvider? boolean|lsp.LinkedEditingRangeOptions|lsp.LinkedEditingRangeRegistrationOptions
  2327. ---
  2328. ---The server provides semantic tokens support.
  2329. ---
  2330. ---@since 3.16.0
  2331. ---@field semanticTokensProvider? lsp.SemanticTokensOptions|lsp.SemanticTokensRegistrationOptions
  2332. ---
  2333. ---The server provides moniker support.
  2334. ---
  2335. ---@since 3.16.0
  2336. ---@field monikerProvider? boolean|lsp.MonikerOptions|lsp.MonikerRegistrationOptions
  2337. ---
  2338. ---The server provides type hierarchy support.
  2339. ---
  2340. ---@since 3.17.0
  2341. ---@field typeHierarchyProvider? boolean|lsp.TypeHierarchyOptions|lsp.TypeHierarchyRegistrationOptions
  2342. ---
  2343. ---The server provides inline values.
  2344. ---
  2345. ---@since 3.17.0
  2346. ---@field inlineValueProvider? boolean|lsp.InlineValueOptions|lsp.InlineValueRegistrationOptions
  2347. ---
  2348. ---The server provides inlay hints.
  2349. ---
  2350. ---@since 3.17.0
  2351. ---@field inlayHintProvider? boolean|lsp.InlayHintOptions|lsp.InlayHintRegistrationOptions
  2352. ---
  2353. ---The server has support for pull model diagnostics.
  2354. ---
  2355. ---@since 3.17.0
  2356. ---@field diagnosticProvider? lsp.DiagnosticOptions|lsp.DiagnosticRegistrationOptions
  2357. ---
  2358. ---Inline completion options used during static registration.
  2359. ---
  2360. ---@since 3.18.0
  2361. ---@proposed
  2362. ---@field inlineCompletionProvider? boolean|lsp.InlineCompletionOptions
  2363. ---
  2364. ---Workspace specific server capabilities.
  2365. ---@field workspace? lsp.WorkspaceOptions
  2366. ---
  2367. ---Experimental server capabilities.
  2368. ---@field experimental? lsp.LSPAny
  2369. ---Information about the server
  2370. ---
  2371. ---@since 3.15.0
  2372. ---@since 3.18.0 ServerInfo type name added.
  2373. ---@class lsp.ServerInfo
  2374. ---
  2375. ---The name of the server as defined by the server.
  2376. ---@field name string
  2377. ---
  2378. ---The server's version as defined by the server.
  2379. ---@field version? string
  2380. ---A text document identifier to denote a specific version of a text document.
  2381. ---@class lsp.VersionedTextDocumentIdentifier: lsp.TextDocumentIdentifier
  2382. ---
  2383. ---The version number of this document.
  2384. ---@field version integer
  2385. ---Save options.
  2386. ---@class lsp.SaveOptions
  2387. ---
  2388. ---The client is supposed to include the content on save.
  2389. ---@field includeText? boolean
  2390. ---An event describing a file change.
  2391. ---@class lsp.FileEvent
  2392. ---
  2393. ---The file's uri.
  2394. ---@field uri lsp.DocumentUri
  2395. ---
  2396. ---The change type.
  2397. ---@field type lsp.FileChangeType
  2398. ---@class lsp.FileSystemWatcher
  2399. ---
  2400. ---The glob pattern to watch. See {@link GlobPattern glob pattern} for more detail.
  2401. ---
  2402. ---@since 3.17.0 support for relative patterns.
  2403. ---@field globPattern lsp.GlobPattern
  2404. ---
  2405. ---The kind of events of interest. If omitted it defaults
  2406. ---to WatchKind.Create | WatchKind.Change | WatchKind.Delete
  2407. ---which is 7.
  2408. ---@field kind? lsp.WatchKind
  2409. ---Represents a diagnostic, such as a compiler error or warning. Diagnostic objects
  2410. ---are only valid in the scope of a resource.
  2411. ---@class lsp.Diagnostic
  2412. ---
  2413. ---The range at which the message applies
  2414. ---@field range lsp.Range
  2415. ---
  2416. ---The diagnostic's severity. To avoid interpretation mismatches when a
  2417. ---server is used with different clients it is highly recommended that servers
  2418. ---always provide a severity value.
  2419. ---@field severity? lsp.DiagnosticSeverity
  2420. ---
  2421. ---The diagnostic's code, which usually appear in the user interface.
  2422. ---@field code? integer|string
  2423. ---
  2424. ---An optional property to describe the error code.
  2425. ---Requires the code field (above) to be present/not null.
  2426. ---
  2427. ---@since 3.16.0
  2428. ---@field codeDescription? lsp.CodeDescription
  2429. ---
  2430. ---A human-readable string describing the source of this
  2431. ---diagnostic, e.g. 'typescript' or 'super lint'. It usually
  2432. ---appears in the user interface.
  2433. ---@field source? string
  2434. ---
  2435. ---The diagnostic's message. It usually appears in the user interface
  2436. ---@field message string
  2437. ---
  2438. ---Additional metadata about the diagnostic.
  2439. ---
  2440. ---@since 3.15.0
  2441. ---@field tags? lsp.DiagnosticTag[]
  2442. ---
  2443. ---An array of related diagnostic information, e.g. when symbol-names within
  2444. ---a scope collide all definitions can be marked via this property.
  2445. ---@field relatedInformation? lsp.DiagnosticRelatedInformation[]
  2446. ---
  2447. ---A data entry field that is preserved between a `textDocument/publishDiagnostics`
  2448. ---notification and `textDocument/codeAction` request.
  2449. ---
  2450. ---@since 3.16.0
  2451. ---@field data? lsp.LSPAny
  2452. ---Contains additional information about the context in which a completion request is triggered.
  2453. ---@class lsp.CompletionContext
  2454. ---
  2455. ---How the completion was triggered.
  2456. ---@field triggerKind lsp.CompletionTriggerKind
  2457. ---
  2458. ---The trigger character (a single character) that has trigger code complete.
  2459. ---Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter`
  2460. ---@field triggerCharacter? string
  2461. ---Additional details for a completion item label.
  2462. ---
  2463. ---@since 3.17.0
  2464. ---@class lsp.CompletionItemLabelDetails
  2465. ---
  2466. ---An optional string which is rendered less prominently directly after {@link CompletionItem.label label},
  2467. ---without any spacing. Should be used for function signatures and type annotations.
  2468. ---@field detail? string
  2469. ---
  2470. ---An optional string which is rendered less prominently after {@link CompletionItem.detail}. Should be used
  2471. ---for fully qualified names and file paths.
  2472. ---@field description? string
  2473. ---A special text edit to provide an insert and a replace operation.
  2474. ---
  2475. ---@since 3.16.0
  2476. ---@class lsp.InsertReplaceEdit
  2477. ---
  2478. ---The string to be inserted.
  2479. ---@field newText string
  2480. ---
  2481. ---The range if the insert is requested
  2482. ---@field insert lsp.Range
  2483. ---
  2484. ---The range if the replace is requested.
  2485. ---@field replace lsp.Range
  2486. ---In many cases the items of an actual completion result share the same
  2487. ---value for properties like `commitCharacters` or the range of a text
  2488. ---edit. A completion list can therefore define item defaults which will
  2489. ---be used if a completion item itself doesn't specify the value.
  2490. ---
  2491. ---If a completion list specifies a default value and a completion item
  2492. ---also specifies a corresponding value the one from the item is used.
  2493. ---
  2494. ---Servers are only allowed to return default values if the client
  2495. ---signals support for this via the `completionList.itemDefaults`
  2496. ---capability.
  2497. ---
  2498. ---@since 3.17.0
  2499. ---@class lsp.CompletionItemDefaults
  2500. ---
  2501. ---A default commit character set.
  2502. ---
  2503. ---@since 3.17.0
  2504. ---@field commitCharacters? string[]
  2505. ---
  2506. ---A default edit range.
  2507. ---
  2508. ---@since 3.17.0
  2509. ---@field editRange? lsp.Range|lsp.EditRangeWithInsertReplace
  2510. ---
  2511. ---A default insert text format.
  2512. ---
  2513. ---@since 3.17.0
  2514. ---@field insertTextFormat? lsp.InsertTextFormat
  2515. ---
  2516. ---A default insert text mode.
  2517. ---
  2518. ---@since 3.17.0
  2519. ---@field insertTextMode? lsp.InsertTextMode
  2520. ---
  2521. ---A default data value.
  2522. ---
  2523. ---@since 3.17.0
  2524. ---@field data? lsp.LSPAny
  2525. ---Completion options.
  2526. ---@class lsp.CompletionOptions: lsp.WorkDoneProgressOptions
  2527. ---
  2528. ---Most tools trigger completion request automatically without explicitly requesting
  2529. ---it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
  2530. ---starts to type an identifier. For example if the user types `c` in a JavaScript file
  2531. ---code complete will automatically pop up present `console` besides others as a
  2532. ---completion item. Characters that make up identifiers don't need to be listed here.
  2533. ---
  2534. ---If code complete should automatically be trigger on characters not being valid inside
  2535. ---an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
  2536. ---@field triggerCharacters? string[]
  2537. ---
  2538. ---The list of all possible characters that commit a completion. This field can be used
  2539. ---if clients don't support individual commit characters per completion item. See
  2540. ---`ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`
  2541. ---
  2542. ---If a server provides both `allCommitCharacters` and commit characters on an individual
  2543. ---completion item the ones on the completion item win.
  2544. ---
  2545. ---@since 3.2.0
  2546. ---@field allCommitCharacters? string[]
  2547. ---
  2548. ---The server provides support to resolve additional
  2549. ---information for a completion item.
  2550. ---@field resolveProvider? boolean
  2551. ---
  2552. ---The server supports the following `CompletionItem` specific
  2553. ---capabilities.
  2554. ---
  2555. ---@since 3.17.0
  2556. ---@field completionItem? lsp.ServerCompletionItemOptions
  2557. ---Hover options.
  2558. ---@class lsp.HoverOptions: lsp.WorkDoneProgressOptions
  2559. ---Additional information about the context in which a signature help request was triggered.
  2560. ---
  2561. ---@since 3.15.0
  2562. ---@class lsp.SignatureHelpContext
  2563. ---
  2564. ---Action that caused signature help to be triggered.
  2565. ---@field triggerKind lsp.SignatureHelpTriggerKind
  2566. ---
  2567. ---Character that caused signature help to be triggered.
  2568. ---
  2569. ---This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`
  2570. ---@field triggerCharacter? string
  2571. ---
  2572. ---`true` if signature help was already showing when it was triggered.
  2573. ---
  2574. ---Retriggers occurs when the signature help is already active and can be caused by actions such as
  2575. ---typing a trigger character, a cursor move, or document content changes.
  2576. ---@field isRetrigger boolean
  2577. ---
  2578. ---The currently active `SignatureHelp`.
  2579. ---
  2580. ---The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on
  2581. ---the user navigating through available signatures.
  2582. ---@field activeSignatureHelp? lsp.SignatureHelp
  2583. ---Represents the signature of something callable. A signature
  2584. ---can have a label, like a function-name, a doc-comment, and
  2585. ---a set of parameters.
  2586. ---@class lsp.SignatureInformation
  2587. ---
  2588. ---The label of this signature. Will be shown in
  2589. ---the UI.
  2590. ---@field label string
  2591. ---
  2592. ---The human-readable doc-comment of this signature. Will be shown
  2593. ---in the UI but can be omitted.
  2594. ---@field documentation? string|lsp.MarkupContent
  2595. ---
  2596. ---The parameters of this signature.
  2597. ---@field parameters? lsp.ParameterInformation[]
  2598. ---
  2599. ---The index of the active parameter.
  2600. ---
  2601. ---If `null`, no parameter of the signature is active (for example a named
  2602. ---argument that does not match any declared parameters). This is only valid
  2603. ---if the client specifies the client capability
  2604. ---`textDocument.signatureHelp.noActiveParameterSupport === true`
  2605. ---
  2606. ---If provided (or `null`), this is used in place of
  2607. ---`SignatureHelp.activeParameter`.
  2608. ---
  2609. ---@since 3.16.0
  2610. ---@field activeParameter? uinteger|lsp.null
  2611. ---Server Capabilities for a {@link SignatureHelpRequest}.
  2612. ---@class lsp.SignatureHelpOptions: lsp.WorkDoneProgressOptions
  2613. ---
  2614. ---List of characters that trigger signature help automatically.
  2615. ---@field triggerCharacters? string[]
  2616. ---
  2617. ---List of characters that re-trigger signature help.
  2618. ---
  2619. ---These trigger characters are only active when signature help is already showing. All trigger characters
  2620. ---are also counted as re-trigger characters.
  2621. ---
  2622. ---@since 3.15.0
  2623. ---@field retriggerCharacters? string[]
  2624. ---Server Capabilities for a {@link DefinitionRequest}.
  2625. ---@class lsp.DefinitionOptions: lsp.WorkDoneProgressOptions
  2626. ---Value-object that contains additional information when
  2627. ---requesting references.
  2628. ---@class lsp.ReferenceContext
  2629. ---
  2630. ---Include the declaration of the current symbol.
  2631. ---@field includeDeclaration boolean
  2632. ---Reference options.
  2633. ---@class lsp.ReferenceOptions: lsp.WorkDoneProgressOptions
  2634. ---Provider options for a {@link DocumentHighlightRequest}.
  2635. ---@class lsp.DocumentHighlightOptions: lsp.WorkDoneProgressOptions
  2636. ---A base for all symbol information.
  2637. ---@class lsp.BaseSymbolInformation
  2638. ---
  2639. ---The name of this symbol.
  2640. ---@field name string
  2641. ---
  2642. ---The kind of this symbol.
  2643. ---@field kind lsp.SymbolKind
  2644. ---
  2645. ---Tags for this symbol.
  2646. ---
  2647. ---@since 3.16.0
  2648. ---@field tags? lsp.SymbolTag[]
  2649. ---
  2650. ---The name of the symbol containing this symbol. This information is for
  2651. ---user interface purposes (e.g. to render a qualifier in the user interface
  2652. ---if necessary). It can't be used to re-infer a hierarchy for the document
  2653. ---symbols.
  2654. ---@field containerName? string
  2655. ---Provider options for a {@link DocumentSymbolRequest}.
  2656. ---@class lsp.DocumentSymbolOptions: lsp.WorkDoneProgressOptions
  2657. ---
  2658. ---A human-readable string that is shown when multiple outlines trees
  2659. ---are shown for the same document.
  2660. ---
  2661. ---@since 3.16.0
  2662. ---@field label? string
  2663. ---Contains additional diagnostic information about the context in which
  2664. ---a {@link CodeActionProvider.provideCodeActions code action} is run.
  2665. ---@class lsp.CodeActionContext
  2666. ---
  2667. ---An array of diagnostics known on the client side overlapping the range provided to the
  2668. ---`textDocument/codeAction` request. They are provided so that the server knows which
  2669. ---errors are currently presented to the user for the given range. There is no guarantee
  2670. ---that these accurately reflect the error state of the resource. The primary parameter
  2671. ---to compute code actions is the provided range.
  2672. ---@field diagnostics lsp.Diagnostic[]
  2673. ---
  2674. ---Requested kind of actions to return.
  2675. ---
  2676. ---Actions not of this kind are filtered out by the client before being shown. So servers
  2677. ---can omit computing them.
  2678. ---@field only? lsp.CodeActionKind[]
  2679. ---
  2680. ---The reason why code actions were requested.
  2681. ---
  2682. ---@since 3.17.0
  2683. ---@field triggerKind? lsp.CodeActionTriggerKind
  2684. ---Captures why the code action is currently disabled.
  2685. ---
  2686. ---@since 3.18.0
  2687. ---@class lsp.CodeActionDisabled
  2688. ---
  2689. ---Human readable description of why the code action is currently disabled.
  2690. ---
  2691. ---This is displayed in the code actions UI.
  2692. ---@field reason string
  2693. ---Provider options for a {@link CodeActionRequest}.
  2694. ---@class lsp.CodeActionOptions: lsp.WorkDoneProgressOptions
  2695. ---
  2696. ---CodeActionKinds that this server may return.
  2697. ---
  2698. ---The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
  2699. ---may list out every specific kind they provide.
  2700. ---@field codeActionKinds? lsp.CodeActionKind[]
  2701. ---
  2702. ---Static documentation for a class of code actions.
  2703. ---
  2704. ---Documentation from the provider should be shown in the code actions menu if either:
  2705. ---
  2706. ---- Code actions of `kind` are requested by the editor. In this case, the editor will show the documentation that
  2707. --- most closely matches the requested code action kind. For example, if a provider has documentation for
  2708. --- both `Refactor` and `RefactorExtract`, when the user requests code actions for `RefactorExtract`,
  2709. --- the editor will use the documentation for `RefactorExtract` instead of the documentation for `Refactor`.
  2710. ---
  2711. ---- Any code actions of `kind` are returned by the provider.
  2712. ---
  2713. ---At most one documentation entry should be shown per provider.
  2714. ---
  2715. ---@since 3.18.0
  2716. ---@proposed
  2717. ---@field documentation? lsp.CodeActionKindDocumentation[]
  2718. ---
  2719. ---The server provides support to resolve additional
  2720. ---information for a code action.
  2721. ---
  2722. ---@since 3.16.0
  2723. ---@field resolveProvider? boolean
  2724. ---Location with only uri and does not include range.
  2725. ---
  2726. ---@since 3.18.0
  2727. ---@class lsp.LocationUriOnly
  2728. ---
  2729. ---@field uri lsp.DocumentUri
  2730. ---Server capabilities for a {@link WorkspaceSymbolRequest}.
  2731. ---@class lsp.WorkspaceSymbolOptions: lsp.WorkDoneProgressOptions
  2732. ---
  2733. ---The server provides support to resolve additional
  2734. ---information for a workspace symbol.
  2735. ---
  2736. ---@since 3.17.0
  2737. ---@field resolveProvider? boolean
  2738. ---Code Lens provider options of a {@link CodeLensRequest}.
  2739. ---@class lsp.CodeLensOptions: lsp.WorkDoneProgressOptions
  2740. ---
  2741. ---Code lens has a resolve provider as well.
  2742. ---@field resolveProvider? boolean
  2743. ---Provider options for a {@link DocumentLinkRequest}.
  2744. ---@class lsp.DocumentLinkOptions: lsp.WorkDoneProgressOptions
  2745. ---
  2746. ---Document links have a resolve provider as well.
  2747. ---@field resolveProvider? boolean
  2748. ---Value-object describing what options formatting should use.
  2749. ---@class lsp.FormattingOptions
  2750. ---
  2751. ---Size of a tab in spaces.
  2752. ---@field tabSize uinteger
  2753. ---
  2754. ---Prefer spaces over tabs.
  2755. ---@field insertSpaces boolean
  2756. ---
  2757. ---Trim trailing whitespace on a line.
  2758. ---
  2759. ---@since 3.15.0
  2760. ---@field trimTrailingWhitespace? boolean
  2761. ---
  2762. ---Insert a newline character at the end of the file if one does not exist.
  2763. ---
  2764. ---@since 3.15.0
  2765. ---@field insertFinalNewline? boolean
  2766. ---
  2767. ---Trim all newlines after the final newline at the end of the file.
  2768. ---
  2769. ---@since 3.15.0
  2770. ---@field trimFinalNewlines? boolean
  2771. ---Provider options for a {@link DocumentFormattingRequest}.
  2772. ---@class lsp.DocumentFormattingOptions: lsp.WorkDoneProgressOptions
  2773. ---Provider options for a {@link DocumentRangeFormattingRequest}.
  2774. ---@class lsp.DocumentRangeFormattingOptions: lsp.WorkDoneProgressOptions
  2775. ---
  2776. ---Whether the server supports formatting multiple ranges at once.
  2777. ---
  2778. ---@since 3.18.0
  2779. ---@proposed
  2780. ---@field rangesSupport? boolean
  2781. ---Provider options for a {@link DocumentOnTypeFormattingRequest}.
  2782. ---@class lsp.DocumentOnTypeFormattingOptions
  2783. ---
  2784. ---A character on which formatting should be triggered, like `{`.
  2785. ---@field firstTriggerCharacter string
  2786. ---
  2787. ---More trigger characters.
  2788. ---@field moreTriggerCharacter? string[]
  2789. ---Provider options for a {@link RenameRequest}.
  2790. ---@class lsp.RenameOptions: lsp.WorkDoneProgressOptions
  2791. ---
  2792. ---Renames should be checked and tested before being executed.
  2793. ---
  2794. ---@since version 3.12.0
  2795. ---@field prepareProvider? boolean
  2796. ---@since 3.18.0
  2797. ---@class lsp.PrepareRenamePlaceholder
  2798. ---
  2799. ---@field range lsp.Range
  2800. ---
  2801. ---@field placeholder string
  2802. ---@since 3.18.0
  2803. ---@class lsp.PrepareRenameDefaultBehavior
  2804. ---
  2805. ---@field defaultBehavior boolean
  2806. ---The server capabilities of a {@link ExecuteCommandRequest}.
  2807. ---@class lsp.ExecuteCommandOptions: lsp.WorkDoneProgressOptions
  2808. ---
  2809. ---The commands to be executed on the server
  2810. ---@field commands string[]
  2811. ---Additional data about a workspace edit.
  2812. ---
  2813. ---@since 3.18.0
  2814. ---@proposed
  2815. ---@class lsp.WorkspaceEditMetadata
  2816. ---
  2817. ---Signal to the editor that this edit is a refactoring.
  2818. ---@field isRefactoring? boolean
  2819. ---@since 3.16.0
  2820. ---@class lsp.SemanticTokensLegend
  2821. ---
  2822. ---The token types a server uses.
  2823. ---@field tokenTypes string[]
  2824. ---
  2825. ---The token modifiers a server uses.
  2826. ---@field tokenModifiers string[]
  2827. ---Semantic tokens options to support deltas for full documents
  2828. ---
  2829. ---@since 3.18.0
  2830. ---@class lsp.SemanticTokensFullDelta
  2831. ---
  2832. ---The server supports deltas for full documents.
  2833. ---@field delta? boolean
  2834. ---A text document identifier to optionally denote a specific version of a text document.
  2835. ---@class lsp.OptionalVersionedTextDocumentIdentifier: lsp.TextDocumentIdentifier
  2836. ---
  2837. ---The version number of this document. If a versioned text document identifier
  2838. ---is sent from the server to the client and the file is not open in the editor
  2839. ---(the server has not received an open notification before) the server can send
  2840. ---`null` to indicate that the version is unknown and the content on disk is the
  2841. ---truth (as specified with document content ownership).
  2842. ---@field version integer|lsp.null
  2843. ---A special text edit with an additional change annotation.
  2844. ---
  2845. ---@since 3.16.0.
  2846. ---@class lsp.AnnotatedTextEdit: lsp.TextEdit
  2847. ---
  2848. ---The actual identifier of the change annotation
  2849. ---@field annotationId lsp.ChangeAnnotationIdentifier
  2850. ---An interactive text edit.
  2851. ---
  2852. ---@since 3.18.0
  2853. ---@proposed
  2854. ---@class lsp.SnippetTextEdit
  2855. ---
  2856. ---The range of the text document to be manipulated.
  2857. ---@field range lsp.Range
  2858. ---
  2859. ---The snippet to be inserted.
  2860. ---@field snippet lsp.StringValue
  2861. ---
  2862. ---The actual identifier of the snippet edit.
  2863. ---@field annotationId? lsp.ChangeAnnotationIdentifier
  2864. ---A generic resource operation.
  2865. ---@class lsp.ResourceOperation
  2866. ---
  2867. ---The resource operation kind.
  2868. ---@field kind string
  2869. ---
  2870. ---An optional annotation identifier describing the operation.
  2871. ---
  2872. ---@since 3.16.0
  2873. ---@field annotationId? lsp.ChangeAnnotationIdentifier
  2874. ---Options to create a file.
  2875. ---@class lsp.CreateFileOptions
  2876. ---
  2877. ---Overwrite existing file. Overwrite wins over `ignoreIfExists`
  2878. ---@field overwrite? boolean
  2879. ---
  2880. ---Ignore if exists.
  2881. ---@field ignoreIfExists? boolean
  2882. ---Rename file options
  2883. ---@class lsp.RenameFileOptions
  2884. ---
  2885. ---Overwrite target if existing. Overwrite wins over `ignoreIfExists`
  2886. ---@field overwrite? boolean
  2887. ---
  2888. ---Ignores if target exists.
  2889. ---@field ignoreIfExists? boolean
  2890. ---Delete file options
  2891. ---@class lsp.DeleteFileOptions
  2892. ---
  2893. ---Delete the content recursively if a folder is denoted.
  2894. ---@field recursive? boolean
  2895. ---
  2896. ---Ignore the operation if the file doesn't exist.
  2897. ---@field ignoreIfNotExists? boolean
  2898. ---A pattern to describe in which file operation requests or notifications
  2899. ---the server is interested in receiving.
  2900. ---
  2901. ---@since 3.16.0
  2902. ---@class lsp.FileOperationPattern
  2903. ---
  2904. ---The glob pattern to match. Glob patterns can have the following syntax:
  2905. ---- `*` to match one or more characters in a path segment
  2906. ---- `?` to match on one character in a path segment
  2907. ---- `**` to match any number of path segments, including none
  2908. ---- `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
  2909. ---- `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
  2910. ---- `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
  2911. ---@field glob string
  2912. ---
  2913. ---Whether to match files or folders with this pattern.
  2914. ---
  2915. ---Matches both if undefined.
  2916. ---@field matches? lsp.FileOperationPatternKind
  2917. ---
  2918. ---Additional options used during matching.
  2919. ---@field options? lsp.FileOperationPatternOptions
  2920. ---A full document diagnostic report for a workspace diagnostic result.
  2921. ---
  2922. ---@since 3.17.0
  2923. ---@class lsp.WorkspaceFullDocumentDiagnosticReport: lsp.FullDocumentDiagnosticReport
  2924. ---
  2925. ---The URI for which diagnostic information is reported.
  2926. ---@field uri lsp.DocumentUri
  2927. ---
  2928. ---The version number for which the diagnostics are reported.
  2929. ---If the document is not marked as open `null` can be provided.
  2930. ---@field version integer|lsp.null
  2931. ---An unchanged document diagnostic report for a workspace diagnostic result.
  2932. ---
  2933. ---@since 3.17.0
  2934. ---@class lsp.WorkspaceUnchangedDocumentDiagnosticReport: lsp.UnchangedDocumentDiagnosticReport
  2935. ---
  2936. ---The URI for which diagnostic information is reported.
  2937. ---@field uri lsp.DocumentUri
  2938. ---
  2939. ---The version number for which the diagnostics are reported.
  2940. ---If the document is not marked as open `null` can be provided.
  2941. ---@field version integer|lsp.null
  2942. ---A notebook cell.
  2943. ---
  2944. ---A cell's document URI must be unique across ALL notebook
  2945. ---cells and can therefore be used to uniquely identify a
  2946. ---notebook cell or the cell's text document.
  2947. ---
  2948. ---@since 3.17.0
  2949. ---@class lsp.NotebookCell
  2950. ---
  2951. ---The cell's kind
  2952. ---@field kind lsp.NotebookCellKind
  2953. ---
  2954. ---The URI of the cell's text document
  2955. ---content.
  2956. ---@field document lsp.DocumentUri
  2957. ---
  2958. ---Additional metadata stored with the cell.
  2959. ---
  2960. ---Note: should always be an object literal (e.g. LSPObject)
  2961. ---@field metadata? lsp.LSPObject
  2962. ---
  2963. ---Additional execution summary information
  2964. ---if supported by the client.
  2965. ---@field executionSummary? lsp.ExecutionSummary
  2966. ---@since 3.18.0
  2967. ---@class lsp.NotebookDocumentFilterWithNotebook
  2968. ---
  2969. ---The notebook to be synced If a string
  2970. ---value is provided it matches against the
  2971. ---notebook type. '*' matches every notebook.
  2972. ---@field notebook string|lsp.NotebookDocumentFilter
  2973. ---
  2974. ---The cells of the matching notebook to be synced.
  2975. ---@field cells? lsp.NotebookCellLanguage[]
  2976. ---@since 3.18.0
  2977. ---@class lsp.NotebookDocumentFilterWithCells
  2978. ---
  2979. ---The notebook to be synced If a string
  2980. ---value is provided it matches against the
  2981. ---notebook type. '*' matches every notebook.
  2982. ---@field notebook? string|lsp.NotebookDocumentFilter
  2983. ---
  2984. ---The cells of the matching notebook to be synced.
  2985. ---@field cells lsp.NotebookCellLanguage[]
  2986. ---Cell changes to a notebook document.
  2987. ---
  2988. ---@since 3.18.0
  2989. ---@class lsp.NotebookDocumentCellChanges
  2990. ---
  2991. ---Changes to the cell structure to add or
  2992. ---remove cells.
  2993. ---@field structure? lsp.NotebookDocumentCellChangeStructure
  2994. ---
  2995. ---Changes to notebook cells properties like its
  2996. ---kind, execution summary or metadata.
  2997. ---@field data? lsp.NotebookCell[]
  2998. ---
  2999. ---Changes to the text content of notebook cells.
  3000. ---@field textContent? lsp.NotebookDocumentCellContentChanges[]
  3001. ---Describes the currently selected completion item.
  3002. ---
  3003. ---@since 3.18.0
  3004. ---@proposed
  3005. ---@class lsp.SelectedCompletionInfo
  3006. ---
  3007. ---The range that will be replaced if this completion item is accepted.
  3008. ---@field range lsp.Range
  3009. ---
  3010. ---The text the range will be replaced with if this completion is accepted.
  3011. ---@field text string
  3012. ---Information about the client
  3013. ---
  3014. ---@since 3.15.0
  3015. ---@since 3.18.0 ClientInfo type name added.
  3016. ---@class lsp.ClientInfo
  3017. ---
  3018. ---The name of the client as defined by the client.
  3019. ---@field name string
  3020. ---
  3021. ---The client's version as defined by the client.
  3022. ---@field version? string
  3023. ---Defines the capabilities provided by the client.
  3024. ---@class lsp.ClientCapabilities
  3025. ---
  3026. ---Workspace specific client capabilities.
  3027. ---@field workspace? lsp.WorkspaceClientCapabilities
  3028. ---
  3029. ---Text document specific client capabilities.
  3030. ---@field textDocument? lsp.TextDocumentClientCapabilities
  3031. ---
  3032. ---Capabilities specific to the notebook document support.
  3033. ---
  3034. ---@since 3.17.0
  3035. ---@field notebookDocument? lsp.NotebookDocumentClientCapabilities
  3036. ---
  3037. ---Window specific client capabilities.
  3038. ---@field window? lsp.WindowClientCapabilities
  3039. ---
  3040. ---General client capabilities.
  3041. ---
  3042. ---@since 3.16.0
  3043. ---@field general? lsp.GeneralClientCapabilities
  3044. ---
  3045. ---Experimental client capabilities.
  3046. ---@field experimental? lsp.LSPAny
  3047. ---@class lsp.TextDocumentSyncOptions
  3048. ---
  3049. ---Open and close notifications are sent to the server. If omitted open close notification should not
  3050. ---be sent.
  3051. ---@field openClose? boolean
  3052. ---
  3053. ---Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
  3054. ---and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.
  3055. ---@field change? lsp.TextDocumentSyncKind
  3056. ---
  3057. ---If present will save notifications are sent to the server. If omitted the notification should not be
  3058. ---sent.
  3059. ---@field willSave? boolean
  3060. ---
  3061. ---If present will save wait until requests are sent to the server. If omitted the request should not be
  3062. ---sent.
  3063. ---@field willSaveWaitUntil? boolean
  3064. ---
  3065. ---If present save notifications are sent to the server. If omitted the notification should not be
  3066. ---sent.
  3067. ---@field save? boolean|lsp.SaveOptions
  3068. ---Defines workspace specific capabilities of the server.
  3069. ---
  3070. ---@since 3.18.0
  3071. ---@class lsp.WorkspaceOptions
  3072. ---
  3073. ---The server supports workspace folder.
  3074. ---
  3075. ---@since 3.6.0
  3076. ---@field workspaceFolders? lsp.WorkspaceFoldersServerCapabilities
  3077. ---
  3078. ---The server is interested in notifications/requests for operations on files.
  3079. ---
  3080. ---@since 3.16.0
  3081. ---@field fileOperations? lsp.FileOperationOptions
  3082. ---@since 3.18.0
  3083. ---@class lsp.TextDocumentContentChangePartial
  3084. ---
  3085. ---The range of the document that changed.
  3086. ---@field range lsp.Range
  3087. ---
  3088. ---The optional length of the range that got replaced.
  3089. ---
  3090. ---@deprecated use range instead.
  3091. ---@field rangeLength? uinteger
  3092. ---
  3093. ---The new text for the provided range.
  3094. ---@field text string
  3095. ---@since 3.18.0
  3096. ---@class lsp.TextDocumentContentChangeWholeDocument
  3097. ---
  3098. ---The new text of the whole document.
  3099. ---@field text string
  3100. ---Structure to capture a description for an error code.
  3101. ---
  3102. ---@since 3.16.0
  3103. ---@class lsp.CodeDescription
  3104. ---
  3105. ---An URI to open with more information about the diagnostic error.
  3106. ---@field href lsp.URI
  3107. ---Represents a related message and source code location for a diagnostic. This should be
  3108. ---used to point to code locations that cause or related to a diagnostics, e.g when duplicating
  3109. ---a symbol in a scope.
  3110. ---@class lsp.DiagnosticRelatedInformation
  3111. ---
  3112. ---The location of this related diagnostic information.
  3113. ---@field location lsp.Location
  3114. ---
  3115. ---The message of this related diagnostic information.
  3116. ---@field message string
  3117. ---Edit range variant that includes ranges for insert and replace operations.
  3118. ---
  3119. ---@since 3.18.0
  3120. ---@class lsp.EditRangeWithInsertReplace
  3121. ---
  3122. ---@field insert lsp.Range
  3123. ---
  3124. ---@field replace lsp.Range
  3125. ---@since 3.18.0
  3126. ---@class lsp.ServerCompletionItemOptions
  3127. ---
  3128. ---The server has support for completion item label
  3129. ---details (see also `CompletionItemLabelDetails`) when
  3130. ---receiving a completion item in a resolve call.
  3131. ---
  3132. ---@since 3.17.0
  3133. ---@field labelDetailsSupport? boolean
  3134. ---@since 3.18.0
  3135. ---@deprecated use MarkupContent instead.
  3136. ---@class lsp.MarkedStringWithLanguage
  3137. ---
  3138. ---@field language string
  3139. ---
  3140. ---@field value string
  3141. ---Represents a parameter of a callable-signature. A parameter can
  3142. ---have a label and a doc-comment.
  3143. ---@class lsp.ParameterInformation
  3144. ---
  3145. ---The label of this parameter information.
  3146. ---
  3147. ---Either a string or an inclusive start and exclusive end offsets within its containing
  3148. ---signature label. (see SignatureInformation.label). The offsets are based on a UTF-16
  3149. ---string representation as `Position` and `Range` does.
  3150. ---
  3151. ---To avoid ambiguities a server should use the [start, end] offset value instead of using
  3152. ---a substring. Whether a client support this is controlled via `labelOffsetSupport` client
  3153. ---capability.
  3154. ---
  3155. ---*Note*: a label of type string should be a substring of its containing signature label.
  3156. ---Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`.
  3157. ---@field label string|[uinteger, uinteger]
  3158. ---
  3159. ---The human-readable doc-comment of this parameter. Will be shown
  3160. ---in the UI but can be omitted.
  3161. ---@field documentation? string|lsp.MarkupContent
  3162. ---Documentation for a class of code actions.
  3163. ---
  3164. ---@since 3.18.0
  3165. ---@proposed
  3166. ---@class lsp.CodeActionKindDocumentation
  3167. ---
  3168. ---The kind of the code action being documented.
  3169. ---
  3170. ---If the kind is generic, such as `CodeActionKind.Refactor`, the documentation will be shown whenever any
  3171. ---refactorings are returned. If the kind if more specific, such as `CodeActionKind.RefactorExtract`, the
  3172. ---documentation will only be shown when extract refactoring code actions are returned.
  3173. ---@field kind lsp.CodeActionKind
  3174. ---
  3175. ---Command that is ued to display the documentation to the user.
  3176. ---
  3177. ---The title of this documentation code action is taken from {@linkcode Command.title}
  3178. ---@field command lsp.Command
  3179. ---A notebook cell text document filter denotes a cell text
  3180. ---document by different properties.
  3181. ---
  3182. ---@since 3.17.0
  3183. ---@class lsp.NotebookCellTextDocumentFilter
  3184. ---
  3185. ---A filter that matches against the notebook
  3186. ---containing the notebook cell. If a string
  3187. ---value is provided it matches against the
  3188. ---notebook type. '*' matches every notebook.
  3189. ---@field notebook string|lsp.NotebookDocumentFilter
  3190. ---
  3191. ---A language id like `python`.
  3192. ---
  3193. ---Will be matched against the language id of the
  3194. ---notebook cell document. '*' matches every language.
  3195. ---@field language? string
  3196. ---Matching options for the file operation pattern.
  3197. ---
  3198. ---@since 3.16.0
  3199. ---@class lsp.FileOperationPatternOptions
  3200. ---
  3201. ---The pattern should be matched ignoring casing.
  3202. ---@field ignoreCase? boolean
  3203. ---@class lsp.ExecutionSummary
  3204. ---
  3205. ---A strict monotonically increasing value
  3206. ---indicating the execution order of a cell
  3207. ---inside a notebook.
  3208. ---@field executionOrder uinteger
  3209. ---
  3210. ---Whether the execution was successful or
  3211. ---not if known by the client.
  3212. ---@field success? boolean
  3213. ---@since 3.18.0
  3214. ---@class lsp.NotebookCellLanguage
  3215. ---
  3216. ---@field language string
  3217. ---Structural changes to cells in a notebook document.
  3218. ---
  3219. ---@since 3.18.0
  3220. ---@class lsp.NotebookDocumentCellChangeStructure
  3221. ---
  3222. ---The change to the cell array.
  3223. ---@field array lsp.NotebookCellArrayChange
  3224. ---
  3225. ---Additional opened cell text documents.
  3226. ---@field didOpen? lsp.TextDocumentItem[]
  3227. ---
  3228. ---Additional closed cell text documents.
  3229. ---@field didClose? lsp.TextDocumentIdentifier[]
  3230. ---Content changes to a cell in a notebook document.
  3231. ---
  3232. ---@since 3.18.0
  3233. ---@class lsp.NotebookDocumentCellContentChanges
  3234. ---
  3235. ---@field document lsp.VersionedTextDocumentIdentifier
  3236. ---
  3237. ---@field changes lsp.TextDocumentContentChangeEvent[]
  3238. ---Workspace specific client capabilities.
  3239. ---@class lsp.WorkspaceClientCapabilities
  3240. ---
  3241. ---The client supports applying batch edits
  3242. ---to the workspace by supporting the request
  3243. ---'workspace/applyEdit'
  3244. ---@field applyEdit? boolean
  3245. ---
  3246. ---Capabilities specific to `WorkspaceEdit`s.
  3247. ---@field workspaceEdit? lsp.WorkspaceEditClientCapabilities
  3248. ---
  3249. ---Capabilities specific to the `workspace/didChangeConfiguration` notification.
  3250. ---@field didChangeConfiguration? lsp.DidChangeConfigurationClientCapabilities
  3251. ---
  3252. ---Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
  3253. ---@field didChangeWatchedFiles? lsp.DidChangeWatchedFilesClientCapabilities
  3254. ---
  3255. ---Capabilities specific to the `workspace/symbol` request.
  3256. ---@field symbol? lsp.WorkspaceSymbolClientCapabilities
  3257. ---
  3258. ---Capabilities specific to the `workspace/executeCommand` request.
  3259. ---@field executeCommand? lsp.ExecuteCommandClientCapabilities
  3260. ---
  3261. ---The client has support for workspace folders.
  3262. ---
  3263. ---@since 3.6.0
  3264. ---@field workspaceFolders? boolean
  3265. ---
  3266. ---The client supports `workspace/configuration` requests.
  3267. ---
  3268. ---@since 3.6.0
  3269. ---@field configuration? boolean
  3270. ---
  3271. ---Capabilities specific to the semantic token requests scoped to the
  3272. ---workspace.
  3273. ---
  3274. ---@since 3.16.0.
  3275. ---@field semanticTokens? lsp.SemanticTokensWorkspaceClientCapabilities
  3276. ---
  3277. ---Capabilities specific to the code lens requests scoped to the
  3278. ---workspace.
  3279. ---
  3280. ---@since 3.16.0.
  3281. ---@field codeLens? lsp.CodeLensWorkspaceClientCapabilities
  3282. ---
  3283. ---The client has support for file notifications/requests for user operations on files.
  3284. ---
  3285. ---Since 3.16.0
  3286. ---@field fileOperations? lsp.FileOperationClientCapabilities
  3287. ---
  3288. ---Capabilities specific to the inline values requests scoped to the
  3289. ---workspace.
  3290. ---
  3291. ---@since 3.17.0.
  3292. ---@field inlineValue? lsp.InlineValueWorkspaceClientCapabilities
  3293. ---
  3294. ---Capabilities specific to the inlay hint requests scoped to the
  3295. ---workspace.
  3296. ---
  3297. ---@since 3.17.0.
  3298. ---@field inlayHint? lsp.InlayHintWorkspaceClientCapabilities
  3299. ---
  3300. ---Capabilities specific to the diagnostic requests scoped to the
  3301. ---workspace.
  3302. ---
  3303. ---@since 3.17.0.
  3304. ---@field diagnostics? lsp.DiagnosticWorkspaceClientCapabilities
  3305. ---
  3306. ---Capabilities specific to the folding range requests scoped to the workspace.
  3307. ---
  3308. ---@since 3.18.0
  3309. ---@proposed
  3310. ---@field foldingRange? lsp.FoldingRangeWorkspaceClientCapabilities
  3311. ---Text document specific client capabilities.
  3312. ---@class lsp.TextDocumentClientCapabilities
  3313. ---
  3314. ---Defines which synchronization capabilities the client supports.
  3315. ---@field synchronization? lsp.TextDocumentSyncClientCapabilities
  3316. ---
  3317. ---Capabilities specific to the `textDocument/completion` request.
  3318. ---@field completion? lsp.CompletionClientCapabilities
  3319. ---
  3320. ---Capabilities specific to the `textDocument/hover` request.
  3321. ---@field hover? lsp.HoverClientCapabilities
  3322. ---
  3323. ---Capabilities specific to the `textDocument/signatureHelp` request.
  3324. ---@field signatureHelp? lsp.SignatureHelpClientCapabilities
  3325. ---
  3326. ---Capabilities specific to the `textDocument/declaration` request.
  3327. ---
  3328. ---@since 3.14.0
  3329. ---@field declaration? lsp.DeclarationClientCapabilities
  3330. ---
  3331. ---Capabilities specific to the `textDocument/definition` request.
  3332. ---@field definition? lsp.DefinitionClientCapabilities
  3333. ---
  3334. ---Capabilities specific to the `textDocument/typeDefinition` request.
  3335. ---
  3336. ---@since 3.6.0
  3337. ---@field typeDefinition? lsp.TypeDefinitionClientCapabilities
  3338. ---
  3339. ---Capabilities specific to the `textDocument/implementation` request.
  3340. ---
  3341. ---@since 3.6.0
  3342. ---@field implementation? lsp.ImplementationClientCapabilities
  3343. ---
  3344. ---Capabilities specific to the `textDocument/references` request.
  3345. ---@field references? lsp.ReferenceClientCapabilities
  3346. ---
  3347. ---Capabilities specific to the `textDocument/documentHighlight` request.
  3348. ---@field documentHighlight? lsp.DocumentHighlightClientCapabilities
  3349. ---
  3350. ---Capabilities specific to the `textDocument/documentSymbol` request.
  3351. ---@field documentSymbol? lsp.DocumentSymbolClientCapabilities
  3352. ---
  3353. ---Capabilities specific to the `textDocument/codeAction` request.
  3354. ---@field codeAction? lsp.CodeActionClientCapabilities
  3355. ---
  3356. ---Capabilities specific to the `textDocument/codeLens` request.
  3357. ---@field codeLens? lsp.CodeLensClientCapabilities
  3358. ---
  3359. ---Capabilities specific to the `textDocument/documentLink` request.
  3360. ---@field documentLink? lsp.DocumentLinkClientCapabilities
  3361. ---
  3362. ---Capabilities specific to the `textDocument/documentColor` and the
  3363. ---`textDocument/colorPresentation` request.
  3364. ---
  3365. ---@since 3.6.0
  3366. ---@field colorProvider? lsp.DocumentColorClientCapabilities
  3367. ---
  3368. ---Capabilities specific to the `textDocument/formatting` request.
  3369. ---@field formatting? lsp.DocumentFormattingClientCapabilities
  3370. ---
  3371. ---Capabilities specific to the `textDocument/rangeFormatting` request.
  3372. ---@field rangeFormatting? lsp.DocumentRangeFormattingClientCapabilities
  3373. ---
  3374. ---Capabilities specific to the `textDocument/onTypeFormatting` request.
  3375. ---@field onTypeFormatting? lsp.DocumentOnTypeFormattingClientCapabilities
  3376. ---
  3377. ---Capabilities specific to the `textDocument/rename` request.
  3378. ---@field rename? lsp.RenameClientCapabilities
  3379. ---
  3380. ---Capabilities specific to the `textDocument/foldingRange` request.
  3381. ---
  3382. ---@since 3.10.0
  3383. ---@field foldingRange? lsp.FoldingRangeClientCapabilities
  3384. ---
  3385. ---Capabilities specific to the `textDocument/selectionRange` request.
  3386. ---
  3387. ---@since 3.15.0
  3388. ---@field selectionRange? lsp.SelectionRangeClientCapabilities
  3389. ---
  3390. ---Capabilities specific to the `textDocument/publishDiagnostics` notification.
  3391. ---@field publishDiagnostics? lsp.PublishDiagnosticsClientCapabilities
  3392. ---
  3393. ---Capabilities specific to the various call hierarchy requests.
  3394. ---
  3395. ---@since 3.16.0
  3396. ---@field callHierarchy? lsp.CallHierarchyClientCapabilities
  3397. ---
  3398. ---Capabilities specific to the various semantic token request.
  3399. ---
  3400. ---@since 3.16.0
  3401. ---@field semanticTokens? lsp.SemanticTokensClientCapabilities
  3402. ---
  3403. ---Capabilities specific to the `textDocument/linkedEditingRange` request.
  3404. ---
  3405. ---@since 3.16.0
  3406. ---@field linkedEditingRange? lsp.LinkedEditingRangeClientCapabilities
  3407. ---
  3408. ---Client capabilities specific to the `textDocument/moniker` request.
  3409. ---
  3410. ---@since 3.16.0
  3411. ---@field moniker? lsp.MonikerClientCapabilities
  3412. ---
  3413. ---Capabilities specific to the various type hierarchy requests.
  3414. ---
  3415. ---@since 3.17.0
  3416. ---@field typeHierarchy? lsp.TypeHierarchyClientCapabilities
  3417. ---
  3418. ---Capabilities specific to the `textDocument/inlineValue` request.
  3419. ---
  3420. ---@since 3.17.0
  3421. ---@field inlineValue? lsp.InlineValueClientCapabilities
  3422. ---
  3423. ---Capabilities specific to the `textDocument/inlayHint` request.
  3424. ---
  3425. ---@since 3.17.0
  3426. ---@field inlayHint? lsp.InlayHintClientCapabilities
  3427. ---
  3428. ---Capabilities specific to the diagnostic pull model.
  3429. ---
  3430. ---@since 3.17.0
  3431. ---@field diagnostic? lsp.DiagnosticClientCapabilities
  3432. ---
  3433. ---Client capabilities specific to inline completions.
  3434. ---
  3435. ---@since 3.18.0
  3436. ---@proposed
  3437. ---@field inlineCompletion? lsp.InlineCompletionClientCapabilities
  3438. ---Capabilities specific to the notebook document support.
  3439. ---
  3440. ---@since 3.17.0
  3441. ---@class lsp.NotebookDocumentClientCapabilities
  3442. ---
  3443. ---Capabilities specific to notebook document synchronization
  3444. ---
  3445. ---@since 3.17.0
  3446. ---@field synchronization lsp.NotebookDocumentSyncClientCapabilities
  3447. ---@class lsp.WindowClientCapabilities
  3448. ---
  3449. ---It indicates whether the client supports server initiated
  3450. ---progress using the `window/workDoneProgress/create` request.
  3451. ---
  3452. ---The capability also controls Whether client supports handling
  3453. ---of progress notifications. If set servers are allowed to report a
  3454. ---`workDoneProgress` property in the request specific server
  3455. ---capabilities.
  3456. ---
  3457. ---@since 3.15.0
  3458. ---@field workDoneProgress? boolean
  3459. ---
  3460. ---Capabilities specific to the showMessage request.
  3461. ---
  3462. ---@since 3.16.0
  3463. ---@field showMessage? lsp.ShowMessageRequestClientCapabilities
  3464. ---
  3465. ---Capabilities specific to the showDocument request.
  3466. ---
  3467. ---@since 3.16.0
  3468. ---@field showDocument? lsp.ShowDocumentClientCapabilities
  3469. ---General client capabilities.
  3470. ---
  3471. ---@since 3.16.0
  3472. ---@class lsp.GeneralClientCapabilities
  3473. ---
  3474. ---Client capability that signals how the client
  3475. ---handles stale requests (e.g. a request
  3476. ---for which the client will not process the response
  3477. ---anymore since the information is outdated).
  3478. ---
  3479. ---@since 3.17.0
  3480. ---@field staleRequestSupport? lsp.StaleRequestSupportOptions
  3481. ---
  3482. ---Client capabilities specific to regular expressions.
  3483. ---
  3484. ---@since 3.16.0
  3485. ---@field regularExpressions? lsp.RegularExpressionsClientCapabilities
  3486. ---
  3487. ---Client capabilities specific to the client's markdown parser.
  3488. ---
  3489. ---@since 3.16.0
  3490. ---@field markdown? lsp.MarkdownClientCapabilities
  3491. ---
  3492. ---The position encodings supported by the client. Client and server
  3493. ---have to agree on the same position encoding to ensure that offsets
  3494. ---(e.g. character position in a line) are interpreted the same on both
  3495. ---sides.
  3496. ---
  3497. ---To keep the protocol backwards compatible the following applies: if
  3498. ---the value 'utf-16' is missing from the array of position encodings
  3499. ---servers can assume that the client supports UTF-16. UTF-16 is
  3500. ---therefore a mandatory encoding.
  3501. ---
  3502. ---If omitted it defaults to ['utf-16'].
  3503. ---
  3504. ---Implementation considerations: since the conversion from one encoding
  3505. ---into another requires the content of the file / line the conversion
  3506. ---is best done where the file is read which is usually on the server
  3507. ---side.
  3508. ---
  3509. ---@since 3.17.0
  3510. ---@field positionEncodings? lsp.PositionEncodingKind[]
  3511. ---@class lsp.WorkspaceFoldersServerCapabilities
  3512. ---
  3513. ---The server has support for workspace folders
  3514. ---@field supported? boolean
  3515. ---
  3516. ---Whether the server wants to receive workspace folder
  3517. ---change notifications.
  3518. ---
  3519. ---If a string is provided the string is treated as an ID
  3520. ---under which the notification is registered on the client
  3521. ---side. The ID can be used to unregister for these events
  3522. ---using the `client/unregisterCapability` request.
  3523. ---@field changeNotifications? string|boolean
  3524. ---Options for notifications/requests for user operations on files.
  3525. ---
  3526. ---@since 3.16.0
  3527. ---@class lsp.FileOperationOptions
  3528. ---
  3529. ---The server is interested in receiving didCreateFiles notifications.
  3530. ---@field didCreate? lsp.FileOperationRegistrationOptions
  3531. ---
  3532. ---The server is interested in receiving willCreateFiles requests.
  3533. ---@field willCreate? lsp.FileOperationRegistrationOptions
  3534. ---
  3535. ---The server is interested in receiving didRenameFiles notifications.
  3536. ---@field didRename? lsp.FileOperationRegistrationOptions
  3537. ---
  3538. ---The server is interested in receiving willRenameFiles requests.
  3539. ---@field willRename? lsp.FileOperationRegistrationOptions
  3540. ---
  3541. ---The server is interested in receiving didDeleteFiles file notifications.
  3542. ---@field didDelete? lsp.FileOperationRegistrationOptions
  3543. ---
  3544. ---The server is interested in receiving willDeleteFiles file requests.
  3545. ---@field willDelete? lsp.FileOperationRegistrationOptions
  3546. ---A relative pattern is a helper to construct glob patterns that are matched
  3547. ---relatively to a base URI. The common value for a `baseUri` is a workspace
  3548. ---folder root, but it can be another absolute URI as well.
  3549. ---
  3550. ---@since 3.17.0
  3551. ---@class lsp.RelativePattern
  3552. ---
  3553. ---A workspace folder or a base URI to which this pattern will be matched
  3554. ---against relatively.
  3555. ---@field baseUri lsp.WorkspaceFolder|lsp.URI
  3556. ---
  3557. ---The actual glob pattern;
  3558. ---@field pattern lsp.Pattern
  3559. ---A document filter where `language` is required field.
  3560. ---
  3561. ---@since 3.18.0
  3562. ---@class lsp.TextDocumentFilterLanguage
  3563. ---
  3564. ---A language id, like `typescript`.
  3565. ---@field language string
  3566. ---
  3567. ---A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.
  3568. ---@field scheme? string
  3569. ---
  3570. ---A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.
  3571. ---
  3572. ---@since 3.18.0 - support for relative patterns.
  3573. ---@field pattern? lsp.GlobPattern
  3574. ---A document filter where `scheme` is required field.
  3575. ---
  3576. ---@since 3.18.0
  3577. ---@class lsp.TextDocumentFilterScheme
  3578. ---
  3579. ---A language id, like `typescript`.
  3580. ---@field language? string
  3581. ---
  3582. ---A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.
  3583. ---@field scheme string
  3584. ---
  3585. ---A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.
  3586. ---
  3587. ---@since 3.18.0 - support for relative patterns.
  3588. ---@field pattern? lsp.GlobPattern
  3589. ---A document filter where `pattern` is required field.
  3590. ---
  3591. ---@since 3.18.0
  3592. ---@class lsp.TextDocumentFilterPattern
  3593. ---
  3594. ---A language id, like `typescript`.
  3595. ---@field language? string
  3596. ---
  3597. ---A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.
  3598. ---@field scheme? string
  3599. ---
  3600. ---A glob pattern, like **/*.{ts,js}. See TextDocumentFilter for examples.
  3601. ---
  3602. ---@since 3.18.0 - support for relative patterns.
  3603. ---@field pattern lsp.GlobPattern
  3604. ---A notebook document filter where `notebookType` is required field.
  3605. ---
  3606. ---@since 3.18.0
  3607. ---@class lsp.NotebookDocumentFilterNotebookType
  3608. ---
  3609. ---The type of the enclosing notebook.
  3610. ---@field notebookType string
  3611. ---
  3612. ---A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.
  3613. ---@field scheme? string
  3614. ---
  3615. ---A glob pattern.
  3616. ---@field pattern? lsp.GlobPattern
  3617. ---A notebook document filter where `scheme` is required field.
  3618. ---
  3619. ---@since 3.18.0
  3620. ---@class lsp.NotebookDocumentFilterScheme
  3621. ---
  3622. ---The type of the enclosing notebook.
  3623. ---@field notebookType? string
  3624. ---
  3625. ---A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.
  3626. ---@field scheme string
  3627. ---
  3628. ---A glob pattern.
  3629. ---@field pattern? lsp.GlobPattern
  3630. ---A notebook document filter where `pattern` is required field.
  3631. ---
  3632. ---@since 3.18.0
  3633. ---@class lsp.NotebookDocumentFilterPattern
  3634. ---
  3635. ---The type of the enclosing notebook.
  3636. ---@field notebookType? string
  3637. ---
  3638. ---A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.
  3639. ---@field scheme? string
  3640. ---
  3641. ---A glob pattern.
  3642. ---@field pattern lsp.GlobPattern
  3643. ---A change describing how to move a `NotebookCell`
  3644. ---array from state S to S'.
  3645. ---
  3646. ---@since 3.17.0
  3647. ---@class lsp.NotebookCellArrayChange
  3648. ---
  3649. ---The start oftest of the cell that changed.
  3650. ---@field start uinteger
  3651. ---
  3652. ---The deleted cells
  3653. ---@field deleteCount uinteger
  3654. ---
  3655. ---The new cells, if any
  3656. ---@field cells? lsp.NotebookCell[]
  3657. ---@class lsp.WorkspaceEditClientCapabilities
  3658. ---
  3659. ---The client supports versioned document changes in `WorkspaceEdit`s
  3660. ---@field documentChanges? boolean
  3661. ---
  3662. ---The resource operations the client supports. Clients should at least
  3663. ---support 'create', 'rename' and 'delete' files and folders.
  3664. ---
  3665. ---@since 3.13.0
  3666. ---@field resourceOperations? lsp.ResourceOperationKind[]
  3667. ---
  3668. ---The failure handling strategy of a client if applying the workspace edit
  3669. ---fails.
  3670. ---
  3671. ---@since 3.13.0
  3672. ---@field failureHandling? lsp.FailureHandlingKind
  3673. ---
  3674. ---Whether the client normalizes line endings to the client specific
  3675. ---setting.
  3676. ---If set to `true` the client will normalize line ending characters
  3677. ---in a workspace edit to the client-specified new line
  3678. ---character.
  3679. ---
  3680. ---@since 3.16.0
  3681. ---@field normalizesLineEndings? boolean
  3682. ---
  3683. ---Whether the client in general supports change annotations on text edits,
  3684. ---create file, rename file and delete file changes.
  3685. ---
  3686. ---@since 3.16.0
  3687. ---@field changeAnnotationSupport? lsp.ChangeAnnotationsSupportOptions
  3688. ---
  3689. ---Whether the client supports `WorkspaceEditMetadata` in `WorkspaceEdit`s.
  3690. ---
  3691. ---@since 3.18.0
  3692. ---@proposed
  3693. ---@field metadataSupport? boolean
  3694. ---
  3695. ---Whether the client supports snippets as text edits.
  3696. ---
  3697. ---@since 3.18.0
  3698. ---@proposed
  3699. ---@field snippetEditSupport? boolean
  3700. ---@class lsp.DidChangeConfigurationClientCapabilities
  3701. ---
  3702. ---Did change configuration notification supports dynamic registration.
  3703. ---@field dynamicRegistration? boolean
  3704. ---@class lsp.DidChangeWatchedFilesClientCapabilities
  3705. ---
  3706. ---Did change watched files notification supports dynamic registration. Please note
  3707. ---that the current protocol doesn't support static configuration for file changes
  3708. ---from the server side.
  3709. ---@field dynamicRegistration? boolean
  3710. ---
  3711. ---Whether the client has support for {@link RelativePattern relative pattern}
  3712. ---or not.
  3713. ---
  3714. ---@since 3.17.0
  3715. ---@field relativePatternSupport? boolean
  3716. ---Client capabilities for a {@link WorkspaceSymbolRequest}.
  3717. ---@class lsp.WorkspaceSymbolClientCapabilities
  3718. ---
  3719. ---Symbol request supports dynamic registration.
  3720. ---@field dynamicRegistration? boolean
  3721. ---
  3722. ---Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
  3723. ---@field symbolKind? lsp.ClientSymbolKindOptions
  3724. ---
  3725. ---The client supports tags on `SymbolInformation`.
  3726. ---Clients supporting tags have to handle unknown tags gracefully.
  3727. ---
  3728. ---@since 3.16.0
  3729. ---@field tagSupport? lsp.ClientSymbolTagOptions
  3730. ---
  3731. ---The client support partial workspace symbols. The client will send the
  3732. ---request `workspaceSymbol/resolve` to the server to resolve additional
  3733. ---properties.
  3734. ---
  3735. ---@since 3.17.0
  3736. ---@field resolveSupport? lsp.ClientSymbolResolveOptions
  3737. ---The client capabilities of a {@link ExecuteCommandRequest}.
  3738. ---@class lsp.ExecuteCommandClientCapabilities
  3739. ---
  3740. ---Execute command supports dynamic registration.
  3741. ---@field dynamicRegistration? boolean
  3742. ---@since 3.16.0
  3743. ---@class lsp.SemanticTokensWorkspaceClientCapabilities
  3744. ---
  3745. ---Whether the client implementation supports a refresh request sent from
  3746. ---the server to the client.
  3747. ---
  3748. ---Note that this event is global and will force the client to refresh all
  3749. ---semantic tokens currently shown. It should be used with absolute care
  3750. ---and is useful for situation where a server for example detects a project
  3751. ---wide change that requires such a calculation.
  3752. ---@field refreshSupport? boolean
  3753. ---@since 3.16.0
  3754. ---@class lsp.CodeLensWorkspaceClientCapabilities
  3755. ---
  3756. ---Whether the client implementation supports a refresh request sent from the
  3757. ---server to the client.
  3758. ---
  3759. ---Note that this event is global and will force the client to refresh all
  3760. ---code lenses currently shown. It should be used with absolute care and is
  3761. ---useful for situation where a server for example detect a project wide
  3762. ---change that requires such a calculation.
  3763. ---@field refreshSupport? boolean
  3764. ---Capabilities relating to events from file operations by the user in the client.
  3765. ---
  3766. ---These events do not come from the file system, they come from user operations
  3767. ---like renaming a file in the UI.
  3768. ---
  3769. ---@since 3.16.0
  3770. ---@class lsp.FileOperationClientCapabilities
  3771. ---
  3772. ---Whether the client supports dynamic registration for file requests/notifications.
  3773. ---@field dynamicRegistration? boolean
  3774. ---
  3775. ---The client has support for sending didCreateFiles notifications.
  3776. ---@field didCreate? boolean
  3777. ---
  3778. ---The client has support for sending willCreateFiles requests.
  3779. ---@field willCreate? boolean
  3780. ---
  3781. ---The client has support for sending didRenameFiles notifications.
  3782. ---@field didRename? boolean
  3783. ---
  3784. ---The client has support for sending willRenameFiles requests.
  3785. ---@field willRename? boolean
  3786. ---
  3787. ---The client has support for sending didDeleteFiles notifications.
  3788. ---@field didDelete? boolean
  3789. ---
  3790. ---The client has support for sending willDeleteFiles requests.
  3791. ---@field willDelete? boolean
  3792. ---Client workspace capabilities specific to inline values.
  3793. ---
  3794. ---@since 3.17.0
  3795. ---@class lsp.InlineValueWorkspaceClientCapabilities
  3796. ---
  3797. ---Whether the client implementation supports a refresh request sent from the
  3798. ---server to the client.
  3799. ---
  3800. ---Note that this event is global and will force the client to refresh all
  3801. ---inline values currently shown. It should be used with absolute care and is
  3802. ---useful for situation where a server for example detects a project wide
  3803. ---change that requires such a calculation.
  3804. ---@field refreshSupport? boolean
  3805. ---Client workspace capabilities specific to inlay hints.
  3806. ---
  3807. ---@since 3.17.0
  3808. ---@class lsp.InlayHintWorkspaceClientCapabilities
  3809. ---
  3810. ---Whether the client implementation supports a refresh request sent from
  3811. ---the server to the client.
  3812. ---
  3813. ---Note that this event is global and will force the client to refresh all
  3814. ---inlay hints currently shown. It should be used with absolute care and
  3815. ---is useful for situation where a server for example detects a project wide
  3816. ---change that requires such a calculation.
  3817. ---@field refreshSupport? boolean
  3818. ---Workspace client capabilities specific to diagnostic pull requests.
  3819. ---
  3820. ---@since 3.17.0
  3821. ---@class lsp.DiagnosticWorkspaceClientCapabilities
  3822. ---
  3823. ---Whether the client implementation supports a refresh request sent from
  3824. ---the server to the client.
  3825. ---
  3826. ---Note that this event is global and will force the client to refresh all
  3827. ---pulled diagnostics currently shown. It should be used with absolute care and
  3828. ---is useful for situation where a server for example detects a project wide
  3829. ---change that requires such a calculation.
  3830. ---@field refreshSupport? boolean
  3831. ---Client workspace capabilities specific to folding ranges
  3832. ---
  3833. ---@since 3.18.0
  3834. ---@proposed
  3835. ---@class lsp.FoldingRangeWorkspaceClientCapabilities
  3836. ---
  3837. ---Whether the client implementation supports a refresh request sent from the
  3838. ---server to the client.
  3839. ---
  3840. ---Note that this event is global and will force the client to refresh all
  3841. ---folding ranges currently shown. It should be used with absolute care and is
  3842. ---useful for situation where a server for example detects a project wide
  3843. ---change that requires such a calculation.
  3844. ---
  3845. ---@since 3.18.0
  3846. ---@proposed
  3847. ---@field refreshSupport? boolean
  3848. ---@class lsp.TextDocumentSyncClientCapabilities
  3849. ---
  3850. ---Whether text document synchronization supports dynamic registration.
  3851. ---@field dynamicRegistration? boolean
  3852. ---
  3853. ---The client supports sending will save notifications.
  3854. ---@field willSave? boolean
  3855. ---
  3856. ---The client supports sending a will save request and
  3857. ---waits for a response providing text edits which will
  3858. ---be applied to the document before it is saved.
  3859. ---@field willSaveWaitUntil? boolean
  3860. ---
  3861. ---The client supports did save notifications.
  3862. ---@field didSave? boolean
  3863. ---Completion client capabilities
  3864. ---@class lsp.CompletionClientCapabilities
  3865. ---
  3866. ---Whether completion supports dynamic registration.
  3867. ---@field dynamicRegistration? boolean
  3868. ---
  3869. ---The client supports the following `CompletionItem` specific
  3870. ---capabilities.
  3871. ---@field completionItem? lsp.ClientCompletionItemOptions
  3872. ---
  3873. ---@field completionItemKind? lsp.ClientCompletionItemOptionsKind
  3874. ---
  3875. ---Defines how the client handles whitespace and indentation
  3876. ---when accepting a completion item that uses multi line
  3877. ---text in either `insertText` or `textEdit`.
  3878. ---
  3879. ---@since 3.17.0
  3880. ---@field insertTextMode? lsp.InsertTextMode
  3881. ---
  3882. ---The client supports to send additional context information for a
  3883. ---`textDocument/completion` request.
  3884. ---@field contextSupport? boolean
  3885. ---
  3886. ---The client supports the following `CompletionList` specific
  3887. ---capabilities.
  3888. ---
  3889. ---@since 3.17.0
  3890. ---@field completionList? lsp.CompletionListCapabilities
  3891. ---@class lsp.HoverClientCapabilities
  3892. ---
  3893. ---Whether hover supports dynamic registration.
  3894. ---@field dynamicRegistration? boolean
  3895. ---
  3896. ---Client supports the following content formats for the content
  3897. ---property. The order describes the preferred format of the client.
  3898. ---@field contentFormat? lsp.MarkupKind[]
  3899. ---Client Capabilities for a {@link SignatureHelpRequest}.
  3900. ---@class lsp.SignatureHelpClientCapabilities
  3901. ---
  3902. ---Whether signature help supports dynamic registration.
  3903. ---@field dynamicRegistration? boolean
  3904. ---
  3905. ---The client supports the following `SignatureInformation`
  3906. ---specific properties.
  3907. ---@field signatureInformation? lsp.ClientSignatureInformationOptions
  3908. ---
  3909. ---The client supports to send additional context information for a
  3910. ---`textDocument/signatureHelp` request. A client that opts into
  3911. ---contextSupport will also support the `retriggerCharacters` on
  3912. ---`SignatureHelpOptions`.
  3913. ---
  3914. ---@since 3.15.0
  3915. ---@field contextSupport? boolean
  3916. ---@since 3.14.0
  3917. ---@class lsp.DeclarationClientCapabilities
  3918. ---
  3919. ---Whether declaration supports dynamic registration. If this is set to `true`
  3920. ---the client supports the new `DeclarationRegistrationOptions` return value
  3921. ---for the corresponding server capability as well.
  3922. ---@field dynamicRegistration? boolean
  3923. ---
  3924. ---The client supports additional metadata in the form of declaration links.
  3925. ---@field linkSupport? boolean
  3926. ---Client Capabilities for a {@link DefinitionRequest}.
  3927. ---@class lsp.DefinitionClientCapabilities
  3928. ---
  3929. ---Whether definition supports dynamic registration.
  3930. ---@field dynamicRegistration? boolean
  3931. ---
  3932. ---The client supports additional metadata in the form of definition links.
  3933. ---
  3934. ---@since 3.14.0
  3935. ---@field linkSupport? boolean
  3936. ---Since 3.6.0
  3937. ---@class lsp.TypeDefinitionClientCapabilities
  3938. ---
  3939. ---Whether implementation supports dynamic registration. If this is set to `true`
  3940. ---the client supports the new `TypeDefinitionRegistrationOptions` return value
  3941. ---for the corresponding server capability as well.
  3942. ---@field dynamicRegistration? boolean
  3943. ---
  3944. ---The client supports additional metadata in the form of definition links.
  3945. ---
  3946. ---Since 3.14.0
  3947. ---@field linkSupport? boolean
  3948. ---@since 3.6.0
  3949. ---@class lsp.ImplementationClientCapabilities
  3950. ---
  3951. ---Whether implementation supports dynamic registration. If this is set to `true`
  3952. ---the client supports the new `ImplementationRegistrationOptions` return value
  3953. ---for the corresponding server capability as well.
  3954. ---@field dynamicRegistration? boolean
  3955. ---
  3956. ---The client supports additional metadata in the form of definition links.
  3957. ---
  3958. ---@since 3.14.0
  3959. ---@field linkSupport? boolean
  3960. ---Client Capabilities for a {@link ReferencesRequest}.
  3961. ---@class lsp.ReferenceClientCapabilities
  3962. ---
  3963. ---Whether references supports dynamic registration.
  3964. ---@field dynamicRegistration? boolean
  3965. ---Client Capabilities for a {@link DocumentHighlightRequest}.
  3966. ---@class lsp.DocumentHighlightClientCapabilities
  3967. ---
  3968. ---Whether document highlight supports dynamic registration.
  3969. ---@field dynamicRegistration? boolean
  3970. ---Client Capabilities for a {@link DocumentSymbolRequest}.
  3971. ---@class lsp.DocumentSymbolClientCapabilities
  3972. ---
  3973. ---Whether document symbol supports dynamic registration.
  3974. ---@field dynamicRegistration? boolean
  3975. ---
  3976. ---Specific capabilities for the `SymbolKind` in the
  3977. ---`textDocument/documentSymbol` request.
  3978. ---@field symbolKind? lsp.ClientSymbolKindOptions
  3979. ---
  3980. ---The client supports hierarchical document symbols.
  3981. ---@field hierarchicalDocumentSymbolSupport? boolean
  3982. ---
  3983. ---The client supports tags on `SymbolInformation`. Tags are supported on
  3984. ---`DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true.
  3985. ---Clients supporting tags have to handle unknown tags gracefully.
  3986. ---
  3987. ---@since 3.16.0
  3988. ---@field tagSupport? lsp.ClientSymbolTagOptions
  3989. ---
  3990. ---The client supports an additional label presented in the UI when
  3991. ---registering a document symbol provider.
  3992. ---
  3993. ---@since 3.16.0
  3994. ---@field labelSupport? boolean
  3995. ---The Client Capabilities of a {@link CodeActionRequest}.
  3996. ---@class lsp.CodeActionClientCapabilities
  3997. ---
  3998. ---Whether code action supports dynamic registration.
  3999. ---@field dynamicRegistration? boolean
  4000. ---
  4001. ---The client support code action literals of type `CodeAction` as a valid
  4002. ---response of the `textDocument/codeAction` request. If the property is not
  4003. ---set the request can only return `Command` literals.
  4004. ---
  4005. ---@since 3.8.0
  4006. ---@field codeActionLiteralSupport? lsp.ClientCodeActionLiteralOptions
  4007. ---
  4008. ---Whether code action supports the `isPreferred` property.
  4009. ---
  4010. ---@since 3.15.0
  4011. ---@field isPreferredSupport? boolean
  4012. ---
  4013. ---Whether code action supports the `disabled` property.
  4014. ---
  4015. ---@since 3.16.0
  4016. ---@field disabledSupport? boolean
  4017. ---
  4018. ---Whether code action supports the `data` property which is
  4019. ---preserved between a `textDocument/codeAction` and a
  4020. ---`codeAction/resolve` request.
  4021. ---
  4022. ---@since 3.16.0
  4023. ---@field dataSupport? boolean
  4024. ---
  4025. ---Whether the client supports resolving additional code action
  4026. ---properties via a separate `codeAction/resolve` request.
  4027. ---
  4028. ---@since 3.16.0
  4029. ---@field resolveSupport? lsp.ClientCodeActionResolveOptions
  4030. ---
  4031. ---Whether the client honors the change annotations in
  4032. ---text edits and resource operations returned via the
  4033. ---`CodeAction#edit` property by for example presenting
  4034. ---the workspace edit in the user interface and asking
  4035. ---for confirmation.
  4036. ---
  4037. ---@since 3.16.0
  4038. ---@field honorsChangeAnnotations? boolean
  4039. ---
  4040. ---Whether the client supports documentation for a class of
  4041. ---code actions.
  4042. ---
  4043. ---@since 3.18.0
  4044. ---@proposed
  4045. ---@field documentationSupport? boolean
  4046. ---The client capabilities of a {@link CodeLensRequest}.
  4047. ---@class lsp.CodeLensClientCapabilities
  4048. ---
  4049. ---Whether code lens supports dynamic registration.
  4050. ---@field dynamicRegistration? boolean
  4051. ---
  4052. ---Whether the client supports resolving additional code lens
  4053. ---properties via a separate `codeLens/resolve` request.
  4054. ---
  4055. ---@since 3.18.0
  4056. ---@field resolveSupport? lsp.ClientCodeLensResolveOptions
  4057. ---The client capabilities of a {@link DocumentLinkRequest}.
  4058. ---@class lsp.DocumentLinkClientCapabilities
  4059. ---
  4060. ---Whether document link supports dynamic registration.
  4061. ---@field dynamicRegistration? boolean
  4062. ---
  4063. ---Whether the client supports the `tooltip` property on `DocumentLink`.
  4064. ---
  4065. ---@since 3.15.0
  4066. ---@field tooltipSupport? boolean
  4067. ---@class lsp.DocumentColorClientCapabilities
  4068. ---
  4069. ---Whether implementation supports dynamic registration. If this is set to `true`
  4070. ---the client supports the new `DocumentColorRegistrationOptions` return value
  4071. ---for the corresponding server capability as well.
  4072. ---@field dynamicRegistration? boolean
  4073. ---Client capabilities of a {@link DocumentFormattingRequest}.
  4074. ---@class lsp.DocumentFormattingClientCapabilities
  4075. ---
  4076. ---Whether formatting supports dynamic registration.
  4077. ---@field dynamicRegistration? boolean
  4078. ---Client capabilities of a {@link DocumentRangeFormattingRequest}.
  4079. ---@class lsp.DocumentRangeFormattingClientCapabilities
  4080. ---
  4081. ---Whether range formatting supports dynamic registration.
  4082. ---@field dynamicRegistration? boolean
  4083. ---
  4084. ---Whether the client supports formatting multiple ranges at once.
  4085. ---
  4086. ---@since 3.18.0
  4087. ---@proposed
  4088. ---@field rangesSupport? boolean
  4089. ---Client capabilities of a {@link DocumentOnTypeFormattingRequest}.
  4090. ---@class lsp.DocumentOnTypeFormattingClientCapabilities
  4091. ---
  4092. ---Whether on type formatting supports dynamic registration.
  4093. ---@field dynamicRegistration? boolean
  4094. ---@class lsp.RenameClientCapabilities
  4095. ---
  4096. ---Whether rename supports dynamic registration.
  4097. ---@field dynamicRegistration? boolean
  4098. ---
  4099. ---Client supports testing for validity of rename operations
  4100. ---before execution.
  4101. ---
  4102. ---@since 3.12.0
  4103. ---@field prepareSupport? boolean
  4104. ---
  4105. ---Client supports the default behavior result.
  4106. ---
  4107. ---The value indicates the default behavior used by the
  4108. ---client.
  4109. ---
  4110. ---@since 3.16.0
  4111. ---@field prepareSupportDefaultBehavior? lsp.PrepareSupportDefaultBehavior
  4112. ---
  4113. ---Whether the client honors the change annotations in
  4114. ---text edits and resource operations returned via the
  4115. ---rename request's workspace edit by for example presenting
  4116. ---the workspace edit in the user interface and asking
  4117. ---for confirmation.
  4118. ---
  4119. ---@since 3.16.0
  4120. ---@field honorsChangeAnnotations? boolean
  4121. ---@class lsp.FoldingRangeClientCapabilities
  4122. ---
  4123. ---Whether implementation supports dynamic registration for folding range
  4124. ---providers. If this is set to `true` the client supports the new
  4125. ---`FoldingRangeRegistrationOptions` return value for the corresponding
  4126. ---server capability as well.
  4127. ---@field dynamicRegistration? boolean
  4128. ---
  4129. ---The maximum number of folding ranges that the client prefers to receive
  4130. ---per document. The value serves as a hint, servers are free to follow the
  4131. ---limit.
  4132. ---@field rangeLimit? uinteger
  4133. ---
  4134. ---If set, the client signals that it only supports folding complete lines.
  4135. ---If set, client will ignore specified `startCharacter` and `endCharacter`
  4136. ---properties in a FoldingRange.
  4137. ---@field lineFoldingOnly? boolean
  4138. ---
  4139. ---Specific options for the folding range kind.
  4140. ---
  4141. ---@since 3.17.0
  4142. ---@field foldingRangeKind? lsp.ClientFoldingRangeKindOptions
  4143. ---
  4144. ---Specific options for the folding range.
  4145. ---
  4146. ---@since 3.17.0
  4147. ---@field foldingRange? lsp.ClientFoldingRangeOptions
  4148. ---@class lsp.SelectionRangeClientCapabilities
  4149. ---
  4150. ---Whether implementation supports dynamic registration for selection range providers. If this is set to `true`
  4151. ---the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server
  4152. ---capability as well.
  4153. ---@field dynamicRegistration? boolean
  4154. ---The publish diagnostic client capabilities.
  4155. ---@class lsp.PublishDiagnosticsClientCapabilities: lsp.DiagnosticsCapabilities
  4156. ---
  4157. ---Whether the client interprets the version property of the
  4158. ---`textDocument/publishDiagnostics` notification's parameter.
  4159. ---
  4160. ---@since 3.15.0
  4161. ---@field versionSupport? boolean
  4162. ---@since 3.16.0
  4163. ---@class lsp.CallHierarchyClientCapabilities
  4164. ---
  4165. ---Whether implementation supports dynamic registration. If this is set to `true`
  4166. ---the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
  4167. ---return value for the corresponding server capability as well.
  4168. ---@field dynamicRegistration? boolean
  4169. ---@since 3.16.0
  4170. ---@class lsp.SemanticTokensClientCapabilities
  4171. ---
  4172. ---Whether implementation supports dynamic registration. If this is set to `true`
  4173. ---the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
  4174. ---return value for the corresponding server capability as well.
  4175. ---@field dynamicRegistration? boolean
  4176. ---
  4177. ---Which requests the client supports and might send to the server
  4178. ---depending on the server's capability. Please note that clients might not
  4179. ---show semantic tokens or degrade some of the user experience if a range
  4180. ---or full request is advertised by the client but not provided by the
  4181. ---server. If for example the client capability `requests.full` and
  4182. ---`request.range` are both set to true but the server only provides a
  4183. ---range provider the client might not render a minimap correctly or might
  4184. ---even decide to not show any semantic tokens at all.
  4185. ---@field requests lsp.ClientSemanticTokensRequestOptions
  4186. ---
  4187. ---The token types that the client supports.
  4188. ---@field tokenTypes string[]
  4189. ---
  4190. ---The token modifiers that the client supports.
  4191. ---@field tokenModifiers string[]
  4192. ---
  4193. ---The token formats the clients supports.
  4194. ---@field formats lsp.TokenFormat[]
  4195. ---
  4196. ---Whether the client supports tokens that can overlap each other.
  4197. ---@field overlappingTokenSupport? boolean
  4198. ---
  4199. ---Whether the client supports tokens that can span multiple lines.
  4200. ---@field multilineTokenSupport? boolean
  4201. ---
  4202. ---Whether the client allows the server to actively cancel a
  4203. ---semantic token request, e.g. supports returning
  4204. ---LSPErrorCodes.ServerCancelled. If a server does the client
  4205. ---needs to retrigger the request.
  4206. ---
  4207. ---@since 3.17.0
  4208. ---@field serverCancelSupport? boolean
  4209. ---
  4210. ---Whether the client uses semantic tokens to augment existing
  4211. ---syntax tokens. If set to `true` client side created syntax
  4212. ---tokens and semantic tokens are both used for colorization. If
  4213. ---set to `false` the client only uses the returned semantic tokens
  4214. ---for colorization.
  4215. ---
  4216. ---If the value is `undefined` then the client behavior is not
  4217. ---specified.
  4218. ---
  4219. ---@since 3.17.0
  4220. ---@field augmentsSyntaxTokens? boolean
  4221. ---Client capabilities for the linked editing range request.
  4222. ---
  4223. ---@since 3.16.0
  4224. ---@class lsp.LinkedEditingRangeClientCapabilities
  4225. ---
  4226. ---Whether implementation supports dynamic registration. If this is set to `true`
  4227. ---the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
  4228. ---return value for the corresponding server capability as well.
  4229. ---@field dynamicRegistration? boolean
  4230. ---Client capabilities specific to the moniker request.
  4231. ---
  4232. ---@since 3.16.0
  4233. ---@class lsp.MonikerClientCapabilities
  4234. ---
  4235. ---Whether moniker supports dynamic registration. If this is set to `true`
  4236. ---the client supports the new `MonikerRegistrationOptions` return value
  4237. ---for the corresponding server capability as well.
  4238. ---@field dynamicRegistration? boolean
  4239. ---@since 3.17.0
  4240. ---@class lsp.TypeHierarchyClientCapabilities
  4241. ---
  4242. ---Whether implementation supports dynamic registration. If this is set to `true`
  4243. ---the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
  4244. ---return value for the corresponding server capability as well.
  4245. ---@field dynamicRegistration? boolean
  4246. ---Client capabilities specific to inline values.
  4247. ---
  4248. ---@since 3.17.0
  4249. ---@class lsp.InlineValueClientCapabilities
  4250. ---
  4251. ---Whether implementation supports dynamic registration for inline value providers.
  4252. ---@field dynamicRegistration? boolean
  4253. ---Inlay hint client capabilities.
  4254. ---
  4255. ---@since 3.17.0
  4256. ---@class lsp.InlayHintClientCapabilities
  4257. ---
  4258. ---Whether inlay hints support dynamic registration.
  4259. ---@field dynamicRegistration? boolean
  4260. ---
  4261. ---Indicates which properties a client can resolve lazily on an inlay
  4262. ---hint.
  4263. ---@field resolveSupport? lsp.ClientInlayHintResolveOptions
  4264. ---Client capabilities specific to diagnostic pull requests.
  4265. ---
  4266. ---@since 3.17.0
  4267. ---@class lsp.DiagnosticClientCapabilities: lsp.DiagnosticsCapabilities
  4268. ---
  4269. ---Whether implementation supports dynamic registration. If this is set to `true`
  4270. ---the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
  4271. ---return value for the corresponding server capability as well.
  4272. ---@field dynamicRegistration? boolean
  4273. ---
  4274. ---Whether the clients supports related documents for document diagnostic pulls.
  4275. ---@field relatedDocumentSupport? boolean
  4276. ---Client capabilities specific to inline completions.
  4277. ---
  4278. ---@since 3.18.0
  4279. ---@proposed
  4280. ---@class lsp.InlineCompletionClientCapabilities
  4281. ---
  4282. ---Whether implementation supports dynamic registration for inline completion providers.
  4283. ---@field dynamicRegistration? boolean
  4284. ---Notebook specific client capabilities.
  4285. ---
  4286. ---@since 3.17.0
  4287. ---@class lsp.NotebookDocumentSyncClientCapabilities
  4288. ---
  4289. ---Whether implementation supports dynamic registration. If this is
  4290. ---set to `true` the client supports the new
  4291. ---`(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
  4292. ---return value for the corresponding server capability as well.
  4293. ---@field dynamicRegistration? boolean
  4294. ---
  4295. ---The client supports sending execution summary data per cell.
  4296. ---@field executionSummarySupport? boolean
  4297. ---Show message request client capabilities
  4298. ---@class lsp.ShowMessageRequestClientCapabilities
  4299. ---
  4300. ---Capabilities specific to the `MessageActionItem` type.
  4301. ---@field messageActionItem? lsp.ClientShowMessageActionItemOptions
  4302. ---Client capabilities for the showDocument request.
  4303. ---
  4304. ---@since 3.16.0
  4305. ---@class lsp.ShowDocumentClientCapabilities
  4306. ---
  4307. ---The client has support for the showDocument
  4308. ---request.
  4309. ---@field support boolean
  4310. ---@since 3.18.0
  4311. ---@class lsp.StaleRequestSupportOptions
  4312. ---
  4313. ---The client will actively cancel the request.
  4314. ---@field cancel boolean
  4315. ---
  4316. ---The list of requests for which the client
  4317. ---will retry the request if it receives a
  4318. ---response with error code `ContentModified`
  4319. ---@field retryOnContentModified string[]
  4320. ---Client capabilities specific to regular expressions.
  4321. ---
  4322. ---@since 3.16.0
  4323. ---@class lsp.RegularExpressionsClientCapabilities
  4324. ---
  4325. ---The engine's name.
  4326. ---@field engine lsp.RegularExpressionEngineKind
  4327. ---
  4328. ---The engine's version.
  4329. ---@field version? string
  4330. ---Client capabilities specific to the used markdown parser.
  4331. ---
  4332. ---@since 3.16.0
  4333. ---@class lsp.MarkdownClientCapabilities
  4334. ---
  4335. ---The name of the parser.
  4336. ---@field parser string
  4337. ---
  4338. ---The version of the parser.
  4339. ---@field version? string
  4340. ---
  4341. ---A list of HTML tags that the client allows / supports in
  4342. ---Markdown.
  4343. ---
  4344. ---@since 3.17.0
  4345. ---@field allowedTags? string[]
  4346. ---@since 3.18.0
  4347. ---@class lsp.ChangeAnnotationsSupportOptions
  4348. ---
  4349. ---Whether the client groups edits with equal labels into tree nodes,
  4350. ---for instance all edits labelled with "Changes in Strings" would
  4351. ---be a tree node.
  4352. ---@field groupsOnLabel? boolean
  4353. ---@since 3.18.0
  4354. ---@class lsp.ClientSymbolKindOptions
  4355. ---
  4356. ---The symbol kind values the client supports. When this
  4357. ---property exists the client also guarantees that it will
  4358. ---handle values outside its set gracefully and falls back
  4359. ---to a default value when unknown.
  4360. ---
  4361. ---If this property is not present the client only supports
  4362. ---the symbol kinds from `File` to `Array` as defined in
  4363. ---the initial version of the protocol.
  4364. ---@field valueSet? lsp.SymbolKind[]
  4365. ---@since 3.18.0
  4366. ---@class lsp.ClientSymbolTagOptions
  4367. ---
  4368. ---The tags supported by the client.
  4369. ---@field valueSet lsp.SymbolTag[]
  4370. ---@since 3.18.0
  4371. ---@class lsp.ClientSymbolResolveOptions
  4372. ---
  4373. ---The properties that a client can resolve lazily. Usually
  4374. ---`location.range`
  4375. ---@field properties string[]
  4376. ---@since 3.18.0
  4377. ---@class lsp.ClientCompletionItemOptions
  4378. ---
  4379. ---Client supports snippets as insert text.
  4380. ---
  4381. ---A snippet can define tab stops and placeholders with `$1`, `$2`
  4382. ---and `${3:foo}`. `$0` defines the final tab stop, it defaults to
  4383. ---the end of the snippet. Placeholders with equal identifiers are linked,
  4384. ---that is typing in one will update others too.
  4385. ---@field snippetSupport? boolean
  4386. ---
  4387. ---Client supports commit characters on a completion item.
  4388. ---@field commitCharactersSupport? boolean
  4389. ---
  4390. ---Client supports the following content formats for the documentation
  4391. ---property. The order describes the preferred format of the client.
  4392. ---@field documentationFormat? lsp.MarkupKind[]
  4393. ---
  4394. ---Client supports the deprecated property on a completion item.
  4395. ---@field deprecatedSupport? boolean
  4396. ---
  4397. ---Client supports the preselect property on a completion item.
  4398. ---@field preselectSupport? boolean
  4399. ---
  4400. ---Client supports the tag property on a completion item. Clients supporting
  4401. ---tags have to handle unknown tags gracefully. Clients especially need to
  4402. ---preserve unknown tags when sending a completion item back to the server in
  4403. ---a resolve call.
  4404. ---
  4405. ---@since 3.15.0
  4406. ---@field tagSupport? lsp.CompletionItemTagOptions
  4407. ---
  4408. ---Client support insert replace edit to control different behavior if a
  4409. ---completion item is inserted in the text or should replace text.
  4410. ---
  4411. ---@since 3.16.0
  4412. ---@field insertReplaceSupport? boolean
  4413. ---
  4414. ---Indicates which properties a client can resolve lazily on a completion
  4415. ---item. Before version 3.16.0 only the predefined properties `documentation`
  4416. ---and `details` could be resolved lazily.
  4417. ---
  4418. ---@since 3.16.0
  4419. ---@field resolveSupport? lsp.ClientCompletionItemResolveOptions
  4420. ---
  4421. ---The client supports the `insertTextMode` property on
  4422. ---a completion item to override the whitespace handling mode
  4423. ---as defined by the client (see `insertTextMode`).
  4424. ---
  4425. ---@since 3.16.0
  4426. ---@field insertTextModeSupport? lsp.ClientCompletionItemInsertTextModeOptions
  4427. ---
  4428. ---The client has support for completion item label
  4429. ---details (see also `CompletionItemLabelDetails`).
  4430. ---
  4431. ---@since 3.17.0
  4432. ---@field labelDetailsSupport? boolean
  4433. ---@since 3.18.0
  4434. ---@class lsp.ClientCompletionItemOptionsKind
  4435. ---
  4436. ---The completion item kind values the client supports. When this
  4437. ---property exists the client also guarantees that it will
  4438. ---handle values outside its set gracefully and falls back
  4439. ---to a default value when unknown.
  4440. ---
  4441. ---If this property is not present the client only supports
  4442. ---the completion items kinds from `Text` to `Reference` as defined in
  4443. ---the initial version of the protocol.
  4444. ---@field valueSet? lsp.CompletionItemKind[]
  4445. ---The client supports the following `CompletionList` specific
  4446. ---capabilities.
  4447. ---
  4448. ---@since 3.17.0
  4449. ---@class lsp.CompletionListCapabilities
  4450. ---
  4451. ---The client supports the following itemDefaults on
  4452. ---a completion list.
  4453. ---
  4454. ---The value lists the supported property names of the
  4455. ---`CompletionList.itemDefaults` object. If omitted
  4456. ---no properties are supported.
  4457. ---
  4458. ---@since 3.17.0
  4459. ---@field itemDefaults? string[]
  4460. ---@since 3.18.0
  4461. ---@class lsp.ClientSignatureInformationOptions
  4462. ---
  4463. ---Client supports the following content formats for the documentation
  4464. ---property. The order describes the preferred format of the client.
  4465. ---@field documentationFormat? lsp.MarkupKind[]
  4466. ---
  4467. ---Client capabilities specific to parameter information.
  4468. ---@field parameterInformation? lsp.ClientSignatureParameterInformationOptions
  4469. ---
  4470. ---The client supports the `activeParameter` property on `SignatureInformation`
  4471. ---literal.
  4472. ---
  4473. ---@since 3.16.0
  4474. ---@field activeParameterSupport? boolean
  4475. ---
  4476. ---The client supports the `activeParameter` property on
  4477. ---`SignatureHelp`/`SignatureInformation` being set to `null` to
  4478. ---indicate that no parameter should be active.
  4479. ---
  4480. ---@since 3.18.0
  4481. ---@proposed
  4482. ---@field noActiveParameterSupport? boolean
  4483. ---@since 3.18.0
  4484. ---@class lsp.ClientCodeActionLiteralOptions
  4485. ---
  4486. ---The code action kind is support with the following value
  4487. ---set.
  4488. ---@field codeActionKind lsp.ClientCodeActionKindOptions
  4489. ---@since 3.18.0
  4490. ---@class lsp.ClientCodeActionResolveOptions
  4491. ---
  4492. ---The properties that a client can resolve lazily.
  4493. ---@field properties string[]
  4494. ---@since 3.18.0
  4495. ---@class lsp.ClientCodeLensResolveOptions
  4496. ---
  4497. ---The properties that a client can resolve lazily.
  4498. ---@field properties string[]
  4499. ---@since 3.18.0
  4500. ---@class lsp.ClientFoldingRangeKindOptions
  4501. ---
  4502. ---The folding range kind values the client supports. When this
  4503. ---property exists the client also guarantees that it will
  4504. ---handle values outside its set gracefully and falls back
  4505. ---to a default value when unknown.
  4506. ---@field valueSet? lsp.FoldingRangeKind[]
  4507. ---@since 3.18.0
  4508. ---@class lsp.ClientFoldingRangeOptions
  4509. ---
  4510. ---If set, the client signals that it supports setting collapsedText on
  4511. ---folding ranges to display custom labels instead of the default text.
  4512. ---
  4513. ---@since 3.17.0
  4514. ---@field collapsedText? boolean
  4515. ---General diagnostics capabilities for pull and push model.
  4516. ---@class lsp.DiagnosticsCapabilities
  4517. ---
  4518. ---Whether the clients accepts diagnostics with related information.
  4519. ---@field relatedInformation? boolean
  4520. ---
  4521. ---Client supports the tag property to provide meta data about a diagnostic.
  4522. ---Clients supporting tags have to handle unknown tags gracefully.
  4523. ---
  4524. ---@since 3.15.0
  4525. ---@field tagSupport? lsp.ClientDiagnosticsTagOptions
  4526. ---
  4527. ---Client supports a codeDescription property
  4528. ---
  4529. ---@since 3.16.0
  4530. ---@field codeDescriptionSupport? boolean
  4531. ---
  4532. ---Whether code action supports the `data` property which is
  4533. ---preserved between a `textDocument/publishDiagnostics` and
  4534. ---`textDocument/codeAction` request.
  4535. ---
  4536. ---@since 3.16.0
  4537. ---@field dataSupport? boolean
  4538. ---@since 3.18.0
  4539. ---@class lsp.ClientSemanticTokensRequestOptions
  4540. ---
  4541. ---The client will send the `textDocument/semanticTokens/range` request if
  4542. ---the server provides a corresponding handler.
  4543. ---@field range? boolean|lsp._anonym2.range
  4544. ---
  4545. ---The client will send the `textDocument/semanticTokens/full` request if
  4546. ---the server provides a corresponding handler.
  4547. ---@field full? boolean|lsp.ClientSemanticTokensRequestFullDelta
  4548. ---@since 3.18.0
  4549. ---@class lsp.ClientInlayHintResolveOptions
  4550. ---
  4551. ---The properties that a client can resolve lazily.
  4552. ---@field properties string[]
  4553. ---@since 3.18.0
  4554. ---@class lsp.ClientShowMessageActionItemOptions
  4555. ---
  4556. ---Whether the client supports additional attributes which
  4557. ---are preserved and send back to the server in the
  4558. ---request's response.
  4559. ---@field additionalPropertiesSupport? boolean
  4560. ---@since 3.18.0
  4561. ---@class lsp.CompletionItemTagOptions
  4562. ---
  4563. ---The tags supported by the client.
  4564. ---@field valueSet lsp.CompletionItemTag[]
  4565. ---@since 3.18.0
  4566. ---@class lsp.ClientCompletionItemResolveOptions
  4567. ---
  4568. ---The properties that a client can resolve lazily.
  4569. ---@field properties string[]
  4570. ---@since 3.18.0
  4571. ---@class lsp.ClientCompletionItemInsertTextModeOptions
  4572. ---
  4573. ---@field valueSet lsp.InsertTextMode[]
  4574. ---@since 3.18.0
  4575. ---@class lsp.ClientSignatureParameterInformationOptions
  4576. ---
  4577. ---The client supports processing label offsets instead of a
  4578. ---simple label string.
  4579. ---
  4580. ---@since 3.14.0
  4581. ---@field labelOffsetSupport? boolean
  4582. ---@since 3.18.0
  4583. ---@class lsp.ClientCodeActionKindOptions
  4584. ---
  4585. ---The code action kind values the client supports. When this
  4586. ---property exists the client also guarantees that it will
  4587. ---handle values outside its set gracefully and falls back
  4588. ---to a default value when unknown.
  4589. ---@field valueSet lsp.CodeActionKind[]
  4590. ---@since 3.18.0
  4591. ---@class lsp.ClientDiagnosticsTagOptions
  4592. ---
  4593. ---The tags supported by the client.
  4594. ---@field valueSet lsp.DiagnosticTag[]
  4595. ---@since 3.18.0
  4596. ---@class lsp.ClientSemanticTokensRequestFullDelta
  4597. ---
  4598. ---The client will send the `textDocument/semanticTokens/full/delta` request if
  4599. ---the server provides a corresponding handler.
  4600. ---@field delta? boolean
  4601. ---A set of predefined token types. This set is not fixed
  4602. ---an clients can specify additional token types via the
  4603. ---corresponding client capabilities.
  4604. ---
  4605. ---@since 3.16.0
  4606. ---@alias lsp.SemanticTokenTypes
  4607. ---| "namespace" # namespace
  4608. ---| "type" # type
  4609. ---| "class" # class
  4610. ---| "enum" # enum
  4611. ---| "interface" # interface
  4612. ---| "struct" # struct
  4613. ---| "typeParameter" # typeParameter
  4614. ---| "parameter" # parameter
  4615. ---| "variable" # variable
  4616. ---| "property" # property
  4617. ---| "enumMember" # enumMember
  4618. ---| "event" # event
  4619. ---| "function" # function
  4620. ---| "method" # method
  4621. ---| "macro" # macro
  4622. ---| "keyword" # keyword
  4623. ---| "modifier" # modifier
  4624. ---| "comment" # comment
  4625. ---| "string" # string
  4626. ---| "number" # number
  4627. ---| "regexp" # regexp
  4628. ---| "operator" # operator
  4629. ---| "decorator" # decorator
  4630. ---| "label" # label
  4631. ---A set of predefined token modifiers. This set is not fixed
  4632. ---an clients can specify additional token types via the
  4633. ---corresponding client capabilities.
  4634. ---
  4635. ---@since 3.16.0
  4636. ---@alias lsp.SemanticTokenModifiers
  4637. ---| "declaration" # declaration
  4638. ---| "definition" # definition
  4639. ---| "readonly" # readonly
  4640. ---| "static" # static
  4641. ---| "deprecated" # deprecated
  4642. ---| "abstract" # abstract
  4643. ---| "async" # async
  4644. ---| "modification" # modification
  4645. ---| "documentation" # documentation
  4646. ---| "defaultLibrary" # defaultLibrary
  4647. ---The document diagnostic report kinds.
  4648. ---
  4649. ---@since 3.17.0
  4650. ---@alias lsp.DocumentDiagnosticReportKind
  4651. ---| "full" # Full
  4652. ---| "unchanged" # Unchanged
  4653. ---Predefined error codes.
  4654. ---@alias lsp.ErrorCodes
  4655. ---| -32700 # ParseError
  4656. ---| -32600 # InvalidRequest
  4657. ---| -32601 # MethodNotFound
  4658. ---| -32602 # InvalidParams
  4659. ---| -32603 # InternalError
  4660. ---| -32002 # ServerNotInitialized
  4661. ---| -32001 # UnknownErrorCode
  4662. ---@alias lsp.LSPErrorCodes
  4663. ---| -32803 # RequestFailed
  4664. ---| -32802 # ServerCancelled
  4665. ---| -32801 # ContentModified
  4666. ---| -32800 # RequestCancelled
  4667. ---A set of predefined range kinds.
  4668. ---@alias lsp.FoldingRangeKind
  4669. ---| "comment" # Comment
  4670. ---| "imports" # Imports
  4671. ---| "region" # Region
  4672. ---A symbol kind.
  4673. ---@alias lsp.SymbolKind
  4674. ---| 1 # File
  4675. ---| 2 # Module
  4676. ---| 3 # Namespace
  4677. ---| 4 # Package
  4678. ---| 5 # Class
  4679. ---| 6 # Method
  4680. ---| 7 # Property
  4681. ---| 8 # Field
  4682. ---| 9 # Constructor
  4683. ---| 10 # Enum
  4684. ---| 11 # Interface
  4685. ---| 12 # Function
  4686. ---| 13 # Variable
  4687. ---| 14 # Constant
  4688. ---| 15 # String
  4689. ---| 16 # Number
  4690. ---| 17 # Boolean
  4691. ---| 18 # Array
  4692. ---| 19 # Object
  4693. ---| 20 # Key
  4694. ---| 21 # Null
  4695. ---| 22 # EnumMember
  4696. ---| 23 # Struct
  4697. ---| 24 # Event
  4698. ---| 25 # Operator
  4699. ---| 26 # TypeParameter
  4700. ---Symbol tags are extra annotations that tweak the rendering of a symbol.
  4701. ---
  4702. ---@since 3.16
  4703. ---@alias lsp.SymbolTag
  4704. ---| 1 # Deprecated
  4705. ---Moniker uniqueness level to define scope of the moniker.
  4706. ---
  4707. ---@since 3.16.0
  4708. ---@alias lsp.UniquenessLevel
  4709. ---| "document" # document
  4710. ---| "project" # project
  4711. ---| "group" # group
  4712. ---| "scheme" # scheme
  4713. ---| "global" # global
  4714. ---The moniker kind.
  4715. ---
  4716. ---@since 3.16.0
  4717. ---@alias lsp.MonikerKind
  4718. ---| "import" # import
  4719. ---| "export" # export
  4720. ---| "local" # local
  4721. ---Inlay hint kinds.
  4722. ---
  4723. ---@since 3.17.0
  4724. ---@alias lsp.InlayHintKind
  4725. ---| 1 # Type
  4726. ---| 2 # Parameter
  4727. ---The message type
  4728. ---@alias lsp.MessageType
  4729. ---| 1 # Error
  4730. ---| 2 # Warning
  4731. ---| 3 # Info
  4732. ---| 4 # Log
  4733. ---| 5 # Debug
  4734. ---Defines how the host (editor) should sync
  4735. ---document changes to the language server.
  4736. ---@alias lsp.TextDocumentSyncKind
  4737. ---| 0 # None
  4738. ---| 1 # Full
  4739. ---| 2 # Incremental
  4740. ---Represents reasons why a text document is saved.
  4741. ---@alias lsp.TextDocumentSaveReason
  4742. ---| 1 # Manual
  4743. ---| 2 # AfterDelay
  4744. ---| 3 # FocusOut
  4745. ---The kind of a completion entry.
  4746. ---@alias lsp.CompletionItemKind
  4747. ---| 1 # Text
  4748. ---| 2 # Method
  4749. ---| 3 # Function
  4750. ---| 4 # Constructor
  4751. ---| 5 # Field
  4752. ---| 6 # Variable
  4753. ---| 7 # Class
  4754. ---| 8 # Interface
  4755. ---| 9 # Module
  4756. ---| 10 # Property
  4757. ---| 11 # Unit
  4758. ---| 12 # Value
  4759. ---| 13 # Enum
  4760. ---| 14 # Keyword
  4761. ---| 15 # Snippet
  4762. ---| 16 # Color
  4763. ---| 17 # File
  4764. ---| 18 # Reference
  4765. ---| 19 # Folder
  4766. ---| 20 # EnumMember
  4767. ---| 21 # Constant
  4768. ---| 22 # Struct
  4769. ---| 23 # Event
  4770. ---| 24 # Operator
  4771. ---| 25 # TypeParameter
  4772. ---Completion item tags are extra annotations that tweak the rendering of a completion
  4773. ---item.
  4774. ---
  4775. ---@since 3.15.0
  4776. ---@alias lsp.CompletionItemTag
  4777. ---| 1 # Deprecated
  4778. ---Defines whether the insert text in a completion item should be interpreted as
  4779. ---plain text or a snippet.
  4780. ---@alias lsp.InsertTextFormat
  4781. ---| 1 # PlainText
  4782. ---| 2 # Snippet
  4783. ---How whitespace and indentation is handled during completion
  4784. ---item insertion.
  4785. ---
  4786. ---@since 3.16.0
  4787. ---@alias lsp.InsertTextMode
  4788. ---| 1 # asIs
  4789. ---| 2 # adjustIndentation
  4790. ---A document highlight kind.
  4791. ---@alias lsp.DocumentHighlightKind
  4792. ---| 1 # Text
  4793. ---| 2 # Read
  4794. ---| 3 # Write
  4795. ---A set of predefined code action kinds
  4796. ---@alias lsp.CodeActionKind
  4797. ---| "" # Empty
  4798. ---| "quickfix" # QuickFix
  4799. ---| "refactor" # Refactor
  4800. ---| "refactor.extract" # RefactorExtract
  4801. ---| "refactor.inline" # RefactorInline
  4802. ---| "refactor.move" # RefactorMove
  4803. ---| "refactor.rewrite" # RefactorRewrite
  4804. ---| "source" # Source
  4805. ---| "source.organizeImports" # SourceOrganizeImports
  4806. ---| "source.fixAll" # SourceFixAll
  4807. ---| "notebook" # Notebook
  4808. ---@alias lsp.TraceValue
  4809. ---| "off" # Off
  4810. ---| "messages" # Messages
  4811. ---| "verbose" # Verbose
  4812. ---Describes the content type that a client supports in various
  4813. ---result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
  4814. ---
  4815. ---Please note that `MarkupKinds` must not start with a `$`. This kinds
  4816. ---are reserved for internal usage.
  4817. ---@alias lsp.MarkupKind
  4818. ---| "plaintext" # PlainText
  4819. ---| "markdown" # Markdown
  4820. ---Predefined Language kinds
  4821. ---@since 3.18.0
  4822. ---@proposed
  4823. ---@alias lsp.LanguageKind
  4824. ---| "abap" # ABAP
  4825. ---| "bat" # WindowsBat
  4826. ---| "bibtex" # BibTeX
  4827. ---| "clojure" # Clojure
  4828. ---| "coffeescript" # Coffeescript
  4829. ---| "c" # C
  4830. ---| "cpp" # CPP
  4831. ---| "csharp" # CSharp
  4832. ---| "css" # CSS
  4833. ---| "d" # D
  4834. ---| "pascal" # Delphi
  4835. ---| "diff" # Diff
  4836. ---| "dart" # Dart
  4837. ---| "dockerfile" # Dockerfile
  4838. ---| "elixir" # Elixir
  4839. ---| "erlang" # Erlang
  4840. ---| "fsharp" # FSharp
  4841. ---| "git-commit" # GitCommit
  4842. ---| "rebase" # GitRebase
  4843. ---| "go" # Go
  4844. ---| "groovy" # Groovy
  4845. ---| "handlebars" # Handlebars
  4846. ---| "haskell" # Haskell
  4847. ---| "html" # HTML
  4848. ---| "ini" # Ini
  4849. ---| "java" # Java
  4850. ---| "javascript" # JavaScript
  4851. ---| "javascriptreact" # JavaScriptReact
  4852. ---| "json" # JSON
  4853. ---| "latex" # LaTeX
  4854. ---| "less" # Less
  4855. ---| "lua" # Lua
  4856. ---| "makefile" # Makefile
  4857. ---| "markdown" # Markdown
  4858. ---| "objective-c" # ObjectiveC
  4859. ---| "objective-cpp" # ObjectiveCPP
  4860. ---| "pascal" # Pascal
  4861. ---| "perl" # Perl
  4862. ---| "perl6" # Perl6
  4863. ---| "php" # PHP
  4864. ---| "powershell" # Powershell
  4865. ---| "jade" # Pug
  4866. ---| "python" # Python
  4867. ---| "r" # R
  4868. ---| "razor" # Razor
  4869. ---| "ruby" # Ruby
  4870. ---| "rust" # Rust
  4871. ---| "scss" # SCSS
  4872. ---| "sass" # SASS
  4873. ---| "scala" # Scala
  4874. ---| "shaderlab" # ShaderLab
  4875. ---| "shellscript" # ShellScript
  4876. ---| "sql" # SQL
  4877. ---| "swift" # Swift
  4878. ---| "typescript" # TypeScript
  4879. ---| "typescriptreact" # TypeScriptReact
  4880. ---| "tex" # TeX
  4881. ---| "vb" # VisualBasic
  4882. ---| "xml" # XML
  4883. ---| "xsl" # XSL
  4884. ---| "yaml" # YAML
  4885. ---Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered.
  4886. ---
  4887. ---@since 3.18.0
  4888. ---@proposed
  4889. ---@alias lsp.InlineCompletionTriggerKind
  4890. ---| 1 # Invoked
  4891. ---| 2 # Automatic
  4892. ---A set of predefined position encoding kinds.
  4893. ---
  4894. ---@since 3.17.0
  4895. ---@alias lsp.PositionEncodingKind
  4896. ---| "utf-8" # UTF8
  4897. ---| "utf-16" # UTF16
  4898. ---| "utf-32" # UTF32
  4899. ---The file event type
  4900. ---@alias lsp.FileChangeType
  4901. ---| 1 # Created
  4902. ---| 2 # Changed
  4903. ---| 3 # Deleted
  4904. ---@alias lsp.WatchKind
  4905. ---| 1 # Create
  4906. ---| 2 # Change
  4907. ---| 4 # Delete
  4908. ---The diagnostic's severity.
  4909. ---@alias lsp.DiagnosticSeverity
  4910. ---| 1 # Error
  4911. ---| 2 # Warning
  4912. ---| 3 # Information
  4913. ---| 4 # Hint
  4914. ---The diagnostic tags.
  4915. ---
  4916. ---@since 3.15.0
  4917. ---@alias lsp.DiagnosticTag
  4918. ---| 1 # Unnecessary
  4919. ---| 2 # Deprecated
  4920. ---How a completion was triggered
  4921. ---@alias lsp.CompletionTriggerKind
  4922. ---| 1 # Invoked
  4923. ---| 2 # TriggerCharacter
  4924. ---| 3 # TriggerForIncompleteCompletions
  4925. ---How a signature help was triggered.
  4926. ---
  4927. ---@since 3.15.0
  4928. ---@alias lsp.SignatureHelpTriggerKind
  4929. ---| 1 # Invoked
  4930. ---| 2 # TriggerCharacter
  4931. ---| 3 # ContentChange
  4932. ---The reason why code actions were requested.
  4933. ---
  4934. ---@since 3.17.0
  4935. ---@alias lsp.CodeActionTriggerKind
  4936. ---| 1 # Invoked
  4937. ---| 2 # Automatic
  4938. ---A pattern kind describing if a glob pattern matches a file a folder or
  4939. ---both.
  4940. ---
  4941. ---@since 3.16.0
  4942. ---@alias lsp.FileOperationPatternKind
  4943. ---| "file" # file
  4944. ---| "folder" # folder
  4945. ---A notebook cell kind.
  4946. ---
  4947. ---@since 3.17.0
  4948. ---@alias lsp.NotebookCellKind
  4949. ---| 1 # Markup
  4950. ---| 2 # Code
  4951. ---@alias lsp.ResourceOperationKind
  4952. ---| "create" # Create
  4953. ---| "rename" # Rename
  4954. ---| "delete" # Delete
  4955. ---@alias lsp.FailureHandlingKind
  4956. ---| "abort" # Abort
  4957. ---| "transactional" # Transactional
  4958. ---| "textOnlyTransactional" # TextOnlyTransactional
  4959. ---| "undo" # Undo
  4960. ---@alias lsp.PrepareSupportDefaultBehavior
  4961. ---| 1 # Identifier
  4962. ---@alias lsp.TokenFormat
  4963. ---| "relative" # Relative
  4964. ---The definition of a symbol represented as one or many {@link Location locations}.
  4965. ---For most programming languages there is only one location at which a symbol is
  4966. ---defined.
  4967. ---
  4968. ---Servers should prefer returning `DefinitionLink` over `Definition` if supported
  4969. ---by the client.
  4970. ---@alias lsp.Definition lsp.Location|lsp.Location[]
  4971. ---Information about where a symbol is defined.
  4972. ---
  4973. ---Provides additional metadata over normal {@link Location location} definitions, including the range of
  4974. ---the defining symbol
  4975. ---@alias lsp.DefinitionLink lsp.LocationLink
  4976. ---LSP arrays.
  4977. ---@since 3.17.0
  4978. ---@alias lsp.LSPArray lsp.LSPAny[]
  4979. ---The LSP any type.
  4980. ---Please note that strictly speaking a property with the value `undefined`
  4981. ---can't be converted into JSON preserving the property name. However for
  4982. ---convenience it is allowed and assumed that all these properties are
  4983. ---optional as well.
  4984. ---@since 3.17.0
  4985. ---@alias lsp.LSPAny lsp.LSPObject|lsp.LSPArray|string|integer|uinteger|decimal|boolean|lsp.null
  4986. ---The declaration of a symbol representation as one or many {@link Location locations}.
  4987. ---@alias lsp.Declaration lsp.Location|lsp.Location[]
  4988. ---Information about where a symbol is declared.
  4989. ---
  4990. ---Provides additional metadata over normal {@link Location location} declarations, including the range of
  4991. ---the declaring symbol.
  4992. ---
  4993. ---Servers should prefer returning `DeclarationLink` over `Declaration` if supported
  4994. ---by the client.
  4995. ---@alias lsp.DeclarationLink lsp.LocationLink
  4996. ---Inline value information can be provided by different means:
  4997. ---- directly as a text value (class InlineValueText).
  4998. ---- as a name to use for a variable lookup (class InlineValueVariableLookup)
  4999. ---- as an evaluatable expression (class InlineValueEvaluatableExpression)
  5000. ---The InlineValue types combines all inline value types into one type.
  5001. ---
  5002. ---@since 3.17.0
  5003. ---@alias lsp.InlineValue lsp.InlineValueText|lsp.InlineValueVariableLookup|lsp.InlineValueEvaluatableExpression
  5004. ---The result of a document diagnostic pull request. A report can
  5005. ---either be a full report containing all diagnostics for the
  5006. ---requested document or an unchanged report indicating that nothing
  5007. ---has changed in terms of diagnostics in comparison to the last
  5008. ---pull request.
  5009. ---
  5010. ---@since 3.17.0
  5011. ---@alias lsp.DocumentDiagnosticReport lsp.RelatedFullDocumentDiagnosticReport|lsp.RelatedUnchangedDocumentDiagnosticReport
  5012. ---@alias lsp.PrepareRenameResult lsp.Range|lsp.PrepareRenamePlaceholder|lsp.PrepareRenameDefaultBehavior
  5013. ---A document selector is the combination of one or many document filters.
  5014. ---
  5015. ---\@sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`;
  5016. ---
  5017. ---The use of a string as a document filter is deprecated @since 3.16.0.
  5018. ---@alias lsp.DocumentSelector lsp.DocumentFilter[]
  5019. ---@alias lsp.ProgressToken integer|string
  5020. ---An identifier to refer to a change annotation stored with a workspace edit.
  5021. ---@alias lsp.ChangeAnnotationIdentifier string
  5022. ---A workspace diagnostic document report.
  5023. ---
  5024. ---@since 3.17.0
  5025. ---@alias lsp.WorkspaceDocumentDiagnosticReport lsp.WorkspaceFullDocumentDiagnosticReport|lsp.WorkspaceUnchangedDocumentDiagnosticReport
  5026. ---An event describing a change to a text document. If only a text is provided
  5027. ---it is considered to be the full content of the document.
  5028. ---@alias lsp.TextDocumentContentChangeEvent lsp.TextDocumentContentChangePartial|lsp.TextDocumentContentChangeWholeDocument
  5029. ---MarkedString can be used to render human readable text. It is either a markdown string
  5030. ---or a code-block that provides a language and a code snippet. The language identifier
  5031. ---is semantically equal to the optional language identifier in fenced code blocks in GitHub
  5032. ---issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting
  5033. ---
  5034. ---The pair of a language and a value is an equivalent to markdown:
  5035. ---```${language}
  5036. ---${value}
  5037. ---```
  5038. ---
  5039. ---Note that markdown strings will be sanitized - that means html will be escaped.
  5040. ---@deprecated use MarkupContent instead.
  5041. ---@alias lsp.MarkedString string|lsp.MarkedStringWithLanguage
  5042. ---A document filter describes a top level text document or
  5043. ---a notebook cell document.
  5044. ---
  5045. ---@since 3.17.0 - proposed support for NotebookCellTextDocumentFilter.
  5046. ---@alias lsp.DocumentFilter lsp.TextDocumentFilter|lsp.NotebookCellTextDocumentFilter
  5047. ---LSP object definition.
  5048. ---@since 3.17.0
  5049. ---@alias lsp.LSPObject table<string, lsp.LSPAny>
  5050. ---The glob pattern. Either a string pattern or a relative pattern.
  5051. ---
  5052. ---@since 3.17.0
  5053. ---@alias lsp.GlobPattern lsp.Pattern|lsp.RelativePattern
  5054. ---A document filter denotes a document by different properties like
  5055. ---the {@link TextDocument.languageId language}, the {@link Uri.scheme scheme} of
  5056. ---its resource, or a glob-pattern that is applied to the {@link TextDocument.fileName path}.
  5057. ---
  5058. ---Glob patterns can have the following syntax:
  5059. ---- `*` to match one or more characters in a path segment
  5060. ---- `?` to match on one character in a path segment
  5061. ---- `**` to match any number of path segments, including none
  5062. ---- `{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
  5063. ---- `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
  5064. ---- `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
  5065. ---
  5066. ---\@sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`
  5067. ---\@sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`
  5068. ---
  5069. ---@since 3.17.0
  5070. ---@alias lsp.TextDocumentFilter lsp.TextDocumentFilterLanguage|lsp.TextDocumentFilterScheme|lsp.TextDocumentFilterPattern
  5071. ---A notebook document filter denotes a notebook document by
  5072. ---different properties. The properties will be match
  5073. ---against the notebook's URI (same as with documents)
  5074. ---
  5075. ---@since 3.17.0
  5076. ---@alias lsp.NotebookDocumentFilter lsp.NotebookDocumentFilterNotebookType|lsp.NotebookDocumentFilterScheme|lsp.NotebookDocumentFilterPattern
  5077. ---The glob pattern to watch relative to the base path. Glob patterns can have the following syntax:
  5078. ---- `*` to match one or more characters in a path segment
  5079. ---- `?` to match on one character in a path segment
  5080. ---- `**` to match any number of path segments, including none
  5081. ---- `{}` to group conditions (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
  5082. ---- `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
  5083. ---- `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
  5084. ---
  5085. ---@since 3.17.0
  5086. ---@alias lsp.Pattern string
  5087. ---@alias lsp.RegularExpressionEngineKind string
  5088. ---@class lsp._anonym1.range
  5089. ---@class lsp._anonym2.range