youcompleteme.txt 179 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273
  1. *youcompleteme* YouCompleteMe: a code-completion engine for Vim
  2. ===============================================================================
  3. Contents ~
  4. 1. Introduction |youcompleteme-introduction|
  5. 1. Help, Advice, Support |youcompleteme-help-advice-support|
  6. 2. Vundle |youcompleteme-vundle|
  7. 1. Contents |youcompleteme-contents|
  8. 2. Intro |youcompleteme-intro|
  9. 3. Installation |youcompleteme-installation|
  10. 1. Requirements |youcompleteme-requirements|
  11. 1. Supported Vim Versions |youcompleteme-supported-vim-versions|
  12. 2. Supported Python runtime |youcompleteme-supported-python-runtime|
  13. 3. Supported Compilers |youcompleteme-supported-compilers|
  14. 4. Individual completer requirements |youcompleteme-individual-completer-requirements|
  15. 2. macOS |youcompleteme-macos|
  16. 1. Quick start, installing all completers |youcompleteme-quick-start-installing-all-completers|
  17. 2. Explanation for the quick start |youcompleteme-explanation-for-quick-start|
  18. 3. Linux 64-bit |youcompleteme-linux-64-bit|
  19. 1. Quick start, installing all completers
  20. 2. Explanation for the quick start
  21. 4. Windows |youcompleteme-windows|
  22. 1. Quick start, installing all completers
  23. 2. Explanation for the quick start
  24. 5. Full Installation Guide |youcompleteme-full-installation-guide|
  25. 4. Quick Feature Summary |youcompleteme-quick-feature-summary|
  26. 1. General (all languages) |youcompleteme-general|
  27. 2. C-family languages (C, C++, Objective C, Objective C++, CUDA) |youcompleteme-c-family-languages|
  28. 3. C♯ |youcompleteme-c|
  29. 4. Python |youcompleteme-python|
  30. 5. Go |youcompleteme-go|
  31. 6. JavaScript and TypeScript |youcompleteme-javascript-typescript|
  32. 7. Rust |youcompleteme-rust|
  33. 8. Java |youcompleteme-java|
  34. 5. User Guide |youcompleteme-user-guide|
  35. 1. General Usage |youcompleteme-general-usage|
  36. 2. Client-Server Architecture |youcompleteme-client-server-architecture|
  37. 3. Completion String Ranking |youcompleteme-completion-string-ranking|
  38. 4. Signature Help |youcompleteme-signature-help|
  39. 1. Dismiss signature help |youcompleteme-dismiss-signature-help|
  40. 5. Semantic highlighting |youcompleteme-semantic-highlighting|
  41. 1. Customising the highlight groups |youcompleteme-customising-highlight-groups|
  42. 6. Inlay hints |youcompleteme-inlay-hints|
  43. 1. Highlight groups |youcompleteme-highlight-groups|
  44. 2. Options |youcompleteme-options|
  45. 3. Toggling |youcompleteme-toggling|
  46. 4. General Semantic Completion |youcompleteme-general-semantic-completion|
  47. 5. C-family Semantic Completion |youcompleteme-c-family-semantic-completion|
  48. 1. Installation
  49. 2. Compile flags |youcompleteme-compile-flags|
  50. 3. Option 1: Use a compilation database [53] |youcompleteme-option-1-use-compilation-database-53|
  51. 4. Option 2: Provide the flags manually |youcompleteme-option-2-provide-flags-manually|
  52. 5. Errors during compilation |youcompleteme-errors-during-compilation|
  53. 6. Java Semantic Completion |youcompleteme-java-semantic-completion|
  54. 1. Java Quick Start |youcompleteme-java-quick-start|
  55. 2. Java Project Files |youcompleteme-java-project-files|
  56. 3. Diagnostic display - Syntastic |youcompleteme-diagnostic-display-syntastic|
  57. 4. Diagnostic display - Eclim |youcompleteme-diagnostic-display-eclim|
  58. 5. Eclipse Projects |youcompleteme-eclipse-projects|
  59. 6. Maven Projects |youcompleteme-maven-projects|
  60. 7. Gradle Projects |youcompleteme-gradle-projects|
  61. 8. Troubleshooting |youcompleteme-troubleshooting|
  62. 7. C# Semantic Completion |youcompleteme-c-semantic-completion|
  63. 1. Automatically discovered solution files |youcompleteme-automatically-discovered-solution-files|
  64. 2. Manually specified solution files |youcompleteme-manually-specified-solution-files|
  65. 3. Use with .NET 6.0 and .NET SDKs |youcompleteme-use-with-.net-6.0-.net-sdks|
  66. 8. Python Semantic Completion |youcompleteme-python-semantic-completion|
  67. 1. Working with virtual environments |youcompleteme-working-with-virtual-environments|
  68. 2. Working with third-party packages |youcompleteme-working-with-third-party-packages|
  69. 3. Configuring through Vim options |youcompleteme-configuring-through-vim-options|
  70. 9. Rust Semantic Completion |youcompleteme-rust-semantic-completion|
  71. 10. Go Semantic Completion |youcompleteme-go-semantic-completion|
  72. 11. JavaScript and TypeScript Semantic Completion |youcompleteme-javascript-typescript-semantic-completion|
  73. 12. Semantic Completion for Other Languages |youcompleteme-semantic-completion-for-other-languages|
  74. 1. Plugging an arbitrary LSP server |youcompleteme-plugging-an-arbitrary-lsp-server|
  75. 2. LSP Configuration |youcompleteme-lsp-configuration|
  76. 3. Using 'omnifunc' for semantic completion |youcompleteme-using-omnifunc-for-semantic-completion|
  77. 13. Writing New Semantic Completers |youcompleteme-writing-new-semantic-completers|
  78. 14. Diagnostic Display |youcompleteme-diagnostic-display|
  79. 1. Diagnostic Highlighting Groups |youcompleteme-diagnostic-highlighting-groups|
  80. 15. Symbol Search |youcompleteme-symbol-search|
  81. 1. Closing the popup |youcompleteme-closing-popup|
  82. 16. Type/Call Hierarchy |youcompleteme-type-call-hierarchy|
  83. 7. Commands |youcompleteme-commands|
  84. 1. The |:YcmRestartServer| command
  85. 2. The |:YcmForceCompileAndDiagnostics| command
  86. 3. The |:YcmDiags| command
  87. 4. The |:YcmShowDetailedDiagnostic| command
  88. 5. The |:YcmDebugInfo| command
  89. 6. The |:YcmToggleLogs| command
  90. 7. The |:YcmCompleter| command
  91. 8. YcmCompleter Subcommands |youcompleteme-ycmcompleter-subcommands|
  92. 1. GoTo Commands |youcompleteme-goto-commands|
  93. 1. The |GoToInclude| subcommand
  94. 2. The |GoToAlternateFile| subcommand
  95. 3. The |GoToDeclaration| subcommand
  96. 4. The |GoToDefinition| subcommand
  97. 5. The |GoTo| subcommand
  98. 6. The |GoToImprecise| subcommand
  99. 7. The 'GoToSymbol <symbol query>' subcommand |GoToSymbol-symbol-query|
  100. 8. The |GoToReferences| subcommand
  101. 9. The |GoToImplementation| subcommand
  102. 10. The |GoToImplementationElseDeclaration| subcommand
  103. 11. The |GoToType| subcommand
  104. 12. The |GoToDocumentOutline| subcommand
  105. 13. The |GoToCallers| and 'GoToCallees' subcommands
  106. 2. Semantic Information Commands |youcompleteme-semantic-information-commands|
  107. 1. The |GetType| subcommand
  108. 2. The |GetTypeImprecise| subcommand
  109. 3. The |GetParent| subcommand
  110. 4. The |GetDoc| subcommand
  111. 5. The |GetDocImprecise| subcommand
  112. 3. Refactoring Commands |youcompleteme-refactoring-commands|
  113. 1. The |FixIt| subcommand
  114. 2. The 'RefactorRename <new name>' subcommand |RefactorRename-new-name|
  115. 3. Python refactorings |youcompleteme-python-refactorings|
  116. 4. Multi-file Refactor |youcompleteme-multi-file-refactor|
  117. 5. The |Format| subcommand
  118. 6. The |OrganizeImports| subcommand
  119. 4. Miscellaneous Commands |youcompleteme-miscellaneous-commands|
  120. 1. The 'ExecuteCommand <args>' subcommand |ExecuteCommand-args|
  121. 2. The |RestartServer| subcommand
  122. 3. The |ReloadSolution| subcommand
  123. 9. Functions |youcompleteme-functions|
  124. 1. The |youcompleteme#GetErrorCount| function
  125. 2. The |youcompleteme#GetWarningCount| function
  126. 3. The 'youcompleteme#GetCommandResponse( ... )' function |youcompleteme#GetCommandResponse()|
  127. 4. The 'youcompleteme#GetCommandResponseAsync( callback, ... )' function |youcompleteme#GetCommandResponseAsync()|
  128. 10. Autocommands |youcompleteme-autocommands|
  129. 1. The |YcmLocationOpened| autocommand
  130. 2. The |YcmQuickFixOpened| autocommand
  131. 11. Options
  132. 1. The |g:ycm_min_num_of_chars_for_completion| option
  133. 2. The |g:ycm_min_num_identifier_candidate_chars| option
  134. 3. The |g:ycm_max_num_candidates| option
  135. 4. The |g:ycm_max_num_candidates_to_detail| option
  136. 5. The |g:ycm_max_num_identifier_candidates| option
  137. 6. The |g:ycm_auto_trigger| option
  138. 7. The |g:ycm_filetype_whitelist| option
  139. 8. The |g:ycm_filetype_blacklist| option
  140. 9. The |g:ycm_filetype_specific_completion_to_disable| option
  141. 10. The |g:ycm_filepath_blacklist| option
  142. 11. The |g:ycm_show_diagnostics_ui| option
  143. 12. The |g:ycm_error_symbol| option
  144. 13. The |g:ycm_warning_symbol| option
  145. 14. The |g:ycm_enable_diagnostic_signs| option
  146. 15. The |g:ycm_enable_diagnostic_highlighting| option
  147. 16. The |g:ycm_echo_current_diagnostic| option
  148. 17. The |g:ycm_auto_hover| option
  149. 18. The |g:ycm_filter_diagnostics| option
  150. 19. The |g:ycm_always_populate_location_list| option
  151. 20. The |g:ycm_open_loclist_on_ycm_diags| option
  152. 21. The |g:ycm_complete_in_comments| option
  153. 22. The |g:ycm_complete_in_strings| option
  154. 23. The |g:ycm_collect_identifiers_from_comments_and_strings| option
  155. 24. The |g:ycm_collect_identifiers_from_tags_files| option
  156. 25. The |g:ycm_seed_identifiers_with_syntax| option
  157. 26. The |g:ycm_extra_conf_vim_data| option
  158. 27. The |g:ycm_server_python_interpreter| option
  159. 28. The |g:ycm_keep_logfiles| option
  160. 29. The |g:ycm_log_level| option
  161. 30. The |g:ycm_auto_start_csharp_server| option
  162. 31. The |g:ycm_auto_stop_csharp_server| option
  163. 32. The |g:ycm_csharp_server_port| option
  164. 33. The |g:ycm_csharp_insert_namespace_expr| option
  165. 34. The |g:ycm_add_preview_to_completeopt| option
  166. 35. The |g:ycm_autoclose_preview_window_after_completion| option
  167. 36. The |g:ycm_autoclose_preview_window_after_insertion| option
  168. 37. The |g:ycm_max_diagnostics_to_display| option
  169. 38. The |g:ycm_key_list_select_completion| option
  170. 39. The |g:ycm_key_list_previous_completion| option
  171. 40. The |g:ycm_key_list_stop_completion| option
  172. 41. The |g:ycm_key_invoke_completion| option
  173. 42. The |g:ycm_key_detailed_diagnostics| option
  174. 43. The |g:ycm_show_detailed_diag_in_popup| option
  175. 44. The |g:ycm_global_ycm_extra_conf| option
  176. 45. The |g:ycm_confirm_extra_conf| option
  177. 46. The |g:ycm_extra_conf_globlist| option
  178. 47. The |g:ycm_filepath_completion_use_working_dir| option
  179. 48. The |g:ycm_semantic_triggers| option
  180. 49. The |g:ycm_cache_omnifunc| option
  181. 50. The |g:ycm_use_ultisnips_completer| option
  182. 51. The |g:ycm_goto_buffer_command| option
  183. 52. The |g:ycm_disable_for_files_larger_than_kb| option
  184. 53. The |g:ycm_use_clangd| option
  185. 54. The |g:ycm_clangd_binary_path| option
  186. 55. The |g:ycm_clangd_args| option
  187. 56. The |g:ycm_clangd_uses_ycmd_caching| option
  188. 57. The |g:ycm_language_server| option
  189. 58. The |g:ycm_disable_signature_help| option
  190. 59. The |g:ycm_signature_help_disable_syntax| option
  191. 60. The |g:ycm_gopls_binary_path| option
  192. 61. The |g:ycm_gopls_args| option
  193. 62. The |g:ycm_rls_binary_path| and 'g:ycm_rustc_binary_path' options
  194. 63. The |g:ycm_rust_toolchain_root| option
  195. 64. The |g:ycm_tsserver_binary_path| option
  196. 65. The |g:ycm_roslyn_binary_path| option
  197. 66. The |g:ycm_update_diagnostics_in_insert_mode| option
  198. 12. FAQ |youcompleteme-faq|
  199. 13. Contributor Code of Conduct |youcompleteme-contributor-code-of-conduct|
  200. 14. Contact |youcompleteme-contact|
  201. 15. License |youcompleteme-license|
  202. 16. Sponsorship |youcompleteme-sponsorship|
  203. 3. References |youcompleteme-references|
  204. ===============================================================================
  205. *youcompleteme-introduction*
  206. Introduction ~
  207. Image: Gitter room [1] Image: Build status [3] Image: Coverage status [5]
  208. -------------------------------------------------------------------------------
  209. *youcompleteme-help-advice-support*
  210. Help, Advice, Support ~
  211. Looking for help, advice, or support? Having problems getting YCM to work?
  212. First carefully read the installation instructions for your OS. We recommend
  213. you use the supplied 'install.py' - the "full" installation guide is for rare,
  214. advanced use cases and most users should use 'install.py'.
  215. If the server isn't starting and you're getting a "YouCompleteMe unavailable"
  216. error, check the Troubleshooting [7] guide.
  217. Next, check the User Guide section on the semantic completer that you are
  218. using. For C/C++/Objective-C/Objective-C++/CUDA, you _must_ read this section.
  219. Finally, check the FAQ [8].
  220. If, after reading the installation and user guides, and checking the FAQ,
  221. you're still having trouble, check the contacts section below for how to get in
  222. touch.
  223. Please do **NOT** go to #vim on Freenode for support. Please contact the
  224. YouCompleteMe maintainers directly using the contact details below.
  225. ===============================================================================
  226. *youcompleteme-vundle*
  227. Vundle ~
  228. Please note that the below instructions suggest using Vundle. Currently there
  229. are problems with Vundle, so here are some alternative instructions [9] using
  230. Vim packages.
  231. -------------------------------------------------------------------------------
  232. *youcompleteme-contents*
  233. Contents ~
  234. - Intro
  235. - Installation
  236. - Requirements
  237. - macOS
  238. - Linux 64-bit
  239. - Windows
  240. - Full Installation Guide
  241. - Quick Feature Summary
  242. - User Guide
  243. - General Usage
  244. - Client-Server Architecture
  245. - Completion String Ranking
  246. - General Semantic Completion
  247. - Signature Help
  248. - Semantic Highlighting
  249. - Inlay Hints
  250. - C-family Semantic Completion
  251. - Java Semantic Completion
  252. - C# Semantic Completion
  253. - Python Semantic Completion
  254. - Rust Semantic Completion
  255. - Go Semantic Completion
  256. - JavaScript and TypeScript Semantic Completion
  257. - Semantic Completion for Other Languages
  258. - LSP Configuration
  259. - Writing New Semantic Completers
  260. - Diagnostic Display
  261. - Diagnostic Highlighting Groups
  262. - Symbol Search
  263. - Type/Call Hierarchy
  264. - Commands
  265. - YcmCompleter subcommands
  266. - GoTo Commands
  267. - Semantic Information Commands
  268. - Refactoring Commands
  269. - Miscellaneous Commands
  270. - Functions
  271. - Autocommands
  272. - Options
  273. - FAQ
  274. - Contributor Code of Conduct
  275. - Contact
  276. - License
  277. - Sponsorship
  278. -------------------------------------------------------------------------------
  279. *youcompleteme-intro*
  280. Intro ~
  281. YouCompleteMe is a fast, as-you-type, fuzzy-search code completion,
  282. comprehension and refactoring engine for Vim [10].
  283. It has several completion engines built-in and supports any protocol-compliant
  284. Language Server, so can work with practically any language. YouCompleteMe
  285. contains:
  286. - an identifier-based engine that works with every programming language,
  287. - a powerful clangd [11]-based engine that provides native semantic code
  288. completion for C/C++/Objective-C/Objective-C++/CUDA (from now on referred
  289. to as "the C-family languages"),
  290. - a Jedi [12]-based completion engine for Python 2 and 3,
  291. - an OmniSharp-Roslyn [13]-based completion engine for C#,
  292. - a Gopls [14]-based completion engine for Go,
  293. - a TSServer [15]-based completion engine for JavaScript and TypeScript,
  294. - a rust-analyzer [16]-based completion engine for Rust,
  295. - a jdt.ls [17]-based completion engine for Java.
  296. - a generic Language Server Protocol implementation for any language
  297. - and an omnifunc-based completer that uses data from Vim's omnicomplete
  298. system to provide semantic completions for many other languages (Ruby, PHP,
  299. etc.).
  300. Image: YouCompleteMe GIF completion demo (see reference [18])
  301. Here's an explanation of what happened in the last GIF demo above.
  302. First, realize that **no keyboard shortcuts had to be pressed** to get the list
  303. of completion candidates at any point in the demo. The user just types and the
  304. suggestions pop up by themselves. If the user doesn't find the completion
  305. suggestions relevant and/or just wants to type, they can do so; the completion
  306. engine will not interfere.
  307. When the user sees a useful completion string being offered, they press the TAB
  308. key to accept it. This inserts the completion string. Repeated presses of the
  309. TAB key cycle through the offered completions.
  310. If the offered completions are not relevant enough, the user can continue
  311. typing to further filter out unwanted completions.
  312. A critical thing to notice is that the completion **filtering is NOT based on
  313. the input being a string prefix of the completion** (but that works too). The
  314. input needs to be a _subsequence [19] match_ of a completion. This is a fancy
  315. way of saying that any input characters need to be present in a completion
  316. string in the order in which they appear in the input. So 'abc' is a
  317. subsequence of 'xaybgc', but not of 'xbyxaxxc'. After the filter, a complicated
  318. sorting system ranks the completion strings so that the most relevant ones rise
  319. to the top of the menu (so you usually need to press TAB just once).
  320. **All of the above works with any programming language** because of the
  321. identifier-based completion engine. It collects all of the identifiers in the
  322. current file and other files you visit (and your tags files) and searches them
  323. when you type (identifiers are put into per-filetype groups).
  324. The demo also shows the semantic engine in use. When the user presses '.', '->'
  325. or '::' while typing in insert mode (for C++; different triggers are used for
  326. other languages), the semantic engine is triggered (it can also be triggered
  327. with a keyboard shortcut; see the rest of the docs).
  328. The last thing that you can see in the demo is YCM's diagnostic display
  329. features (the little red X that shows up in the left gutter; inspired by
  330. Syntastic [20]) if you are editing a C-family file. As the completer engine
  331. compiles your file and detects warnings or errors, they will be presented in
  332. various ways. You don't need to save your file or press any keyboard shortcut
  333. to trigger this, it "just happens" in the background.
  334. **And that's not all...**
  335. YCM might be the only Vim completion engine with the correct Unicode support.
  336. Though we do assume UTF-8 everywhere.
  337. Image: YouCompleteMe GIF unicode demo (see reference [21])
  338. YCM also provides semantic IDE-like features in a number of languages,
  339. including:
  340. - displaying signature help (argument hints) when entering the arguments to a
  341. function call (Vim only)
  342. - finding declarations, definitions, usages, etc. of identifiers, and an
  343. interactive symbol finder
  344. - displaying type information for classes, variables, functions etc.,
  345. - displaying documentation for methods, members, etc. in the preview window,
  346. or in a popup next to the cursor (Vim only)
  347. - fixing common coding errors, like missing semi-colons, typos, etc.,
  348. - semantic renaming of variables across files,
  349. - formatting code,
  350. - removing unused imports, sorting imports, etc.
  351. For example, here's a demo of signature help:
  352. Image: Signature Help Early Demo (see reference [22])
  353. Below we can see YCM being able to do a few things:
  354. - Retrieve references across files
  355. - Go to declaration/definition
  356. - Expand 'auto' in C++
  357. - Fix some common errors, and provide refactorings, with |FixIt|
  358. - Not shown in the GIF are |GoToImplementation| and |GoToType| for servers
  359. that support it.
  360. Image: YouCompleteMe GIF subcommands demo (see reference [23])
  361. And here's some documentation being shown in a hover popup, automatically and
  362. manually:
  363. Image: hover demo (see reference [24])
  364. Features vary by file type, so make sure to check out the file type feature
  365. summary and the full list of completer subcommands to find out what's available
  366. for your favourite languages.
  367. You'll also find that YCM has filepath completers (try typing './' in a file)
  368. and a completer that integrates with UltiSnips [25].
  369. -------------------------------------------------------------------------------
  370. *youcompleteme-installation*
  371. Installation ~
  372. -------------------------------------------------------------------------------
  373. *youcompleteme-requirements*
  374. Requirements ~
  375. ===============================================================================
  376. | _Runtime_ | _Min Version_ | _Recommended Version (full support)_ | _Python_ |
  377. ===============================================================================
  378. | Vim | 9.1.0016 | 9.1.0016 | 3.8 |
  379. -------------------------------------------------------------------------------
  380. | Neovim | 0.5 | Vim 9.1.0016 | 3.8 |
  381. -------------------------------------------------------------------------------
  382. -------------------------------------------------------------------------------
  383. *youcompleteme-supported-vim-versions*
  384. Supported Vim Versions ~
  385. Our policy is to support the Vim version that's in the latest LTS of Ubuntu.
  386. Vim must have a working Python 3 runtime.
  387. For Neovim users, our policy is to require the latest released version.
  388. Currently, Neovim 0.5.0 is required. Please note that some features are not
  389. available in Neovim, and Neovim is not officially supported.
  390. -------------------------------------------------------------------------------
  391. *youcompleteme-supported-python-runtime*
  392. Supported Python runtime ~
  393. YCM has two components: A server and a client. Both the server and client
  394. require Python 3.8 or later 3.x release.
  395. For the Vim client, Vim must be, compiled with '--enable-shared' (or
  396. '--enable-framework' on macOS). You can check if this is working with ':py3
  397. import sys; print( sys.version)'. It should say something like '3.8.2 (...)'.
  398. For Neovim, you must have a python 3.8 runtime and the Neovim python
  399. extensions. See Neovim's ':help provider-python' for how to set that up.
  400. For the server, you must run the 'install.py' script with a python 3.8 (or
  401. later) runtime. Anaconda etc. are not supported. YCM will remember the runtime
  402. you used to run 'install.py' and will use that when launching the server, so if
  403. you usually use anaconda, then make sure to use the full path to a real
  404. cpython3, e.g. '/usr/bin/python3 install.py --all' etc.
  405. Our policy is to support the python3 version that's available in the latest
  406. Ubuntu LTS (similar to our Vim version policy). We don't increase the Python
  407. runtime version without a reason, though. Typically, we do this when the
  408. current python version we're using goes out of support. At that time we will
  409. typically pick a version that will be supported for a number of years.
  410. -------------------------------------------------------------------------------
  411. *youcompleteme-supported-compilers*
  412. Supported Compilers ~
  413. In order to provide the best possible performance and stability, ycmd has
  414. updated its code to C++17. This requires a version bump of the minimum
  415. supported compilers. The new requirements are:
  416. ===============================
  417. | _Compiler_ | _Current Min_ |
  418. ===============================
  419. | GCC | 8 |
  420. -------------------------------
  421. | Clang | 7 |
  422. -------------------------------
  423. | MSVC | 15.7 (VS 2017) |
  424. -------------------------------
  425. YCM requires CMake 3.13 or greater. If your CMake is too old, you may be able
  426. to simply 'pip install --user cmake' to get a really new version.
  427. -------------------------------------------------------------------------------
  428. *youcompleteme-individual-completer-requirements*
  429. Individual completer requirements ~
  430. When enabling language support for a particular language, there may be runtime
  431. requirements, such as needing a very recent Java Development Kit for Java
  432. support. In general, YCM is not in control of the required versions for the
  433. downstream compilers, though we do our best to signal where we know them.
  434. -------------------------------------------------------------------------------
  435. *youcompleteme-macos*
  436. macOS ~
  437. -------------------------------------------------------------------------------
  438. *youcompleteme-quick-start-installing-all-completers*
  439. Quick start, installing all completers ~
  440. - Install YCM plugin via Vundle [26]
  441. - Install CMake, MacVim and Python 3; Note that the pre-installed _macOS
  442. system_ Vim is not supported (due to it having broken Python integration).
  443. >
  444. $ brew install cmake python go nodejs
  445. <
  446. - Install mono from Mono Project [27] (NOTE: on Intel Macs you can also 'brew
  447. install mono'. On arm Macs, you may require Rosetta)
  448. - For Java support you must install a JDK, one way to do this is with
  449. Homebrew:
  450. >
  451. $ brew install java
  452. $ sudo ln -sfn $(brew --prefix java)/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
  453. <
  454. - Pre-installed macOS _system_ Vim does not support Python 3. So you need to
  455. install either a Vim that supports Python 3 OR MacVim [28] with Homebrew
  456. [29]:
  457. - Option 1: Installing a Vim that supports Python 3
  458. >
  459. brew install vim
  460. <
  461. - Option 2: Installing MacVim [28]
  462. >
  463. brew install macvim
  464. <
  465. - Compile YCM.
  466. - For Intel and arm64 Macs, the bundled libclang/clangd work:
  467. >
  468. cd ~/.vim/bundle/YouCompleteMe
  469. python3 install.py --all
  470. <
  471. - If you have troubles with finding system frameworks or C++ standard
  472. library, try using the homebrew llvm:
  473. >
  474. brew install llvm
  475. cd ~/.vim/bundle/YouCompleteMe
  476. python3 install.py --system-libclang --all
  477. <
  478. And edit your vimrc to add the following line to use the Homebrew llvm's
  479. clangd:
  480. >
  481. " Use homebrew's clangd
  482. let g:ycm_clangd_binary_path = trim(system('brew --prefix llvm')).'/bin/clangd'
  483. <
  484. - For using an arbitrary LSP server, check the relevant section
  485. -------------------------------------------------------------------------------
  486. *youcompleteme-explanation-for-quick-start*
  487. Explanation for the quick start ~
  488. These instructions (using 'install.py') are the quickest way to install
  489. YouCompleteMe, however they may not work for everyone. If the following
  490. instructions don't work for you, check out the full installation guide.
  491. A supported Vim version with Python 3 is required. MacVim [28] is a good
  492. option, even if you only use the terminal. YCM won't work with the
  493. pre-installed Vim from Apple as its Python support is broken. If you don't
  494. already use a Vim that supports Python 3 or MacVim [28], install it with
  495. Homebrew [29]. Install CMake as well:
  496. >
  497. brew install vim cmake
  498. <
  499. OR
  500. >
  501. brew install macvim cmake
  502. <
  503. Install YouCompleteMe with Vundle [26].
  504. **Remember:** YCM is a plugin with a compiled component. If you **update** YCM
  505. using Vundle and the 'ycm_core' library APIs have changed (happens rarely), YCM
  506. will notify you to recompile it. You should then rerun the install process.
  507. **NOTE:** If you want C-family completion, you MUST have the latest Xcode
  508. installed along with the latest Command Line Tools (they are installed
  509. automatically when you run 'clang' for the first time, or manually by running
  510. 'xcode-select --install')
  511. Compiling YCM **with** semantic support for C-family languages through
  512. **clangd**:
  513. >
  514. cd ~/.vim/bundle/YouCompleteMe
  515. ./install.py --clangd-completer
  516. <
  517. Compiling YCM **without** semantic support for C-family languages:
  518. >
  519. cd ~/.vim/bundle/YouCompleteMe
  520. ./install.py
  521. <
  522. The following additional language support options are available:
  523. - C# support: install by downloading the Mono macOS package [30] and add
  524. '--cs-completer' when calling 'install.py'.
  525. - Go support: install Go [31] and add '--go-completer' when calling
  526. 'install.py'.
  527. - JavaScript and TypeScript support: install Node.js 18+ and npm [32] and add
  528. '--ts-completer' when calling 'install.py'.
  529. - Rust support: add '--rust-completer' when calling 'install.py'.
  530. - Java support: install JDK 17 [33] and add '--java-completer' when calling
  531. 'install.py'.
  532. To simply compile with everything enabled, there's a '--all' flag. So, to
  533. install with all language features, ensure 'xbuild', 'go', 'node' and 'npm'
  534. tools are installed and in your 'PATH', then simply run:
  535. >
  536. cd ~/.vim/bundle/YouCompleteMe
  537. ./install.py --all
  538. <
  539. That's it. You're done. Refer to the _User Guide_ section on how to use YCM.
  540. Don't forget that if you want the C-family semantic completion engine to work,
  541. you will need to provide the compilation flags for your project to YCM. It's
  542. all in the User Guide.
  543. YCM comes with sane defaults for its options, but you still may want to take a
  544. look at what's available for configuration. There are a few interesting options
  545. that are conservatively turned off by default that you may want to turn on.
  546. -------------------------------------------------------------------------------
  547. *youcompleteme-linux-64-bit*
  548. Linux 64-bit ~
  549. The following assume you're using Ubuntu 24.04.
  550. -------------------------------------------------------------------------------
  551. Quick start, installing all completers ~
  552. - Install YCM plugin via Vundle [26]
  553. - Install CMake, Vim and Python
  554. >
  555. apt install build-essential cmake vim-nox python3-dev
  556. <
  557. - Install mono-complete, go, node, java, and npm
  558. >
  559. apt install mono-complete golang nodejs openjdk-17-jdk openjdk-17-jre npm
  560. <
  561. - Compile YCM
  562. >
  563. cd ~/.vim/bundle/YouCompleteMe
  564. python3 install.py --all
  565. <
  566. - For plugging an arbitrary LSP server, check the relevant section
  567. -------------------------------------------------------------------------------
  568. Explanation for the quick start ~
  569. These instructions (using 'install.py') are the quickest way to install
  570. YouCompleteMe, however they may not work for everyone. If the following
  571. instructions don't work for you, check out the full installation guide.
  572. Make sure you have a supported version of Vim with Python 3 support and a
  573. supported compiler. The latest LTS of Ubuntu is the minimum platform for simple
  574. installation. For earlier releases or other distributions, you may have to do
  575. some work to acquire the dependencies.
  576. If your Vim version is too old, you may need to compile Vim from source [34]
  577. (don't worry, it's easy).
  578. Install YouCompleteMe with Vundle [26].
  579. **Remember:** YCM is a plugin with a compiled component. If you **update** YCM
  580. using Vundle and the 'ycm_core' library APIs have changed (which happens
  581. rarely), YCM will notify you to recompile it. You should then rerun the
  582. installation process.
  583. Install development tools, CMake, and Python headers:
  584. - Fedora-like distributions:
  585. >
  586. sudo dnf install cmake gcc-c++ make python3-devel
  587. <
  588. - Ubuntu LTS:
  589. >
  590. sudo apt install build-essential cmake3 python3-dev
  591. <
  592. Compiling YCM **with** semantic support for C-family languages through
  593. **clangd**:
  594. >
  595. cd ~/.vim/bundle/YouCompleteMe
  596. python3 install.py --clangd-completer
  597. <
  598. Compiling YCM **without** semantic support for C-family languages:
  599. >
  600. cd ~/.vim/bundle/YouCompleteMe
  601. python3 install.py
  602. <
  603. The following additional language support options are available:
  604. - C# support: install Mono [35] and add '--cs-completer' when calling
  605. 'install.py'.
  606. - Go support: install Go [31] and add '--go-completer' when calling
  607. 'install.py'.
  608. - JavaScript and TypeScript support: install Node.js 18+ and npm [32] and add
  609. '--ts-completer' when calling 'install.py'.
  610. - Rust support: add '--rust-completer' when calling 'install.py'.
  611. - Java support: install JDK 17 [33] and add '--java-completer' when calling
  612. 'install.py'.
  613. To simply compile with everything enabled, there's a '--all' flag. So, to
  614. install with all language features, ensure 'xbuild', 'go', 'node', and 'npm'
  615. tools are installed and in your 'PATH', then simply run:
  616. >
  617. cd ~/.vim/bundle/YouCompleteMe
  618. python3 install.py --all
  619. <
  620. That's it. You're done. Refer to the _User Guide_ section on how to use YCM.
  621. Don't forget that if you want the C-family semantic completion engine to work,
  622. you will need to provide the compilation flags for your project to YCM. It's
  623. all in the User Guide.
  624. YCM comes with sane defaults for its options, but you still may want to take a
  625. look at what's available for configuration. There are a few interesting options
  626. that are conservatively turned off by default that you may want to turn on.
  627. -------------------------------------------------------------------------------
  628. *youcompleteme-windows*
  629. Windows ~
  630. -------------------------------------------------------------------------------
  631. Quick start, installing all completers ~
  632. - Install YCM plugin via Vundle [26]
  633. - Install Visual Studio Build Tools 2019 [36]
  634. - Install CMake, Vim and Python
  635. - Install go, node and npm
  636. - Compile YCM
  637. >
  638. cd YouCompleteMe
  639. python3 install.py --all
  640. <
  641. - Add 'set encoding=utf-8' to your vimrc [37]
  642. - For plugging an arbitrary LSP server, check the relevant section
  643. -------------------------------------------------------------------------------
  644. Explanation for the quick start ~
  645. These instructions (using 'install.py') are the quickest way to install
  646. YouCompleteMe, however they may not work for everyone. If the following
  647. instructions don't work for you, check out the full installation guide.
  648. **Important:** we assume that you are using the 'cmd.exe' command prompt and
  649. that you know how to add an executable to the PATH environment variable.
  650. Make sure you have a supported Vim version with Python 3 support. You can check
  651. the version and which Python is supported by typing ':version' inside Vim. Look
  652. at the features included: '+python3/dyn' for Python 3. Take note of the Vim
  653. architecture, i.e. 32 or 64-bit. It will be important when choosing the Python
  654. installer. We recommend using a 64-bit client. Daily updated installers of
  655. 32-bit and 64-bit Vim with Python 3 support [38] are available.
  656. Add the following line to your vimrc [37] if not already present.:
  657. >
  658. set encoding=utf-8
  659. <
  660. This option is required by YCM. Note that it does not prevent you from editing
  661. a file in another encoding than UTF-8. You can do that by specifying the
  662. '|++enc|' argument to the ':e' command.
  663. Install YouCompleteMe with Vundle [26].
  664. **Remember:** YCM is a plugin with a compiled component. If you **update** YCM
  665. using Vundle and the 'ycm_core' library APIs have changed (happens rarely), YCM
  666. will notify you to recompile it. You should then rerun the install process.
  667. Download and install the following software:
  668. - Python 3 [39]. Be sure to pick the version corresponding to your Vim
  669. architecture. It is _Windows x86_ for a 32-bit Vim and _Windows x86-64_ for
  670. a 64-bit Vim. We recommend installing Python 3. Additionally, the version
  671. of Python you install must match up exactly with the version of Python that
  672. Vim is looking for. Type ':version' and look at the bottom of the page at
  673. the list of compiler flags. Look for flags that look similar to
  674. '-DDYNAMIC_PYTHON3_DLL=\"python36.dll\"'. This indicates that Vim is
  675. looking for Python 3.6. You'll need one or the other installed, matching
  676. the version number exactly.
  677. - CMake [40]. Add CMake executable to the PATH environment variable.
  678. - Build Tools for Visual Studio 2019 [36]. During setup, select _C++ build
  679. tools_ in _Workloads_.
  680. Compiling YCM **with** semantic support for C-family languages through
  681. **clangd**:
  682. >
  683. cd %USERPROFILE%/vimfiles/bundle/YouCompleteMe
  684. python install.py --clangd-completer
  685. <
  686. Compiling YCM **without** semantic support for C-family languages:
  687. >
  688. cd %USERPROFILE%/vimfiles/bundle/YouCompleteMe
  689. python install.py
  690. <
  691. The following additional language support options are available:
  692. - C# support: add '--cs-completer' when calling 'install.py'. Be sure that
  693. the build utility 'msbuild' is in your PATH [41].
  694. - Go support: install Go [31] and add '--go-completer' when calling
  695. 'install.py'.
  696. - JavaScript and TypeScript support: install Node.js 18+ and npm [32] and add
  697. '--ts-completer' when calling 'install.py'.
  698. - Rust support: add '--rust-completer' when calling 'install.py'.
  699. - Java support: install JDK 17 [33] and add '--java-completer' when calling
  700. 'install.py'.
  701. To simply compile with everything enabled, there's a '--all' flag. So, to
  702. install with all language features, ensure 'msbuild', 'go', 'node' and 'npm'
  703. tools are installed and in your 'PATH', then simply run:
  704. >
  705. cd %USERPROFILE%/vimfiles/bundle/YouCompleteMe
  706. python install.py --all
  707. <
  708. You can specify the Microsoft Visual C++ (MSVC) version using the '--msvc'
  709. option. YCM officially supports MSVC 15 (2017), MSVC 16 (Visual Studio 2019)
  710. and MSVC 17 (Visual Studio 17 2022).
  711. That's it. You're done. Refer to the _User Guide_ section on how to use YCM.
  712. Don't forget that if you want the C-family semantic completion engine to work,
  713. you will need to provide the compilation flags for your project to YCM. It's
  714. all in the User Guide.
  715. YCM comes with sane defaults for its options, but you still may want to take a
  716. look at what's available for configuration. There are a few interesting options
  717. that are conservatively turned off by default that you may want to turn on.
  718. -------------------------------------------------------------------------------
  719. *youcompleteme-full-installation-guide*
  720. Full Installation Guide ~
  721. The full installation guide [42] has been moved to the wiki.
  722. -------------------------------------------------------------------------------
  723. *youcompleteme-quick-feature-summary*
  724. Quick Feature Summary ~
  725. -------------------------------------------------------------------------------
  726. *youcompleteme-general*
  727. General (all languages) ~
  728. - Super-fast identifier completer including tags files and syntax elements
  729. - Intelligent suggestion ranking and filtering
  730. - File and path suggestions
  731. - Suggestions from Vim's omnifunc
  732. - UltiSnips snippet suggestions
  733. -------------------------------------------------------------------------------
  734. *youcompleteme-c-family-languages*
  735. C-family languages (C, C++, Objective C, Objective C++, CUDA) ~
  736. - Semantic auto-completion with automatic fixes
  737. - Signature help
  738. - Real-time diagnostic display
  739. - Go to include/declaration/definition (|GoTo|, etc.)
  740. - Go to alternate file (e.g. associated header |GoToAlternateFile|)
  741. - Find Symbol ('GoToSymbol'), with interactive search
  742. - Document outline (|GoToDocumentOutline|), with interactive search
  743. - View documentation comments for identifiers (|GetDoc|)
  744. - Type information for identifiers (|GetType|)
  745. - Automatically fix certain errors (|FixIt|)
  746. - Perform refactoring (|FixIt|)
  747. - Reference finding (|GoToReferences|)
  748. - Renaming symbols ('RefactorRename <new name>')
  749. - Code formatting (|Format|)
  750. - Semantic highlighting
  751. - Inlay hints
  752. - Type hierarchy
  753. - Call hierarchy
  754. -------------------------------------------------------------------------------
  755. *youcompleteme-c*
  756. C♯ ~
  757. - Semantic auto-completion
  758. - Signature help
  759. - Real-time diagnostic display
  760. - Go to declaration/definition (|GoTo|, etc.)
  761. - Go to implementation (|GoToImplementation|)
  762. - Find Symbol ('GoToSymbol'), with interactive search
  763. - View documentation comments for identifiers (|GetDoc|)
  764. - Type information for identifiers (|GetType|)
  765. - Automatically fix certain errors (|FixIt|)
  766. - Perform refactoring (|FixIt|)
  767. - Management of OmniSharp-Roslyn server instance
  768. - Renaming symbols ('RefactorRename <new name>')
  769. - Code formatting (|Format|)
  770. -------------------------------------------------------------------------------
  771. *youcompleteme-python*
  772. Python ~
  773. - Semantic auto-completion
  774. - Signature help
  775. - Go to definition (|GoTo|)
  776. - Find Symbol ('GoToSymbol'), with interactive search
  777. - Reference finding (|GoToReferences|)
  778. - View documentation comments for identifiers (|GetDoc|)
  779. - Type information for identifiers (|GetType|)
  780. - Renaming symbols ('RefactorRename <new name>')
  781. -------------------------------------------------------------------------------
  782. *youcompleteme-go*
  783. Go ~
  784. - Semantic auto-completion
  785. - Signature help
  786. - Real-time diagnostic display
  787. - Go to declaration/definition (|GoTo|, etc.)
  788. - Go to type definition (|GoToType|)
  789. - Go to implementation (|GoToImplementation|)
  790. - Document outline (|GoToDocumentOutline|), with interactive search
  791. - Automatically fix certain errors (|FixIt|)
  792. - Perform refactoring (|FixIt|)
  793. - View documentation comments for identifiers (|GetDoc|)
  794. - Type information for identifiers (|GetType|)
  795. - Code formatting (|Format|)
  796. - Management of 'gopls' server instance
  797. - Inlay hints
  798. - Call hierarchy
  799. -------------------------------------------------------------------------------
  800. *youcompleteme-javascript-typescript*
  801. JavaScript and TypeScript ~
  802. - Semantic auto-completion with automatic import insertion
  803. - Signature help
  804. - Real-time diagnostic display
  805. - Go to definition (|GoTo|, |GoToDefinition|, and |GoToDeclaration| are
  806. identical)
  807. - Go to type definition (|GoToType|)
  808. - Go to implementation (|GoToImplementation|)
  809. - Find Symbol ('GoToSymbol'), with interactive search
  810. - Reference finding (|GoToReferences|)
  811. - View documentation comments for identifiers (|GetDoc|)
  812. - Type information for identifiers (|GetType|)
  813. - Automatically fix certain errors and perform refactoring (|FixIt|)
  814. - Perform refactoring (|FixIt|)
  815. - Renaming symbols ('RefactorRename <new name>')
  816. - Code formatting (|Format|)
  817. - Organize imports (|OrganizeImports|)
  818. - Management of 'TSServer' server instance
  819. - Inlay hints
  820. - Call hierarchy
  821. -------------------------------------------------------------------------------
  822. *youcompleteme-rust*
  823. Rust ~
  824. - Semantic auto-completion
  825. - Real-time diagnostic display
  826. - Go to declaration/definition (|GoTo|, etc.)
  827. - Go to implementation (|GoToImplementation|)
  828. - Reference finding (|GoToReferences|)
  829. - Document outline (|GoToDocumentOutline|), with interactive search
  830. - View documentation comments for identifiers (|GetDoc|)
  831. - Automatically fix certain errors (|FixIt|)
  832. - Perform refactoring (|FixIt|)
  833. - Type information for identifiers (|GetType|)
  834. - Renaming symbols ('RefactorRename <new name>')
  835. - Code formatting (|Format|)
  836. - Management of 'rust-analyzer' server instance
  837. - Semantic highlighting
  838. - Inlay hints
  839. - Call hierarchy
  840. -------------------------------------------------------------------------------
  841. *youcompleteme-java*
  842. Java ~
  843. - Semantic auto-completion with automatic import insertion
  844. - Signature help
  845. - Real-time diagnostic display
  846. - Go to definition (|GoTo|, |GoToDefinition|, and |GoToDeclaration| are
  847. identical)
  848. - Go to type definition (|GoToType|)
  849. - Go to implementation (|GoToImplementation|)
  850. - Find Symbol ('GoToSymbol'), with interactive search
  851. - Reference finding (|GoToReferences|)
  852. - Document outline (|GoToDocumentOutline|), with interactive search
  853. - View documentation comments for identifiers (|GetDoc|)
  854. - Type information for identifiers (|GetType|)
  855. - Automatically fix certain errors including code generation (|FixIt|)
  856. - Renaming symbols ('RefactorRename <new name>')
  857. - Code formatting (|Format|)
  858. - Organize imports (|OrganizeImports|)
  859. - Detection of Java projects
  860. - Execute custom server command ('ExecuteCommand <args>')
  861. - Management of 'jdt.ls' server instance
  862. - Semantic highlighting
  863. - Inlay hints
  864. - Type hierarchy
  865. - Call hierarchy
  866. -------------------------------------------------------------------------------
  867. *youcompleteme-user-guide*
  868. User Guide ~
  869. -------------------------------------------------------------------------------
  870. *youcompleteme-general-usage*
  871. General Usage ~
  872. If the offered completions are too broad, keep typing characters; YCM will
  873. continue refining the offered completions based on your input.
  874. Filtering is "smart-case" and "smart-diacritic [43]" sensitive; if you are
  875. typing only lowercase letters, then it's case-insensitive. If your input
  876. contains uppercase letters, then the uppercase letters in your query must match
  877. uppercase letters in the completion strings (the lowercase letters still match
  878. both). On top of that, a letter with no diacritic marks will match that letter
  879. with or without marks:
  880. ---------------------------------------------
  881. | _matches_ | _foo_ | _fôo_ | _fOo_ | _fÔo_ |
  882. ---------------------------------------------
  883. | _foo_ | ✔️ | ✔️ | ✔️ | ✔️ |
  884. ---------------------------------------------
  885. | _fôo_ | ❌ | ✔️ | ❌ | ✔️ |
  886. ---------------------------------------------
  887. | _fOo_ | ❌ | ❌ | ✔️ | ✔️ |
  888. ---------------------------------------------
  889. | _fÔo_ | ❌ | ❌ | ❌ | ✔️ |
  890. ---------------------------------------------
  891. Use the TAB key to accept a completion and continue pressing TAB to cycle
  892. through the completions. Use Shift-TAB to cycle backward. Note that if you're
  893. using console Vim (that is, not gvim or MacVim) then it's likely that the
  894. Shift-TAB binding will not work because the console will not pass it to Vim.
  895. You can remap the keys; see the Options section below.
  896. Knowing a little bit about how YCM works internally will prevent confusion. YCM
  897. has several completion engines: an identifier-based completer that collects all
  898. of the identifiers in the current file and other files you visit (and your tags
  899. files) and searches them when you type (identifiers are put into per-filetype
  900. groups).
  901. There are also several semantic engines in YCM. There are libclang-based and
  902. clangd-based completers that provide semantic completion for C-family
  903. languages. There's a Jedi-based completer for semantic completion for Python.
  904. There's also an omnifunc-based completer that uses data from Vim's omnicomplete
  905. system to provide semantic completions when no native completer exists for that
  906. language in YCM.
  907. There are also other completion engines, like the UltiSnips completer and the
  908. filepath completer.
  909. YCM automatically detects which completion engine would be the best in any
  910. situation. On occasion, it queries several of them at once, merges the outputs
  911. and presents the results to you.
  912. -------------------------------------------------------------------------------
  913. *youcompleteme-client-server-architecture*
  914. Client-Server Architecture ~
  915. YCM has a client-server architecture; the Vim part of YCM is only a thin client
  916. that talks to the ycmd HTTP+JSON server [44] that has the vast majority of YCM
  917. logic and functionality. The server is started and stopped automatically as you
  918. start and stop Vim.
  919. -------------------------------------------------------------------------------
  920. *youcompleteme-completion-string-ranking*
  921. Completion String Ranking ~
  922. The subsequence filter removes any completions that do not match the input, but
  923. then the sorting system kicks in. It's actually very complicated and uses lots
  924. of factors, but suffice it to say that "word boundary" (WB) subsequence
  925. character matches are "worth" more than non-WB matches. In effect, this means
  926. that given an input of "gua", the completion "getUserAccount" would be ranked
  927. higher in the list than the "Fooguxa" completion (both of which are subsequence
  928. matches). Word-boundary characters are all capital characters, characters
  929. preceded by an underscore, and the first letter character in the completion
  930. string.
  931. -------------------------------------------------------------------------------
  932. *youcompleteme-signature-help*
  933. Signature Help ~
  934. Valid signatures are displayed in a second popup menu and the current signature
  935. is highlighted along with the current argument.
  936. Signature help is triggered in insert mode automatically when
  937. |g:ycm_auto_trigger| is enabled and is not supported when it is not enabled.
  938. The signatures popup is hidden when there are no matching signatures or when
  939. you leave insert mode. If you want to manually control when it is visible, you
  940. can map something to '<plug>YCMToggleSignatureHelp' (see below).
  941. For more details on this feature and a few demos, check out the PR that
  942. proposed it [45].
  943. -------------------------------------------------------------------------------
  944. *youcompleteme-dismiss-signature-help*
  945. Dismiss signature help ~
  946. The signature help popup sometimes gets in the way. You can toggle its
  947. visibility with a mapping. YCM provides the "Plug" mapping
  948. '<Plug>(YCMToggleSignatureHelp)' for this.
  949. For example, to hide/show the signature help popup by pressing Ctrl+l in insert
  950. mode: 'imap <silent> <C-l> <Plug>(YCMToggleSignatureHelp)'.
  951. _NOTE_: No default mapping is provided because insert mappings are very
  952. difficult to create without breaking or overriding some existing functionality.
  953. Ctrl-l is not a suggestion, just an example.
  954. -------------------------------------------------------------------------------
  955. *youcompleteme-semantic-highlighting*
  956. Semantic highlighting ~
  957. Semantic highlighting is the process where the buffer text is coloured
  958. according to the underlying semantic type of the word, rather than classic
  959. syntax highlighting based on regular expressions. This can be powerful
  960. additional data that we can process very quickly.
  961. This feature is only supported in Vim.
  962. For example, here is a function with classic highlighting:
  963. Image: highliting-classic (see reference [46])
  964. And here is the same function with semantic highlighting:
  965. Image: highliting-semantic (see reference [47])
  966. As you can see, the function calls, macros, etc. are correctly identified.
  967. This can be enabled globally with 'let g:ycm_enable_semantic_highlighting=1' or
  968. per buffer, by setting 'b:ycm_enable_semantic_highlighting'.
  969. -------------------------------------------------------------------------------
  970. *youcompleteme-customising-highlight-groups*
  971. Customising the highlight groups ~
  972. YCM uses text properties (see ':help text-prop-intro') for semantic
  973. highlighting. In order to customise the coloring, you can define the text
  974. properties that are used.
  975. If you define a text property named 'YCM_HL_<token type>', then it will be used
  976. in place of the defaults. The '<token type>' is defined as the Language Server
  977. Protocol semantic token type, defined in the LSP Spec [48].
  978. Some servers also use custom values. In this case, YCM prints a warning
  979. including the token type name that you can customise.
  980. For example, to render 'parameter' tokens using the 'Normal' highlight group,
  981. you can do this:
  982. >
  983. call prop_type_add( 'YCM_HL_parameter', { 'highlight': 'Normal' } )
  984. <
  985. More generally, this pattern can be useful for customising the groups:
  986. >
  987. let MY_YCM_HIGHLIGHT_GROUP = {
  988. \ 'typeParameter': 'PreProc',
  989. \ 'parameter': 'Normal',
  990. \ 'variable': 'Normal',
  991. \ 'property': 'Normal',
  992. \ 'enumMember': 'Normal',
  993. \ 'event': 'Special',
  994. \ 'member': 'Normal',
  995. \ 'method': 'Normal',
  996. \ 'class': 'Special',
  997. \ 'namespace': 'Special',
  998. \ }
  999. for tokenType in keys( MY_YCM_HIGHLIGHT_GROUP )
  1000. call prop_type_add( 'YCM_HL_' . tokenType,
  1001. \ { 'highlight': MY_YCM_HIGHLIGHT_GROUP[ tokenType ] } )
  1002. endfor
  1003. <
  1004. -------------------------------------------------------------------------------
  1005. *youcompleteme-inlay-hints*
  1006. Inlay hints ~
  1007. **NOTE**: Highly experimental feature, requiring Vim 9.0.214 or later (not
  1008. supported in NeoVim).
  1009. When 'g:ycm_enable_inlay_hints' (globally) or 'b:ycm_enable_inlay_hints' (for a
  1010. specific buffer) is set to '1', then YCM will insert inlay hints as supported
  1011. by the language semantic engine.
  1012. An inlay hint is text that is rendered on the screen that is not part of the
  1013. buffer and is often used to mark up the type or name of arguments, parameters,
  1014. etc. which help the developer understand the semantics of the code.
  1015. Here are some examples:
  1016. - C
  1017. Image: c-inlay (see reference [49])
  1018. - TypeScript
  1019. Image: ts-inlay (see reference [50])
  1020. - Go
  1021. Image: go-inlay (see reference [51])
  1022. -------------------------------------------------------------------------------
  1023. *youcompleteme-highlight-groups*
  1024. Highlight groups ~
  1025. By default, YCM renders the inlay hints with the 'NonText' highlight group. To
  1026. override this, define the 'YcmInlayHint' highlight yourself, e.g. in your
  1027. '.vimrc':
  1028. >
  1029. hi link YcmInlayHint Comment
  1030. <
  1031. Similar to semantic highlighting above, you can override specific highlighting
  1032. for different inlay hint types by defining text properties named after the kind
  1033. of inlay hint, for example:
  1034. >
  1035. call prop_type_add( 'YCM_INLAY_Type', #{ highlight: 'Comment' } )
  1036. <
  1037. The list of inlay hint kinds can be found in 'python/ycm/inlay_hints.py'
  1038. -------------------------------------------------------------------------------
  1039. *youcompleteme-options*
  1040. Options ~
  1041. - 'g:ycm_enable_inlay_hints' or 'b:ycm_enable_inlay_hints' - enable/disable
  1042. globally or for local buffer
  1043. - 'g:ycm_clear_inlay_hints_in_insert_mode' - set to '1' to remove all inlay
  1044. hints when entering insert mode and reinstate them when leaving insert mode
  1045. -------------------------------------------------------------------------------
  1046. *youcompleteme-toggling*
  1047. Toggling ~
  1048. Inlay hints can add a lot of text to the screen and may be distracting. You can
  1049. toggle them on/off instantly, by mapping something to
  1050. '<Plug>(YCMToggleInlayHints)', for example:
  1051. >
  1052. nnoremap <silent> <localleader>h <Plug>(YCMToggleInlayHints)
  1053. <
  1054. No default mapping is provided for this due to the personal nature of mappings.
  1055. -------------------------------------------------------------------------------
  1056. *youcompleteme-general-semantic-completion*
  1057. General Semantic Completion ~
  1058. You can use Ctrl+Space to trigger the completion suggestions anywhere, even
  1059. without a string prefix. This is useful to see which top-level functions are
  1060. available for use.
  1061. -------------------------------------------------------------------------------
  1062. *youcompleteme-c-family-semantic-completion*
  1063. C-family Semantic Completion ~
  1064. **NOTE:** YCM originally used the 'libclang' based engine for C-family, but
  1065. users should migrate to clangd, as it provides more features and better
  1066. performance. Users who rely on 'override_filename' in their
  1067. '.ycm_extra_conf.py' will need to stay on the old 'libclang' engine.
  1068. Instructions on how to stay on the old engine are available on the wiki [52].
  1069. Some of the features of clangd:
  1070. - **Project wide indexing**: Clangd has both dynamic and static index
  1071. support. The dynamic index stores up-to-date symbols coming from any files
  1072. you are currently editing, whereas static index contains project-wide
  1073. symbol information. This symbol information is used for code completion and
  1074. code navigation. Whereas libclang is limited to the current translation
  1075. unit(TU).
  1076. - **Code navigation**: Clangd provides all the GoTo requests libclang
  1077. provides and it improves those using the above-mentioned index information
  1078. to contain project-wide information rather than just the current TU.
  1079. - **Rename**: Clangd can perform semantic rename operations on the current
  1080. file, whereas libclang doesn't support such functionality.
  1081. - **Code Completion**: Clangd can perform code completions at a lower latency
  1082. than libclang; also, it has information about all the symbols in your
  1083. project so it can suggest items outside your current TU and also provides
  1084. proper '#include' insertions for those items.
  1085. - **Signature help**: Clangd provides signature help so that you can see the
  1086. names and types of arguments when calling functions.
  1087. - **Format Code**: Clangd provides code formatting either for the selected
  1088. lines or the whole file, whereas libclang doesn't have such functionality.
  1089. - **Performance**: Clangd has faster re-parse and code completion times
  1090. compared to libclang.
  1091. -------------------------------------------------------------------------------
  1092. Installation ~
  1093. On supported architectures, the 'install.py' script will download a suitable
  1094. clangd ('--clangd-completer') or libclang ('--clang-completer') for you.
  1095. Supported architectures are:
  1096. - Linux glibc >= 2.39 (Intel, armv7-a, aarch64) - built on ubuntu 24.04
  1097. - MacOS >=10.15 (Intel, arm64)
  1098. - For Intel, compatibility per clang.llvm.org downloads
  1099. - For arm64, macOS 10.15+
  1100. - Windows (Intel) - compatibility per clang.llvm.org downloads
  1101. **_clangd_**:
  1102. Typically, clangd is installed by the YCM installer (either with '--all' or
  1103. with '--clangd-completer'). This downloads a pre-built 'clangd' binary for your
  1104. architecture. If your OS or architecture is not supported or is too old, you
  1105. can install a compatible 'clangd' and use |g:ycm_clangd_binary_path| to point
  1106. to it.
  1107. **_libclang_**:
  1108. 'libclang' can be enabled also with '--all' or '--clang-completer'. As with
  1109. 'clangd', YCM will try and download a version of 'libclang' that is suitable
  1110. for your environment, but again if your environment can't be supported, you can
  1111. build or acquire 'libclang' for yourself and specify it when building, as:
  1112. >
  1113. $ EXTRA_CMAKE_ARGS='-DPATH_TO_LLVM_ROOT=/path/to/your/llvm' ./install.py --clang-completer --system-libclang
  1114. <
  1115. Please note that if using custom 'clangd' or 'libclang' it _must_ match the
  1116. version that YCM requires. Currently YCM requires **_clang 17.0.1_**.
  1117. -------------------------------------------------------------------------------
  1118. *youcompleteme-compile-flags*
  1119. Compile flags ~
  1120. In order to perform semantic analysis such as code completion, |GoTo|, and
  1121. diagnostics, YouCompleteMe uses 'clangd', which makes use of clang compiler,
  1122. sometimes also referred to as LLVM. Like any compiler, clang also requires a
  1123. set of compile flags in order to parse your code. Simply put: If clang can't
  1124. parse your code, YouCompleteMe can't provide semantic analysis.
  1125. There are 2 methods that can be used to provide compile flags to clang:
  1126. -------------------------------------------------------------------------------
  1127. *youcompleteme-option-1-use-compilation-database-53*
  1128. Option 1: Use a compilation database [53] ~
  1129. The easiest way to get YCM to compile your code is to use a compilation
  1130. database. A compilation database is usually generated by your build system
  1131. (e.g. 'CMake') and contains the compiler invocation for each compilation unit
  1132. in your project.
  1133. For information on how to generate a compilation database, see the clang
  1134. documentation [53]. In short:
  1135. - If using CMake, add '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON' when configuring
  1136. (or add 'set( CMAKE_EXPORT_COMPILE_COMMANDS ON )' to 'CMakeLists.txt') and
  1137. copy or symlink the generated database to the root of your project.
  1138. - If using Ninja, check out the 'compdb' tool ('-t compdb') in its docs [54].
  1139. - If using GNU make, check out compiledb [55] or Bear [56].
  1140. - For other build systems, check out '.ycm_extra_conf.py' below.
  1141. If no '.ycm_extra_conf.py' is found, YouCompleteMe automatically tries to load
  1142. a compilation database if there is one.
  1143. YCM looks for a file named 'compile_commands.json' in the directory of the
  1144. opened file or in any directory above it in the hierarchy (recursively); when
  1145. the file is found before a local '.ycm_extra_conf.py', YouCompleteMe stops
  1146. searching the directories and lets clangd take over and handle the flags.
  1147. -------------------------------------------------------------------------------
  1148. *youcompleteme-option-2-provide-flags-manually*
  1149. Option 2: Provide the flags manually ~
  1150. If you don't have a compilation database or aren't able to generate one, you
  1151. have to tell YouCompleteMe how to compile your code some other way.
  1152. Every C-family project is different. It is not possible for YCM to guess what
  1153. compiler flags to supply for your project. Fortunately, YCM provides a
  1154. mechanism for you to generate the flags for a particular file with _arbitrary
  1155. complexity_. This is achieved by requiring you to provide a Python module that
  1156. implements a trivial function that, given the file name as an argument, returns
  1157. a list of compiler flags to use to compile that file.
  1158. YCM looks for a '.ycm_extra_conf.py' file in the directory of the opened file
  1159. or in any directory above it in the hierarchy (recursively); when the file is
  1160. found, it is loaded (only once!) as a Python module. YCM calls a 'Settings'
  1161. method in that module which should provide it with the information necessary to
  1162. compile the current file. You can also provide a path to a global configuration
  1163. file with the |g:ycm_global_ycm_extra_conf| option, which will be used as a
  1164. fallback. To prevent the execution of malicious code from a file you didn't
  1165. write YCM will ask you once per '.ycm_extra_conf.py' if it is safe to load.
  1166. This can be disabled and you can white-/blacklist files. See the
  1167. |g:ycm_confirm_extra_conf| and |g:ycm_extra_conf_globlist| options
  1168. respectively.
  1169. This system was designed this way so that the user can perform any arbitrary
  1170. sequence of operations to produce a list of compilation flags YCM should hand
  1171. to Clang.
  1172. **NOTE**: It is highly recommended to include '-x <language>' flag to libclang.
  1173. This is so that the correct language is detected, particularly for header
  1174. files. Common values are '-x c' for C, '-x c++' for C++, '-x objc' for
  1175. Objective-C, and '-x cuda' for CUDA.
  1176. To give you an impression, if your C++ project is trivial, and your usual
  1177. compilation command is: 'g++ -Wall -Wextra -Werror -o FILE.o FILE.cc', then the
  1178. following '.ycm_extra_conf.py' is enough to get semantic analysis from
  1179. YouCompleteMe:
  1180. >
  1181. def Settings( **kwargs ):
  1182. return {
  1183. 'flags': [ '-x', 'c++', '-Wall', '-Wextra', '-Werror' ],
  1184. }
  1185. <
  1186. As you can see from the trivial example, YCM calls the 'Settings' method which
  1187. returns a dictionary with a single element "'flags'". This element is a 'list'
  1188. of compiler flags to pass to libclang for the current file. The absolute path
  1189. of that file is accessible under the 'filename' key of the 'kwargs' dictionary.
  1190. That's it! This is actually enough for most projects, but for complex projects
  1191. it is not uncommon to integrate directly with an existing build system using
  1192. the full power of the Python language.
  1193. For a more elaborate example, see ycmd's own '.ycm_extra_conf.py' [57]. You
  1194. should be able to use it _as a starting point_. **Don't** just copy/paste that
  1195. file somewhere and expect things to magically work; **your project needs
  1196. different flags**. Hint: just replace the strings in the 'flags' variable with
  1197. compilation flags necessary for your project. That should be enough for 99% of
  1198. projects.
  1199. You could also consider using YCM-Generator [58] to generate the
  1200. 'ycm_extra_conf.py' file.
  1201. -------------------------------------------------------------------------------
  1202. *youcompleteme-errors-during-compilation*
  1203. Errors during compilation ~
  1204. If Clang encounters errors when compiling the header files that your file
  1205. includes, then it's probably going to take a long time to get completions. When
  1206. the completion menu finally appears, it's going to have a large number of
  1207. unrelated completion strings (type/function names that are not actually
  1208. members). This is because Clang fails to build a precompiled preamble for your
  1209. file if there are any errors in the included headers and that preamble is key
  1210. to getting fast completions.
  1211. Call the |:YcmDiags| command to see if any errors or warnings were detected in
  1212. your file.
  1213. -------------------------------------------------------------------------------
  1214. *youcompleteme-java-semantic-completion*
  1215. Java Semantic Completion ~
  1216. -------------------------------------------------------------------------------
  1217. *youcompleteme-java-quick-start*
  1218. Java Quick Start ~
  1219. 1. Ensure that you have enabled the Java completer. See the installation
  1220. guide for details.
  1221. 2. Create a project file (gradle or maven) file in the root directory of
  1222. your Java project, by following the instructions below.
  1223. 3. (Optional) Configure the LSP server. The jdt.ls configuration options
  1224. [59] can be found in their codebase.
  1225. 4. If you previously used Eclim or Syntastic for Java, disable them for
  1226. Java.
  1227. 5. Edit a Java file from your project.
  1228. -------------------------------------------------------------------------------
  1229. *youcompleteme-java-project-files*
  1230. Java Project Files ~
  1231. In order to provide semantic analysis, the Java completion engine requires
  1232. knowledge of your project structure. In particular, it needs to know the class
  1233. path to use, when compiling your code. Fortunately jdt.ls [17] supports eclipse
  1234. project files [60], maven projects [61] and gradle projects [62].
  1235. **NOTE:** Our recommendation is to use either Maven or Gradle projects.
  1236. -------------------------------------------------------------------------------
  1237. *youcompleteme-diagnostic-display-syntastic*
  1238. Diagnostic display - Syntastic ~
  1239. The native support for Java includes YCM's native real-time diagnostics
  1240. display. This can conflict with other diagnostics plugins like Syntastic, so
  1241. when enabling Java support, please **manually disable Syntastic Java
  1242. diagnostics**.
  1243. Add the following to your 'vimrc':
  1244. >
  1245. let g:syntastic_java_checkers = []
  1246. <
  1247. -------------------------------------------------------------------------------
  1248. *youcompleteme-diagnostic-display-eclim*
  1249. Diagnostic display - Eclim ~
  1250. The native support for Java includes YCM's native real-time diagnostics
  1251. display. This can conflict with other diagnostics plugins like Eclim, so when
  1252. enabling Java support, please **manually disable Eclim Java diagnostics**.
  1253. Add the following to your 'vimrc':
  1254. >
  1255. let g:EclimFileTypeValidate = 0
  1256. <
  1257. **NOTE**: We recommend disabling Eclim entirely when editing Java with YCM's
  1258. native Java support. This can be done temporarily with ':EclimDisable'.
  1259. -------------------------------------------------------------------------------
  1260. *youcompleteme-eclipse-projects*
  1261. Eclipse Projects ~
  1262. Eclipse-style projects require two files: .project [60] and .classpath [63].
  1263. If your project already has these files due to previously being set up within
  1264. Eclipse, then no setup is required. jdt.ls [17] should load the project just
  1265. fine (it's basically eclipse after all).
  1266. However, if not, it is possible (easy in fact) to craft them manually, though
  1267. it is not recommended. You're better off using Gradle or Maven (see below).
  1268. A simple eclipse style project example [64] can be found in the ycmd test
  1269. directory. Normally all that is required is to copy these files to the root of
  1270. your project and to edit the '.classpath' to add additional libraries, such as:
  1271. >
  1272. <classpathentry kind="lib" path="/path/to/external/jar" />
  1273. <classpathentry kind="lib" path="/path/to/external/java/source" />
  1274. <
  1275. It may also be necessary to change the directory in which your source files are
  1276. located (paths are relative to the .project file itself):
  1277. >
  1278. <classpathentry kind="src" output="target/classes" path="path/to/src/" />
  1279. <
  1280. **NOTE**: The eclipse project and classpath files are not a public interface
  1281. and it is highly recommended to use Maven or Gradle project definitions if you
  1282. don't already use Eclipse to manage your projects.
  1283. -------------------------------------------------------------------------------
  1284. *youcompleteme-maven-projects*
  1285. Maven Projects ~
  1286. Maven needs a file named pom.xml [61] in the root of the project. Once again a
  1287. simple pom.xml [65] can be found in the ycmd source.
  1288. The format of pom.xml [61] files is way beyond the scope of this document, but
  1289. we do recommend using the various tools that can generate them for you, if
  1290. you're not familiar with them already.
  1291. -------------------------------------------------------------------------------
  1292. *youcompleteme-gradle-projects*
  1293. Gradle Projects ~
  1294. Gradle projects require a build.gradle [62]. Again, there is a trivial example
  1295. in ycmd's tests [66].
  1296. The format of build.gradle [62] files are way beyond the scope of this
  1297. document, but we do recommend using the various tools that can generate them
  1298. for you if you're not familiar with them already.
  1299. Some users have experienced issues with their jdt.ls when using the Groovy
  1300. language for their build.gradle. As such, try using Kotlin [67] instead.
  1301. -------------------------------------------------------------------------------
  1302. *youcompleteme-troubleshooting*
  1303. Troubleshooting ~
  1304. If you're not getting completions or diagnostics, check the server health:
  1305. - The Java completion engine takes a while to start up and parse your
  1306. project. You should be able to see its progress in the command line, and
  1307. |:YcmDebugInfo|. Ensure that the following lines are present:
  1308. >
  1309. -- jdt.ls Java Language Server running
  1310. -- jdt.ls Java Language Server Startup Status: Ready
  1311. <
  1312. - If the above lines don't appear after a few minutes, check the jdt.ls and
  1313. ycmd log files using |:YcmToggleLogs|. The jdt.ls log file is called '.log'
  1314. (for some reason).
  1315. If you get a message about "classpath is incomplete", then make sure you have
  1316. correctly configured the project files.
  1317. If you get messages about unresolved imports, then make sure you have correctly
  1318. configured the project files, in particular check that the classpath is set
  1319. correctly.
  1320. -------------------------------------------------------------------------------
  1321. *youcompleteme-c-semantic-completion*
  1322. C# Semantic Completion ~
  1323. YCM relies on OmniSharp-Roslyn [13] to provide completion and code navigation.
  1324. OmniSharp-Roslyn needs a solution file for a C# project and there are two ways
  1325. of letting YCM know about your solution files.
  1326. -------------------------------------------------------------------------------
  1327. *youcompleteme-automatically-discovered-solution-files*
  1328. Automatically discovered solution files ~
  1329. YCM will scan all parent directories of the file currently being edited and
  1330. look for a file with '.sln' extension.
  1331. -------------------------------------------------------------------------------
  1332. *youcompleteme-manually-specified-solution-files*
  1333. Manually specified solution files ~
  1334. If YCM loads '.ycm_extra_conf.py' which contains 'CSharpSolutionFile' function,
  1335. YCM will try to use that to determine the solution file. This is useful when
  1336. one wants to override the default behaviour and specify a solution file that is
  1337. not in any of the parent directories of the currently edited file. Example:
  1338. >
  1339. def CSharpSolutionFile( filepath ):
  1340. # `filepath` is the path of the file user is editing
  1341. return '/path/to/solution/file' # Can be relative to the `.ycm_extra_conf.py`
  1342. <
  1343. If the path returned by 'CSharpSolutionFile' is not an actual file, YCM will
  1344. fall back to the other way of finding the file.
  1345. -------------------------------------------------------------------------------
  1346. *youcompleteme-use-with-.net-6.0-.net-sdks*
  1347. Use with .NET 6.0 and .NET SDKs ~
  1348. YCM ships with older version of OmniSharp-Roslyn based on Mono runtime. It is
  1349. possible to use it with .NET 6.0 and newer, but it requires manual setup.
  1350. 1. Download NET 6.0 version of the OmniSharp server for your system from
  1351. releases [68]
  1352. 2. Set |g:ycm_roslyn_binary_path| to the unpacked executable 'OmniSharp'
  1353. 3. Create a solution file if one doesn't already exist, it is currently
  1354. required by YCM for internal bookkeeping
  1355. 1. Run 'dotnet new sln' at the root of your project
  1356. 2. Run 'dotnet sln add <project1.csproj> <project2.csproj> ...' for
  1357. all of your projects
  1358. 4. Run |:YcmRestartServer|
  1359. -------------------------------------------------------------------------------
  1360. *youcompleteme-python-semantic-completion*
  1361. Python Semantic Completion ~
  1362. YCM relies on the Jedi [12] engine to provide completion and code navigation.
  1363. By default, it will pick the version of Python running the ycmd server [44] and
  1364. use its 'sys.path'. While this is fine for simple projects, this needs to be
  1365. configurable when working with virtual environments or in a project with
  1366. third-party packages. The next sections explain how to do that.
  1367. -------------------------------------------------------------------------------
  1368. *youcompleteme-working-with-virtual-environments*
  1369. Working with virtual environments ~
  1370. A common practice when working on a Python project is to install its
  1371. dependencies in a virtual environment and develop the project inside that
  1372. environment. To support this, YCM needs to know the interpreter path of the
  1373. virtual environment. You can specify it by creating a '.ycm_extra_conf.py' file
  1374. at the root of your project with the following contents:
  1375. >
  1376. def Settings( **kwargs ):
  1377. return {
  1378. 'interpreter_path': '/path/to/virtual/environment/python'
  1379. }
  1380. <
  1381. Here, '/path/to/virtual/environment/python' is the path to the Python used by
  1382. the virtual environment you are working in. Typically, the executable can be
  1383. found in the 'Scripts' folder of the virtual environment directory on Windows
  1384. and in the 'bin' folder on other platforms.
  1385. If you don't like having to create a '.ycm_extra_conf.py' file at the root of
  1386. your project and would prefer to specify the interpreter path with a Vim
  1387. option, read the Configuring through Vim options section.
  1388. -------------------------------------------------------------------------------
  1389. *youcompleteme-working-with-third-party-packages*
  1390. Working with third-party packages ~
  1391. Another common practice is to put the dependencies directly into the project
  1392. and add their paths to 'sys.path' at runtime in order to import them. YCM needs
  1393. to be told about this path manipulation to support those dependencies. This can
  1394. be done by creating a '.ycm_extra_conf.py' file at the root of the project.
  1395. This file must define a 'Settings( **kwargs )' function returning a dictionary
  1396. with the list of paths to prepend to 'sys.path' under the 'sys_path' key. For
  1397. instance, the following '.ycm_extra_conf.py' adds the paths
  1398. '/path/to/some/third_party/package' and '/path/to/another/third_party/package'
  1399. at the start of 'sys.path':
  1400. >
  1401. def Settings( **kwargs ):
  1402. return {
  1403. 'sys_path': [
  1404. '/path/to/some/third_party/package',
  1405. '/path/to/another/third_party/package'
  1406. ]
  1407. }
  1408. <
  1409. If you would rather prepend paths to 'sys.path' with a Vim option, read the
  1410. Configuring through Vim options section.
  1411. If you need further control on how to add paths to 'sys.path', you should
  1412. define the 'PythonSysPath( **kwargs )' function in the '.ycm_extra_conf.py'
  1413. file. Its keyword arguments are 'sys_path' which contains the default
  1414. 'sys.path', and 'interpreter_path' which is the path to the Python interpreter.
  1415. Here's a trivial example that inserts the '/path/to/third_party/package' path
  1416. at the second position of 'sys.path':
  1417. >
  1418. def PythonSysPath( **kwargs ):
  1419. sys_path = kwargs[ 'sys_path' ]
  1420. sys_path.insert( 1, '/path/to/third_party/package' )
  1421. return sys_path
  1422. <
  1423. A more advanced example can be found in YCM's own '.ycm_extra_conf.py' [69].
  1424. -------------------------------------------------------------------------------
  1425. *youcompleteme-configuring-through-vim-options*
  1426. Configuring through Vim options ~
  1427. You may find it inconvenient to have to create a '.ycm_extra_conf.py' file at
  1428. the root of each one of your projects in order to set the path to the Python
  1429. interpreter and/or add paths to 'sys.path' and would prefer to be able to
  1430. configure those through Vim options. Don't worry, this is possible by using the
  1431. |g:ycm_extra_conf_vim_data| option and creating a global extra configuration
  1432. file. Let's take an example. Suppose that you want to set the interpreter path
  1433. with the 'g:ycm_python_interpreter_path' option and prepend paths to 'sys.path'
  1434. with the 'g:ycm_python_sys_path' option. Suppose also that you want to name the
  1435. global extra configuration file 'global_extra_conf.py' and that you want to put
  1436. it in your HOME folder. You should then add the following lines to your vimrc:
  1437. >
  1438. let g:ycm_python_interpreter_path = ''
  1439. let g:ycm_python_sys_path = []
  1440. let g:ycm_extra_conf_vim_data = [
  1441. \ 'g:ycm_python_interpreter_path',
  1442. \ 'g:ycm_python_sys_path'
  1443. \]
  1444. let g:ycm_global_ycm_extra_conf = '~/global_extra_conf.py'
  1445. <
  1446. Then, create the '~/global_extra_conf.py' file with the following contents:
  1447. >
  1448. def Settings( **kwargs ):
  1449. client_data = kwargs[ 'client_data' ]
  1450. return {
  1451. 'interpreter_path': client_data[ 'g:ycm_python_interpreter_path' ],
  1452. 'sys_path': client_data[ 'g:ycm_python_sys_path' ]
  1453. }
  1454. <
  1455. That's it. You are done. Note that you don't need to restart the server when
  1456. setting one of the options. YCM will automatically pick the new values.
  1457. -------------------------------------------------------------------------------
  1458. *youcompleteme-rust-semantic-completion*
  1459. Rust Semantic Completion ~
  1460. YCM uses rust-analyzer [16] for Rust semantic completion.
  1461. NOTE: Previously, YCM used rls [70] for rust completion. This is no longer
  1462. supported, as the Rust community has decided on rust-analyzer [16] as the
  1463. future of Rust tooling.
  1464. Completions and GoTo commands within the current crate and its dependencies
  1465. should work out of the box with no additional configuration (provided that you
  1466. built YCM with the '--rust-completer' flag; see the _Installation_ section for
  1467. details). The install script takes care of installing the Rust source code
  1468. [71], so no configuration is necessary.
  1469. 'rust-analyzer' supports a myriad of options. These are configured using LSP
  1470. configuration, and are documented here [72].
  1471. -------------------------------------------------------------------------------
  1472. *youcompleteme-go-semantic-completion*
  1473. Go Semantic Completion ~
  1474. Completions and GoTo commands should work out of the box (provided that you
  1475. built YCM with the '--go-completer' flag; see the _Installation_ section for
  1476. details). The server only works for projects with the "canonical" layout.
  1477. 'gopls' also has a load of documented options [73].
  1478. You can set these in your '.ycm_extra_conf.py'. For example, to set the build
  1479. tags:
  1480. >
  1481. def Settings( **kwargs ):
  1482. if kwargs[ 'language' ] == 'go':
  1483. return {
  1484. 'ls': {
  1485. 'build.buildFlags': [ '-tags=debug' ] }
  1486. }
  1487. }
  1488. <
  1489. -------------------------------------------------------------------------------
  1490. *youcompleteme-javascript-typescript-semantic-completion*
  1491. JavaScript and TypeScript Semantic Completion ~
  1492. **NOTE:** YCM originally used the Tern [74] engine for JavaScript but due to
  1493. Tern [74] not being maintained anymore by its main author and the TSServer [15]
  1494. engine offering more features, YCM is moving to TSServer [15]. This won't
  1495. affect you if you were already using Tern [74] but you are encouraged to do the
  1496. switch by deleting the 'third_party/ycmd/third_party/tern_runtime/node_modules'
  1497. directory in YCM folder. If you are a new user but still want to use Tern [74],
  1498. you should pass the '--js-completer' option to the 'install.py' script during
  1499. installation. Further instructions on how to set up YCM with Tern [74] are
  1500. available on the wiki [75].
  1501. All JavaScript and TypeScript features are provided by the TSServer [15]
  1502. engine, which is included in the TypeScript SDK. To enable these features,
  1503. install Node.js 18+ and npm [32] and call the 'install.py' script with the
  1504. '--ts-completer' flag.
  1505. TSServer [15] relies on the 'jsconfig.json' file [76] for JavaScript and the
  1506. 'tsconfig.json' file [77] for TypeScript to analyze your project. Ensure the
  1507. file exists at the root of your project.
  1508. To get diagnostics in JavaScript, set the 'checkJs' option to 'true' in your
  1509. 'jsconfig.json' file:
  1510. >
  1511. {
  1512. "compilerOptions": {
  1513. "checkJs": true
  1514. }
  1515. }
  1516. <
  1517. -------------------------------------------------------------------------------
  1518. *youcompleteme-semantic-completion-for-other-languages*
  1519. Semantic Completion for Other Languages ~
  1520. C-family, C#, Go, Java, Python, Rust, and JavaScript/TypeScript languages are
  1521. supported natively by YouCompleteMe using the Clang [78], OmniSharp-Roslyn
  1522. [13], Gopls [14], jdt.ls [17], Jedi [12], rust-analyzer [16], and TSServer [15]
  1523. engines, respectively. Check the installation section for instructions to
  1524. enable these features if desired.
  1525. -------------------------------------------------------------------------------
  1526. *youcompleteme-plugging-an-arbitrary-lsp-server*
  1527. Plugging an arbitrary LSP server ~
  1528. Similar to other LSP clients, YCM can use an arbitrary LSP server with the help
  1529. of |g:ycm_language_server| option. An example of a value of this option would
  1530. be:
  1531. >
  1532. let g:ycm_language_server =
  1533. \ [
  1534. \ {
  1535. \ 'name': 'yaml',
  1536. \ 'cmdline': [ '/path/to/yaml/server/yaml-language-server', '--stdio' ],
  1537. \ 'filetypes': [ 'yaml' ]
  1538. \ },
  1539. \ {
  1540. \ 'name': 'csharp',
  1541. \ 'cmdline': [ 'OmniSharp', '-lsp' ],
  1542. \ 'filetypes': [ 'csharp' ],
  1543. \ 'project_root_files': [ '*.csproj', '*.sln' ]
  1544. \ },
  1545. \ {
  1546. \ 'name': 'godot',
  1547. \ 'filetypes': [ 'gdscript' ],
  1548. \ 'port': 6008,
  1549. \ 'project_root_files': [ 'project.godot' ]
  1550. \ }
  1551. \ ]
  1552. <
  1553. Each dictionary contains the following keys:
  1554. - 'name' (string, mandatory): When configuring a LSP server the value of the
  1555. 'name' key will be used as the "kwargs[ 'language' ]". Can be anything you
  1556. like.
  1557. - 'filetypes' (list of string, mandatory): List of Vim filetypes this server
  1558. should be used for.
  1559. - 'project_root_files' (list of string, optional): List of filenames to
  1560. search for when trying to determine the project's root. Uses python's
  1561. pathlib for glob matching.
  1562. - 'cmdline' (list of strings, optional): If supplied, the server is started
  1563. with this command line (each list element is a command line word).
  1564. Typically, the server should be started with STDIO communication. If not
  1565. supplied, 'port' must be supplied.
  1566. - 'port' (number, optional): If supplied, ycmd will connect to the server at
  1567. 'localhost:<port>' using TCP (remote servers are not supported).
  1568. - 'capabilities' (dict, optional): If supplied, this is a dictionary that is
  1569. merged with the LSP client capabilities reported to the language server.
  1570. This can be used to enable or disable certain features, such as the support
  1571. for configuration sections ('workspace/configuration').
  1572. See the LSP Examples [79] project for more examples of configuring the likes of
  1573. PHP, Ruby, Kotlin, and D.
  1574. -------------------------------------------------------------------------------
  1575. *youcompleteme-lsp-configuration*
  1576. LSP Configuration ~
  1577. Many LSP servers allow some level of user configuration. YCM enables this with
  1578. the help of '.ycm_extra_conf.py' files. Here's an example of jdt.ls user
  1579. examples of configuring the likes of PHP, Ruby, Kotlin, D, and many, many more.
  1580. >
  1581. def Settings( **kwargs ):
  1582. if kwargs[ 'language' ] == 'java':
  1583. return {
  1584. 'ls': {
  1585. 'java.format.onType.enabled': True
  1586. }
  1587. }
  1588. <
  1589. The 'ls' key tells YCM that the dictionary should be passed to the LSP server.
  1590. For each of the LSP server's configuration, you should look up the respective
  1591. server's documentation.
  1592. Some servers request settings from arbitrary 'sections' of configuration. There
  1593. is no concept of configuration sections in Vim, so you can specify an
  1594. additional 'config_sections' dictionary which maps section to a dictionary of
  1595. config required by the server. For example:
  1596. >
  1597. def Settings( **kwargs ):
  1598. if kwargs[ 'language' ] == 'java':
  1599. return {
  1600. 'ls': {
  1601. 'java.format.onType.enabled': True
  1602. },
  1603. 'config_sections': {
  1604. 'some section': {
  1605. 'some option': 'some value'
  1606. }
  1607. }
  1608. <
  1609. The sections and options/values are completely server-specific and rarely well
  1610. documented.
  1611. -------------------------------------------------------------------------------
  1612. *youcompleteme-using-omnifunc-for-semantic-completion*
  1613. Using 'omnifunc' for semantic completion ~
  1614. YCM will use your 'omnifunc' (see ':h omnifunc' in Vim) as a source for
  1615. semantic completions if it does not have a native semantic completion engine
  1616. for your file's filetype. Vim comes with rudimentary omnifuncs for various
  1617. languages like Ruby, PHP, etc. It depends on the language.
  1618. You can get a stellar omnifunc for Ruby with Eclim [80]. Just make sure you
  1619. have the _latest_ Eclim installed and configured (this means Eclim '>= 2.2.*'
  1620. and Eclipse '>= 4.2.*').
  1621. After installing Eclim remember to create a new Eclipse project within your
  1622. application by typing ':ProjectCreate <path-to-your-project> -n ruby' inside
  1623. Vim and don't forget to have "let g:EclimCompletionMethod = 'omnifunc'" in your
  1624. vimrc. This will make YCM and Eclim play nice; YCM will use Eclim's omnifuncs
  1625. as the data source for semantic completions and provide the auto-triggering and
  1626. subsequence-based matching (and other YCM features) on top of it.
  1627. -------------------------------------------------------------------------------
  1628. *youcompleteme-writing-new-semantic-completers*
  1629. Writing New Semantic Completers ~
  1630. You have two options here: writing an 'omnifunc' for Vim's omnicomplete system
  1631. that YCM will then use through its omni-completer, or a custom completer for
  1632. YCM using the Completer API [81].
  1633. Here are the differences between the two approaches:
  1634. - You have to use VimScript to write the omnifunc, but get to use Python to
  1635. write for the Completer API; this by itself should make you want to use the
  1636. API.
  1637. - The Completer API is a _much_ more powerful way to integrate with YCM and
  1638. it provides a wider set of features. For instance, you can make your
  1639. Completer query your semantic back-end in an asynchronous fashion, thus not
  1640. blocking Vim's GUI thread while your completion system is processing stuff.
  1641. This is impossible with VimScript. All of YCM's completers use the
  1642. Completer API.
  1643. - Performance with the Completer API is better since Python executes faster
  1644. than VimScript.
  1645. If you want to use the 'omnifunc' system, see the relevant Vim docs with ':h
  1646. complete-functions'. For the Completer API, see the API docs [81].
  1647. If you want to upstream your completer into YCM's source, you should use the
  1648. Completer API.
  1649. -------------------------------------------------------------------------------
  1650. *youcompleteme-diagnostic-display*
  1651. Diagnostic Display ~
  1652. YCM will display diagnostic notifications for the C-family, C#, Go, Java,
  1653. JavaScript, Rust, and TypeScript languages. Since YCM continuously recompiles
  1654. your file as you type, you'll get notified of errors and warnings in your file
  1655. as fast as possible.
  1656. Here are the various pieces of the diagnostic UI:
  1657. - Icons show up in the Vim gutter on lines that have a diagnostic.
  1658. - Regions of text related to diagnostics are highlighted (by default, a red
  1659. wavy underline in 'gvim' and a red background in 'vim').
  1660. - Moving the cursor to a line with a diagnostic echoes the diagnostic text.
  1661. - Vim's location list is automatically populated with diagnostic data (off by
  1662. default, see options).
  1663. The new diagnostics (if any) will be displayed the next time you press any key
  1664. on the keyboard. So if you stop typing and just wait for the new diagnostics to
  1665. come in, that _will not work_. You need to press some key for the GUI to
  1666. update.
  1667. Having to press a key to get the updates is unfortunate, but cannot be changed
  1668. due to the way Vim internals operate; there is no way that a background task
  1669. can update Vim's GUI after it has finished running. You _have to_ press a key.
  1670. This will make YCM check for any pending diagnostics updates.
  1671. You _can_ force a full, blocking compilation cycle with the
  1672. |:YcmForceCompileAndDiagnostics| command (you may want to map that command to a
  1673. key; try putting 'nnoremap <F5> :YcmForceCompileAndDiagnostics<CR>' in your
  1674. vimrc). Calling this command will force YCM to immediately recompile your file
  1675. and display any new diagnostics it encounters. Do note that recompilation with
  1676. this command may take a while and during this time the Vim GUI _will_ be
  1677. blocked.
  1678. YCM will display a short diagnostic message when you move your cursor to the
  1679. line with the error. You can get a detailed diagnostic message with the
  1680. '<leader>d' key mapping (can be changed in the options) YCM provides when your
  1681. cursor is on the line with the diagnostic.
  1682. You can also see the full diagnostic message for all the diagnostics in the
  1683. current file in Vim's 'locationlist', which can be opened with the ':lopen' and
  1684. ':lclose' commands (make sure you have set 'let
  1685. g:ycm_always_populate_location_list = 1' in your vimrc). A good way to toggle
  1686. the display of the 'locationlist' with a single key mapping is provided by
  1687. another (very small) Vim plugin called ListToggle [82] (which also makes it
  1688. possible to change the height of the 'locationlist' window), also written by
  1689. yours truly.
  1690. -------------------------------------------------------------------------------
  1691. *youcompleteme-diagnostic-highlighting-groups*
  1692. Diagnostic Highlighting Groups ~
  1693. You can change the styling for the highlighting groups YCM uses. For the signs
  1694. in the Vim gutter, the relevant groups are:
  1695. - 'YcmErrorSign', which falls back to group 'SyntasticErrorSign' and then
  1696. 'error' if they exist
  1697. - 'YcmWarningSign', which falls back to group 'SyntasticWarningSign' and then
  1698. 'todo' if they exist
  1699. You can also style the line that has the warning/error with these groups:
  1700. - 'YcmErrorLine', which falls back to group 'SyntasticErrorLine' if it exists
  1701. - 'YcmWarningLine', which falls back to group 'SyntasticWarningLine' if it
  1702. exists
  1703. Finally, you can also style the popup for the detailed diagnostics (it is shown
  1704. if |g:ycm_show_detailed_diag_in_popup| is set) using the group 'YcmErrorPopup',
  1705. which falls back to 'ErrorMsg'.
  1706. Note that the line highlighting groups only work when the
  1707. |g:ycm_enable_diagnostic_signs| option is set. If you want highlighted lines
  1708. but no signs in the Vim gutter, set the 'signcolumn' option to 'no' in your
  1709. vimrc:
  1710. >
  1711. set signcolumn=no
  1712. <
  1713. The syntax groups used to highlight regions of text with errors/warnings: -
  1714. 'YcmErrorSection', which falls back to group 'SyntasticError' if it exists and
  1715. then 'SpellBad' - 'YcmWarningSection', which falls back to group
  1716. 'SyntasticWarning' if it exists and then 'SpellCap'
  1717. Here's how you'd change the style for a group:
  1718. >
  1719. highlight YcmErrorLine guibg=#3f0000
  1720. <
  1721. -------------------------------------------------------------------------------
  1722. *youcompleteme-symbol-search*
  1723. Symbol Search ~
  1724. **_This feature requires Vim and is not supported in Neovim_**
  1725. YCM provides a way to search for and jump to a symbol in the current project or
  1726. document when using supported languages.
  1727. You can search for symbols in the current workspace when the 'GoToSymbol'
  1728. request is supported and the current document when |GoToDocumentOutline| is
  1729. supported.
  1730. Here's a quick demo:
  1731. Image: asciicast [83]
  1732. As you can see, you can type and YCM filters down the list as you type. The
  1733. current set of matches are displayed in a popup window in the centre of the
  1734. screen and you can select an entry with the keyboard, to jump to that position.
  1735. Any matches are then added to the quickfix list.
  1736. To enable:
  1737. - 'nmap <something> <Plug>(YCMFindSymbolInWorkspace)'
  1738. - 'nmap <something> <Plug>(YCMFindSymbolInDocument)'
  1739. e.g.
  1740. - 'nmap <leader>yfw <Plug>(YCMFindSymbolInWorkspace)'
  1741. - 'nmap <leader>yfd <Plug>(YCMFindSymbolInDocument)'
  1742. When searching, YCM opens a prompt buffer at the top of the screen for the
  1743. input and puts you in insert mode. This means that you can hit '<Esc>' to go
  1744. into normal mode and use any other input commands that are supported in prompt
  1745. buffers. As you type characters, the search is updated.
  1746. Initially, results are queried from all open filetypes. You can hit '<C-f>' to
  1747. switch to just the current filetype while the popup is open.
  1748. While the popup is open, the following keys are intercepted:
  1749. - '<C-j>', '<Down>', '<C-n>', '<Tab>' - select the next item
  1750. - '<C-k>', '<Up>', '<C-p>', '<S-Tab>' - select the previous item
  1751. - '<PageUp>', '<kPageUp>' - jump up one screenful of items
  1752. - '<PageDown>', '<kPageDown>' - jump down one screenful of items
  1753. - '<Home>', '<kHome>' - jump to first item
  1754. - '<End>', '<kEnd>' - jump to last item
  1755. - '<CR>' - jump to the selected item
  1756. - '<C-c>' cancel/dismiss the popup
  1757. - '<C-f>' - toggle results from all file types or just the current filetype
  1758. The search is also cancelled if you leave the prompt buffer window at any time,
  1759. so you can use window commands '<C-w>...' for example.
  1760. -------------------------------------------------------------------------------
  1761. *youcompleteme-closing-popup*
  1762. Closing the popup ~
  1763. **_NOTE_**: Pressing '<Esc>' does not close the popup - you must use 'Ctrl-c'
  1764. for that, or use a window command (e.g. '<Ctrl-w>j') or the mouse to leave the
  1765. prompt buffer window.
  1766. -------------------------------------------------------------------------------
  1767. *youcompleteme-type-call-hierarchy*
  1768. Type/Call Hierarchy ~
  1769. **_This feature requires Vim and is not supported in Neovim_**
  1770. **NOTE**: This feature is highly experimental and offered in the hope that it
  1771. is useful. Please help us by reporting issues and offering feedback.
  1772. YCM provides a way to view and navigate hierarchies. The following hierarchies
  1773. are supported:
  1774. - Type hierachy '<Plug>(YCMTypeHierarchy)': Display subtypes and supertypes
  1775. of the symbol under cursor. Expand down to subtypes and up to supertypes.
  1776. - Call hierarchy '<Plug>(YCMCallHierarchy)': Display callees and callers of
  1777. the symbol under cursor. Expand down to callers and up to callees.
  1778. Take a look at this Image: asciicast [85] for brief demo.
  1779. Hierarchy UI can be initiated by mapping something to the indicated plug
  1780. mappings, for example:
  1781. >
  1782. nmap <leader>yth <Plug>(YCMTypeHierarchy)
  1783. nmap <leader>ych <Plug>(YCMCallHierarchy)
  1784. <
  1785. This opens a "modal" popup showing the current element in the hierarchy tree.
  1786. The current tree root is aligned to the left and child and parent nodes are
  1787. expanded to the right. Expand the tree "down" with '<Tab> and "up" with'`.
  1788. The "root" of the tree can be re-focused to the selected item with '<S-Tab>'
  1789. and further '<S-Tab>' will show the parents of the selected item. This can take
  1790. a little getting used to, but it's particularly important with multiple
  1791. inheritance where a "child" of the current root may actually have other,
  1792. invisible, parent links. '<S-Tab>' on that row will show these by setting the
  1793. display root to the selected item.
  1794. When the hierarchy is displayed, the following keys are intercepted:
  1795. - '<Tab>': Drill into the hierarchy at the selected item: expand and show
  1796. children of the selected item.
  1797. - '<S-Tab>': Show parents of the selected item. When applied to sub-types,
  1798. this will re-root the tree at that type, so that all parent types (are
  1799. displayed). Similar for callers.
  1800. - '<CR>': Jump to the symbol currently selected.
  1801. - '<Down>', '<C-n>', '<C-j>', 'j': Select the next item
  1802. - '<Up>', '<C-p>', '<C-k>', 'k'; Select the previous item
  1803. - Any other key: closes the popup without jumping to any location
  1804. **Note:** you might think the call hierarchy tree is inverted, but we think
  1805. this way round is more intuitive because this is the typical way that call
  1806. stacks are displayed (with the current function at the top, and its callers
  1807. below).
  1808. -------------------------------------------------------------------------------
  1809. *youcompleteme-commands*
  1810. Commands ~
  1811. -------------------------------------------------------------------------------
  1812. The *:YcmRestartServer* command
  1813. If the ycmd completion server [44] suddenly stops for some reason, you can
  1814. restart it with this command.
  1815. -------------------------------------------------------------------------------
  1816. The *:YcmForceCompileAndDiagnostics* command
  1817. Calling this command will force YCM to immediately recompile your file and
  1818. display any new diagnostics it encounters. Do note that recompilation with this
  1819. command may take a while and during this time the Vim GUI _will_ be blocked.
  1820. You may want to map this command to a key; try putting 'nnoremap <F5>
  1821. :YcmForceCompileAndDiagnostics<CR>' in your vimrc.
  1822. -------------------------------------------------------------------------------
  1823. The *:YcmDiags* command
  1824. Calling this command will fill Vim's 'locationlist' with errors or warnings if
  1825. any were detected in your file and then open it. If a given error or warning
  1826. can be fixed by a call to ':YcmCompleter FixIt', then '(FixIt available)' is
  1827. appended to the error or warning text. See the |FixIt| completer subcommand for
  1828. more information.
  1829. **NOTE:** The absence of '(FixIt available)' does not strictly imply a fix-it
  1830. is not available as not all completers are able to provide this indication. For
  1831. example, the c-sharp completer provides many fix-its but does not add this
  1832. additional indication.
  1833. The |g:ycm_open_loclist_on_ycm_diags| option can be used to prevent the
  1834. location list from opening, but still have it filled with new diagnostic data.
  1835. See the _Options_ section for details.
  1836. -------------------------------------------------------------------------------
  1837. The *:YcmShowDetailedDiagnostic* command
  1838. This command shows the full diagnostic text when the user's cursor is on the
  1839. line with the diagnostic.
  1840. An options argument can be passed. If the argument is 'popup' the diagnostic
  1841. text will be displayed in a popup at the cursor position.
  1842. If you prefer the detailed diagnostic to always be shown in a popup, then 'let
  1843. g:ycm_show_detailed_diag_in_popup=1'.
  1844. -------------------------------------------------------------------------------
  1845. The *:YcmDebugInfo* command
  1846. This will print out various debug information for the current file. Useful to
  1847. see what compile commands will be used for the file if you're using the
  1848. semantic completion engine.
  1849. -------------------------------------------------------------------------------
  1850. The *:YcmToggleLogs* command
  1851. This command presents the list of logfiles created by YCM, the ycmd server
  1852. [44], and the semantic engine server for the current filetype, if any. One of
  1853. these logfiles can be opened in the editor (or closed if already open) by
  1854. entering the corresponding number or by clicking on it with the mouse.
  1855. Additionally, this command can take the logfile names as arguments. Use the
  1856. '<TAB>' key (or any other key defined by the 'wildchar' option) to complete the
  1857. arguments or to cycle through them (depending on the value of the 'wildmode'
  1858. option). Each logfile given as an argument is directly opened (or closed if
  1859. already open) in the editor. Only for debugging purposes.
  1860. -------------------------------------------------------------------------------
  1861. The *:YcmCompleter* command
  1862. This command gives access to a number of additional IDE-like features in YCM,
  1863. for things like semantic GoTo, type information, FixIt, and refactoring.
  1864. This command accepts a range that can either be specified through a selection
  1865. in one of Vim's visual modes (see ':h visual-use') or on the command line. For
  1866. instance, ':2,5YcmCompleter' will apply the command from line 2 to line 5. This
  1867. is useful for the |Format| subcommand.
  1868. Call 'YcmCompleter' without further arguments for a list of the commands you
  1869. can call for the current completer.
  1870. See the file type feature summary for an overview of the features available for
  1871. each file type. See the _YcmCompleter subcommands_ section for more information
  1872. on the available subcommands and their usage.
  1873. Some commands, like |Format| accept a range, like ':%YcmCompleter Format'.
  1874. Some commands like |GetDoc| and the various |GoTo| commands respect modifiers,
  1875. like ':rightbelow YcmCompleter GetDoc', ':vertical YcmCompleter GoTo'.
  1876. -------------------------------------------------------------------------------
  1877. *youcompleteme-ycmcompleter-subcommands*
  1878. YcmCompleter Subcommands ~
  1879. **NOTE:** See the docs for the 'YcmCompleter' command before tackling this
  1880. section.
  1881. The invoked subcommand is automatically routed to the currently active semantic
  1882. completer, so ':YcmCompleter GoToDefinition' will invoke the |GoToDefinition|
  1883. subcommand on the Python semantic completer if the currently active file is a
  1884. Python one and on the Clang completer if the currently active file is a
  1885. C-family language one.
  1886. You may also want to map the subcommands to something less verbose; for
  1887. instance, 'nnoremap <leader>jd :YcmCompleter GoTo<CR>' maps the '<leader>jd'
  1888. sequence to the longer subcommand invocation.
  1889. -------------------------------------------------------------------------------
  1890. *youcompleteme-goto-commands*
  1891. GoTo Commands ~
  1892. These commands are useful for jumping around and exploring code. When moving
  1893. the cursor, the subcommands add entries to Vim's 'jumplist' so you can use
  1894. 'CTRL-O' to jump back to where you were before invoking the command (and
  1895. 'CTRL-I' to jump forward; see ':h jumplist' for details). If there is more than
  1896. one destination, the quickfix list (see ':h quickfix') is populated with the
  1897. available locations and opened to the full width at the bottom of the screen.
  1898. You can change this behavior by using the |YcmQuickFixOpened| autocommand.
  1899. -------------------------------------------------------------------------------
  1900. The *GoToInclude* subcommand
  1901. Looks up the current line for a header and jumps to it.
  1902. Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
  1903. -------------------------------------------------------------------------------
  1904. The *GoToAlternateFile* subcommand
  1905. Jump to the associated file, as defined by the language server. Typically this
  1906. will jump you to the associated header file for a C or C++ translation unit.
  1907. Supported in filetypes: 'c, cpp, objc, objcpp, cuda' (clangd only)
  1908. -------------------------------------------------------------------------------
  1909. The *GoToDeclaration* subcommand
  1910. Looks up the symbol under the cursor and jumps to its declaration.
  1911. Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, go, java, javascript,
  1912. python, rust, typescript'
  1913. -------------------------------------------------------------------------------
  1914. The *GoToDefinition* subcommand
  1915. Looks up the symbol under the cursor and jumps to its definition.
  1916. **NOTE:** For C-family languages **this only works in certain situations**,
  1917. namely when the definition of the symbol is in the current translation unit. A
  1918. translation unit consists of the file you are editing and all the files you are
  1919. including with '#include' directives (directly or indirectly) in that file.
  1920. Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, go, java, javascript,
  1921. python, rust, typescript'
  1922. -------------------------------------------------------------------------------
  1923. The *GoTo* subcommand
  1924. This command tries to perform the "most sensible" GoTo operation it can.
  1925. Currently, this means that it tries to look up the symbol under the cursor and
  1926. jumps to its definition if possible; if the definition is not accessible from
  1927. the current translation unit, jumps to the symbol's declaration. For C-family
  1928. languages, it first tries to look up the current line for a header and jump to
  1929. it. For C#, implementations are also considered and preferred.
  1930. Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, go, java, javascript,
  1931. python, rust, typescript'
  1932. -------------------------------------------------------------------------------
  1933. The *GoToImprecise* subcommand
  1934. WARNING: This command trades correctness for speed!
  1935. Same as the |GoTo| command except that it doesn't recompile the file with
  1936. libclang before looking up nodes in the AST. This can be very useful when
  1937. you're editing files that take time to compile but you know that you haven't
  1938. made any changes since the last parse that would lead to incorrect jumps. When
  1939. you're just browsing around your codebase, this command can spare you quite a
  1940. bit of latency.
  1941. Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
  1942. -------------------------------------------------------------------------------
  1943. *GoToSymbol-symbol-query*
  1944. The 'GoToSymbol <symbol query>' subcommand ~
  1945. Finds the definition of all symbols matching a specified string. Note that this
  1946. does not use any sort of smart/fuzzy matching. However, an interactive symbol
  1947. search is also available.
  1948. Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, java, javascript,
  1949. python, typescript'
  1950. -------------------------------------------------------------------------------
  1951. The *GoToReferences* subcommand
  1952. This command attempts to find all of the references within the project to the
  1953. identifier under the cursor and populates the quickfix list with those
  1954. locations.
  1955. Supported in filetypes: 'c, cpp, objc, objcpp, cuda, java, javascript, python,
  1956. typescript, rust'
  1957. -------------------------------------------------------------------------------
  1958. The *GoToImplementation* subcommand
  1959. Looks up the symbol under the cursor and jumps to its implementation (i.e.
  1960. non-interface). If there are multiple implementations, instead provides a list
  1961. of implementations to choose from.
  1962. Supported in filetypes: 'cs, go, java, rust, typescript, javascript'
  1963. -------------------------------------------------------------------------------
  1964. The *GoToImplementationElseDeclaration* subcommand
  1965. Looks up the symbol under the cursor and jumps to its implementation if one,
  1966. else jump to its declaration. If there are multiple implementations, instead
  1967. provides a list of implementations to choose from.
  1968. Supported in filetypes: 'cs'
  1969. -------------------------------------------------------------------------------
  1970. The *GoToType* subcommand
  1971. Looks up the symbol under the cursor and jumps to the definition of its type
  1972. e.g. if the symbol is an object, go to the definition of its class.
  1973. Supported in filetypes: 'go, java, javascript, typescript'
  1974. -------------------------------------------------------------------------------
  1975. The *GoToDocumentOutline* subcommand
  1976. Provides a list of symbols in the current document, in the quickfix list. See
  1977. also interactive symbol search.
  1978. Supported in filetypes: 'c, cpp, objc, objcpp, cuda, go, java, rust'
  1979. -------------------------------------------------------------------------------
  1980. The *GoToCallers* and 'GoToCallees' subcommands
  1981. Note: A much more powerful call and type hierarchy can be viewd interactively.
  1982. See interactive type and call hierarchy.
  1983. Populate the quickfix list with the callers, or callees respectively, of the
  1984. function associated with the current cursor position. The semantics of this
  1985. differ depending on the filetype and language server.
  1986. Only supported for LSP servers that provide the 'callHierarchyProvider'
  1987. capability.
  1988. -------------------------------------------------------------------------------
  1989. *youcompleteme-semantic-information-commands*
  1990. Semantic Information Commands ~
  1991. These commands are useful for finding static information about the code, such
  1992. as the types of variables, viewing declarations, and documentation strings.
  1993. -------------------------------------------------------------------------------
  1994. The *GetType* subcommand
  1995. Echos the type of the variable or method under the cursor, and where it
  1996. differs, the derived type.
  1997. For example:
  1998. >
  1999. std::string s;
  2000. <
  2001. Invoking this command on 's' returns 'std::string => std::basic_string<char>'
  2002. **NOTE:** Causes re-parsing of the current translation unit.
  2003. Supported in filetypes: 'c, cpp, objc, objcpp, cuda, java, javascript, go,
  2004. python, typescript, rust'
  2005. -------------------------------------------------------------------------------
  2006. The *GetTypeImprecise* subcommand
  2007. WARNING: This command trades correctness for speed!
  2008. Same as the |GetType| command except that it doesn't recompile the file with
  2009. libclang before looking up nodes in the AST. This can be very useful when
  2010. you're editing files that take time to compile but you know that you haven't
  2011. made any changes since the last parse that would lead to incorrect type. When
  2012. you're just browsing around your codebase, this command can spare you quite a
  2013. bit of latency.
  2014. Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
  2015. -------------------------------------------------------------------------------
  2016. The *GetParent* subcommand
  2017. Echos the semantic parent of the point under the cursor.
  2018. The semantic parent is the item that semantically contains the given position.
  2019. For example:
  2020. >
  2021. class C {
  2022. void f();
  2023. };
  2024. void C::f() {
  2025. }
  2026. <
  2027. In the out-of-line definition of 'C::f', the semantic parent is the class 'C',
  2028. of which this function is a member.
  2029. In the example above, both declarations of 'C::f' have 'C' as their semantic
  2030. context, while the lexical context of the first 'C::f' is 'C' and the lexical
  2031. context of the second 'C::f' is the translation unit.
  2032. For global declarations, the semantic parent is the translation unit.
  2033. **NOTE:** Causes re-parsing of the current translation unit.
  2034. Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
  2035. -------------------------------------------------------------------------------
  2036. The *GetDoc* subcommand
  2037. Displays the preview window populated with quick info about the identifier
  2038. under the cursor. Depending on the file type, this includes things like:
  2039. - The type or declaration of identifier,
  2040. - Doxygen/javadoc comments,
  2041. - Python docstrings,
  2042. - etc.
  2043. The documentation is opened in the preview window, and options like
  2044. 'previewheight' are respected. If you would like to customise the height and
  2045. position of this window, we suggest a custom command that:
  2046. - Sets 'previewheight' temporarily
  2047. - Runs the |GetDoc| command with supplied modifiers
  2048. - Restores 'previewheight'.
  2049. For example:
  2050. >
  2051. command -count ShowDocWithSize
  2052. \ let g:ph=&previewheight
  2053. \ <bar> set previewheight=<count>
  2054. \ <bar> <mods> YcmCompleter GetDoc
  2055. \ <bar> let &previewheight=g:ph
  2056. <
  2057. You can then use something like ':botright vertical 80ShowDocWithSize'. Here's
  2058. an example of that: https://asciinema.org/a/hE6Pi1gU6omBShwFna8iwGEe9
  2059. Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, go, java, javascript,
  2060. python, typescript, rust'
  2061. -------------------------------------------------------------------------------
  2062. The *GetDocImprecise* subcommand
  2063. WARNING: This command trades correctness for speed!
  2064. Same as the |GetDoc| command except that it doesn't recompile the file with
  2065. libclang before looking up nodes in the AST. This can be very useful when
  2066. you're editing files that take long to compile but you know that you haven't
  2067. made any changes since the last parse that would lead to incorrect docs. When
  2068. you're just browsing around your codebase, this command can spare you quite a
  2069. bit of latency.
  2070. Supported in filetypes: 'c, cpp, objc, objcpp, cuda'
  2071. -------------------------------------------------------------------------------
  2072. *youcompleteme-refactoring-commands*
  2073. Refactoring Commands ~
  2074. These commands make changes to your source code in order to perform refactoring
  2075. or code correction. YouCompleteMe does not perform any action which cannot be
  2076. undone, and never saves or writes files to the disk.
  2077. -------------------------------------------------------------------------------
  2078. The *FixIt* subcommand
  2079. Where available, attempts to make changes to the buffer to correct diagnostics,
  2080. or perform refactoring, on the current line or selection. Where multiple
  2081. suggestions are available (such as when there are multiple ways to resolve a
  2082. given warning, or where multiple diagnostics are reported for the current line,
  2083. or multiple refactoring tweaks are available), the options are presented and
  2084. one can be selected.
  2085. Completers that provide diagnostics may also provide trivial modifications to
  2086. the source in order to correct the diagnostic. Examples include syntax errors
  2087. such as missing trailing semi-colons, spurious characters, or other errors
  2088. which the semantic engine can deterministically suggest corrections. A small
  2089. demo presenting how diagnostics can be fixed with clangd:
  2090. Image: YcmCompleter-FixIt-OnDiagnostic (see reference [87])
  2091. Completers (LSPs) may also provide refactoring tweaks, which may be available
  2092. even when no diagnostic is presented for the current line. These include
  2093. function extraction, variable extraction, 'switch' population, constructor
  2094. generation, ... The tweaks work for a selection as well. Consult your LSP for
  2095. available refactorings. A demonstration of refactoring capabilities with
  2096. clangd:
  2097. Image: YouCompleter-FixIt-Refactoring (see reference [88])
  2098. If no fix-it is available for the current line, or there is no diagnostic on
  2099. the current line, this command has no effect on the current buffer. If any
  2100. modifications are made, the number of changes made to the buffer is echo'd and
  2101. the user may use the editor's undo command to revert.
  2102. When a diagnostic is available, and |g:ycm_echo_current_diagnostic| is enabled,
  2103. then the text '(FixIt)' is appended to the echo'd diagnostic when the completer
  2104. is able to add this indication. The text '(FixIt available)' is also appended
  2105. to the diagnostic text in the output of the |:YcmDiags| command for any
  2106. diagnostics with available fix-its (where the completer can provide this
  2107. indication).
  2108. **NOTE:** Causes re-parsing of the current translation unit.
  2109. Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, go, java, javascript,
  2110. rust, typescript'
  2111. -------------------------------------------------------------------------------
  2112. *RefactorRename-new-name*
  2113. The 'RefactorRename <new name>' subcommand ~
  2114. In supported file types, this command attempts to perform a semantic rename of
  2115. the identifier under the cursor. This includes renaming declarations,
  2116. definitions, and usages of the identifier, or any other language-appropriate
  2117. action. The specific behavior is defined by the semantic engine in use.
  2118. Similar to |FixIt|, this command applies automatic modifications to your source
  2119. files. Rename operations may involve changes to multiple files, which may or
  2120. may not be open in Vim buffers at the time. YouCompleteMe handles all of this
  2121. for you. The behavior is described in the following section.
  2122. Supported in filetypes: 'c, cpp, objc, objcpp, cuda, java, javascript, python,
  2123. typescript, rust, cs'
  2124. -------------------------------------------------------------------------------
  2125. *youcompleteme-python-refactorings*
  2126. Python refactorings ~
  2127. The following additional commands are supported for Python:
  2128. - 'RefactorInline'
  2129. - 'RefactorExtractVariable'
  2130. - 'RefactorExtractFunction'
  2131. See the jedi docs [89] for what they do.
  2132. Supported in filetypes: 'python'
  2133. -------------------------------------------------------------------------------
  2134. *youcompleteme-multi-file-refactor*
  2135. Multi-file Refactor ~
  2136. When a Refactor or FixIt command touches multiple files, YouCompleteMe attempts
  2137. to apply those modifications to any existing open, visible buffer in the
  2138. current tab. If no such buffer can be found, YouCompleteMe opens the file in a
  2139. new small horizontal split at the top of the current window, applies the
  2140. change, and then _hides_ the window. **NOTE:** The buffer remains open, and
  2141. must be manually saved. A confirmation dialog is opened prior to doing this to
  2142. remind you that this is about to happen.
  2143. Once the modifications have been made, the quickfix list (see ':help quickfix')
  2144. is populated with the locations of all modifications. This can be used to
  2145. review all automatic changes made by using ':copen'. Typically, use the 'CTRL-W
  2146. <enter>' combination to open the selected file in a new split. It is possible
  2147. to customize how the quickfix window is opened by using the |YcmQuickFixOpened|
  2148. autocommand.
  2149. The buffers are _not_ saved automatically. That is, you must save the modified
  2150. buffers manually after reviewing the changes from the quickfix list. Changes
  2151. can be undone using Vim's powerful undo features (see ':help undo'). Note that
  2152. Vim's undo is per-buffer, so to undo all changes, the undo commands must be
  2153. applied in each modified buffer separately.
  2154. **NOTE:** While applying modifications, Vim may find files that are already
  2155. open and have a swap file. The command is aborted if you select Abort or Quit
  2156. in any such prompts. This leaves the Refactor operation partially complete and
  2157. must be manually corrected using Vim's undo features. The quickfix list is
  2158. _not_ populated in this case. Inspect ':buffers' or equivalent (see ':help
  2159. buffers') to see the buffers that were opened by the command.
  2160. -------------------------------------------------------------------------------
  2161. The *Format* subcommand
  2162. This command formats the whole buffer or some part of it according to the value
  2163. of the Vim options 'shiftwidth' and 'expandtab' (see ":h 'sw'" and ':h et'
  2164. respectively). To format a specific part of your document, you can either
  2165. select it in one of Vim's visual modes (see ':h visual-use') and run the
  2166. command or directly enter the range on the command line, e.g. ':2,5YcmCompleter
  2167. Format' to format it from line 2 to line 5.
  2168. Supported in filetypes: 'c, cpp, objc, objcpp, cuda, java, javascript, go,
  2169. typescript, rust, cs'
  2170. -------------------------------------------------------------------------------
  2171. The *OrganizeImports* subcommand
  2172. This command removes unused imports and sorts imports in the current file. It
  2173. can also group imports from the same module in TypeScript and resolve imports
  2174. in Java.
  2175. Supported in filetypes: 'java, javascript, typescript'
  2176. -------------------------------------------------------------------------------
  2177. *youcompleteme-miscellaneous-commands*
  2178. Miscellaneous Commands ~
  2179. These commands are for general administration, rather than IDE-like features.
  2180. They cover things like the semantic engine server instance and compilation
  2181. flags.
  2182. -------------------------------------------------------------------------------
  2183. *ExecuteCommand-args*
  2184. The 'ExecuteCommand <args>' subcommand ~
  2185. Some LSP completers (currently only Java completers) support executing
  2186. server-specific commands. Consult the jdt.ls [17] documentation to find out
  2187. what commands are supported and which arguments are expected.
  2188. The support for 'ExecuteCommand' was implemented to support plugins like
  2189. Vimspector [90] to debug java, but isn't limited to that specific use case.
  2190. -------------------------------------------------------------------------------
  2191. The *RestartServer* subcommand
  2192. Restarts the downstream semantic engine server for those semantic engines that
  2193. work as separate servers that YCM talks to.
  2194. Supported in filetypes: 'c, cpp, objc, objcpp, cuda, cs, go, java, javascript,
  2195. rust, typescript'
  2196. -------------------------------------------------------------------------------
  2197. The *ReloadSolution* subcommand
  2198. Instruct the Omnisharp-Roslyn server to clear its cache and reload all files
  2199. from the disk. This is useful when files are added, removed, or renamed in the
  2200. solution, files are changed outside of Vim, or whenever Omnisharp-Roslyn cache
  2201. is out-of-sync.
  2202. Supported in filetypes: 'cs'
  2203. -------------------------------------------------------------------------------
  2204. *youcompleteme-functions*
  2205. Functions ~
  2206. -------------------------------------------------------------------------------
  2207. The *youcompleteme#GetErrorCount* function
  2208. Get the number of YCM Diagnostic errors. If no errors are present, this
  2209. function returns 0.
  2210. For example:
  2211. >
  2212. call youcompleteme#GetErrorCount()
  2213. <
  2214. Both this function and |youcompleteme#GetWarningCount| can be useful when
  2215. integrating YCM with other Vim plugins. For example, a lightline [91] user
  2216. could add a diagnostics section to their statusline which would display the
  2217. number of errors and warnings.
  2218. -------------------------------------------------------------------------------
  2219. The *youcompleteme#GetWarningCount* function
  2220. Get the number of YCM Diagnostic warnings. If no warnings are present, this
  2221. function returns 0.
  2222. For example:
  2223. >
  2224. call youcompleteme#GetWarningCount()
  2225. <
  2226. -------------------------------------------------------------------------------
  2227. *youcompleteme#GetCommandResponse()*
  2228. The 'youcompleteme#GetCommandResponse( ... )' function ~
  2229. Run a completer subcommand and return the result as a string. This can be
  2230. useful for example to display the |GetDoc| output in a popup window, e.g.:
  2231. >
  2232. let s:ycm_hover_popup = -1
  2233. function s:Hover()
  2234. let response = youcompleteme#GetCommandResponse( 'GetDoc' )
  2235. if response == ''
  2236. return
  2237. endif
  2238. call popup_hide( s:ycm_hover_popup )
  2239. let s:ycm_hover_popup = popup_atcursor( balloon_split( response ), {} )
  2240. endfunction
  2241. " CursorHold triggers in normal mode after a delay
  2242. autocmd CursorHold * call s:Hover()
  2243. " Or, if you prefer, a mapping:
  2244. nnoremap <silent> <leader>D :call <SID>Hover()<CR>
  2245. <
  2246. **NOTE**: This is only an example, for real hover support, see
  2247. |g:ycm_auto_hover|.
  2248. If the completer subcommand result is not a string (for example, it's a FixIt
  2249. or a Location), or if the completer subcommand raises an error, an empty string
  2250. is returned, so that calling code does not have to check for complex error
  2251. conditions.
  2252. The arguments to the function are the same as the arguments to the
  2253. |:YcmCompleter| ex command, e.g. the name of the subcommand, followed by any
  2254. additional subcommand arguments. As with the 'YcmCompleter' command, if the
  2255. first argument is 'ft=<filetype>' the request is targeted at the specified
  2256. filetype completer. This is an advanced usage and not necessary in most cases.
  2257. NOTE: The request is run synchronously and blocks Vim until the response is
  2258. received, so we do not recommend running this as part of an autocommand that
  2259. triggers frequently.
  2260. -------------------------------------------------------------------------------
  2261. *youcompleteme#GetCommandResponseAsync()*
  2262. The 'youcompleteme#GetCommandResponseAsync( callback, ... )' function ~
  2263. This works exactly like 'youcompleteme#GetCommandResponse', except that instead
  2264. of returning the result, you supply a 'callback' argument. This argument must
  2265. be a 'FuncRef' to a function taking a single argument 'response'. This callback
  2266. will be called with the command response at some point later, or immediately.
  2267. As with |youcompleteme#GetCommandResponse()|, this function will call the
  2268. callback with "''" (an empty string) if the request is not sent, or if there
  2269. was some sort of error.
  2270. Here's an example that's similar to the one above:
  2271. >
  2272. let s:ycm_hover_popup = -1
  2273. function! s:ShowDataPopup( response ) abort
  2274. if response == ''
  2275. return
  2276. endif
  2277. call popup_hide( s:ycm_hover_popup )
  2278. let s:ycm_hover_popup = popup_atcursor( balloon_split( response ), {} )
  2279. endfunction
  2280. function! s:GetData() abort
  2281. call youcompleteme#GetCommandResponseAsync(
  2282. \ function( 's:ShowDataPopup' ),
  2283. \ 'GetDoc' )
  2284. endfunction
  2285. autocommand CursorHold * call s:GetData()
  2286. <
  2287. Again, see |g:ycm_auto_hover| for proper hover support.
  2288. **NOTE**: The callback may be called immediately, in the stack frame that
  2289. called this function.
  2290. **NOTE**: Only one command request can be outstanding at once. Attempting to
  2291. request a second response while the first is outstanding will result in the
  2292. second callback being immediately called with "''".
  2293. -------------------------------------------------------------------------------
  2294. *youcompleteme-autocommands*
  2295. Autocommands ~
  2296. -------------------------------------------------------------------------------
  2297. The *YcmLocationOpened* autocommand
  2298. This 'User' autocommand is fired when YCM opens the location list window in
  2299. response to the 'YcmDiags' command. By default, the location list window is
  2300. opened to the bottom of the current window and its height is set to fit all
  2301. entries. This behavior can be overridden by using the |YcmLocationOpened|
  2302. autocommand which is triggered while the cursor is in the location list window.
  2303. For instance:
  2304. >
  2305. function! s:CustomizeYcmLocationWindow()
  2306. " Move the window to the top of the screen.
  2307. wincmd K
  2308. " Set the window height to 5.
  2309. 5wincmd _
  2310. " Switch back to the working window.
  2311. wincmd p
  2312. endfunction
  2313. autocmd User YcmLocationOpened call s:CustomizeYcmLocationWindow()
  2314. <
  2315. -------------------------------------------------------------------------------
  2316. The *YcmQuickFixOpened* autocommand
  2317. This 'User' autocommand is fired when YCM opens the quickfix window in response
  2318. to the 'GoTo*' and 'RefactorRename' subcommands. By default, the quickfix
  2319. window is opened to full width at the bottom of the screen and its height is
  2320. set to fit all entries. This behavior can be overridden by using the
  2321. |YcmQuickFixOpened| autocommand which is triggered while the cursor is in the
  2322. quickfix window. For instance:
  2323. >
  2324. function! s:CustomizeYcmQuickFixWindow()
  2325. " Move the window to the top of the screen.
  2326. wincmd K
  2327. " Set the window height to 5.
  2328. 5wincmd _
  2329. endfunction
  2330. autocmd User YcmQuickFixOpened call s:CustomizeYcmQuickFixWindow()
  2331. <
  2332. -------------------------------------------------------------------------------
  2333. Options ~
  2334. All options have reasonable defaults so if the plug-in works after installation
  2335. you don't need to change any options. These options can be configured in your
  2336. vimrc script [37] by including a line like this:
  2337. >
  2338. let g:ycm_min_num_of_chars_for_completion = 1
  2339. <
  2340. Note that after changing an option in your vimrc script [37] you have to
  2341. restart ycmd [44] with the |:YcmRestartServer| command for the changes to take
  2342. effect.
  2343. -------------------------------------------------------------------------------
  2344. The *g:ycm_min_num_of_chars_for_completion* option
  2345. This option controls the number of characters the user needs to type before
  2346. identifier-based completion suggestions are triggered. For example, if the
  2347. option is set to '2', then when the user types a second alphanumeric character
  2348. after a whitespace character, completion suggestions will be triggered. This
  2349. option is NOT used for semantic completion.
  2350. Setting this option to a high number like '99' effectively turns off the
  2351. identifier completion engine and just leaves the semantic engine.
  2352. Default: '2'
  2353. >
  2354. let g:ycm_min_num_of_chars_for_completion = 2
  2355. <
  2356. -------------------------------------------------------------------------------
  2357. The *g:ycm_min_num_identifier_candidate_chars* option
  2358. This option controls the minimum number of characters that a completion
  2359. candidate coming from the identifier completer must have to be shown in the
  2360. popup menu.
  2361. A special value of '0' means there is no limit.
  2362. **NOTE:** This option only applies to the identifier completer; it has no
  2363. effect on the various semantic completers.
  2364. Default: '0'
  2365. >
  2366. let g:ycm_min_num_identifier_candidate_chars = 0
  2367. <
  2368. -------------------------------------------------------------------------------
  2369. The *g:ycm_max_num_candidates* option
  2370. This option controls the maximum number of semantic completion suggestions
  2371. shown in the completion menu. This only applies to suggestions from semantic
  2372. completion engines; see the 'g:ycm_max_identifier_candidates' option to limit
  2373. the number of suggestions from the identifier-based engine.
  2374. A special value of '0' means there is no limit.
  2375. **NOTE:** Setting this option to '0' or to a value greater than '100' is not
  2376. recommended as it will slow down completion when there is a very large number
  2377. of suggestions.
  2378. Default: '50'
  2379. >
  2380. let g:ycm_max_num_candidates = 50
  2381. <
  2382. -------------------------------------------------------------------------------
  2383. The *g:ycm_max_num_candidates_to_detail* option
  2384. Some completion engines require completion candidates to be 'resolved' in order
  2385. to get detailed info such as inline documentation, method signatures, etc. This
  2386. information is displayed by YCM in the preview window, or if 'completeopt'
  2387. contains 'popup', in the info popup next to the completion menu.
  2388. By default, if the info popup is in use, and there are more than 10 candidates,
  2389. YCM will defer resolving candidates until they are selected in the completion
  2390. menu. Otherwise, YCM must resolve the details upfront, which can be costly.
  2391. If neither 'popup' nor 'preview' are in 'completeopt', YCM disables resolving
  2392. altogether as the information would not be displayed.
  2393. This setting can be used to override these defaults and controls the number of
  2394. completion candidates that should be resolved upfront. Typically users do not
  2395. need to change this, as YCM will work out an appropriate value based on your
  2396. 'completeopt' and |g:ycm_add_preview_to_completeopt| settings. However, you may
  2397. override this calculation by setting this value to a number:
  2398. - '-1' - Resolve all candidates upfront
  2399. - '0' - Never resolve any candidates upfront.
  2400. - '> 0' - Resolve up to this many candidates upfront. If the number of
  2401. candidates is greater than this value, no candidates are resolved.
  2402. In the latter two cases, if 'completeopt' contains 'popup', then candidates are
  2403. resolved on demand asynchronously.
  2404. Default:
  2405. - '0' if neither 'popup' nor 'preview' are in 'completeopt'.
  2406. - '10' if 'popup' is in completeopt.
  2407. - '-1' if 'preview' is in completeopt.
  2408. Example:
  2409. >
  2410. let g:ycm_max_num_candidates_to_detail = 0
  2411. <
  2412. -------------------------------------------------------------------------------
  2413. The *g:ycm_max_num_identifier_candidates* option
  2414. This option controls the maximum number of completion suggestions from the
  2415. identifier-based engine shown in the completion menu.
  2416. A special value of '0' means there is no limit.
  2417. **NOTE:** Setting this option to '0' or to a value greater than '100' is not
  2418. recommended as it will slow down completion when there is a very large number
  2419. of suggestions.
  2420. Default: '10'
  2421. >
  2422. let g:ycm_max_num_identifier_candidates = 10
  2423. <
  2424. -------------------------------------------------------------------------------
  2425. The *g:ycm_auto_trigger* option
  2426. When set to '0', this option turns off YCM's identifier completer (the
  2427. as-you-type popup) _and_ the semantic triggers (the popup you'd get after
  2428. typing '.' or '->' in say C++). You can still force semantic completion with
  2429. the '<C-Space>' shortcut.
  2430. If you want to just turn off the identifier completer but keep the semantic
  2431. triggers, you should set |g:ycm_min_num_of_chars_for_completion| to a high
  2432. number like '99'.
  2433. When |g:ycm_auto_trigger| is '0', YCM sets the 'completefunc', so that you can
  2434. manually trigger normal completion using 'C-x C-u'.
  2435. If you want to map something else to trigger completion, such as 'C-d', then
  2436. you can map it to '<plug>(YCMComplete)'. For example:
  2437. >
  2438. let g:ycm_auto_trigger = 0
  2439. imap <c-d> <plug>(YCMComplete)
  2440. <
  2441. NOTE: It's not possible to map one of the keys in
  2442. |g:ycm_key_list_select_completion| (or similar) to '<plug>(YCMComplete)'. In
  2443. practice that means that you can't use '<Tab>' for this.
  2444. Default: '1'
  2445. >
  2446. let g:ycm_auto_trigger = 1
  2447. <
  2448. -------------------------------------------------------------------------------
  2449. The *g:ycm_filetype_whitelist* option
  2450. This option controls for which Vim filetypes (see ':h filetype') should YCM be
  2451. turned on. The option value should be a Vim dictionary with keys being filetype
  2452. strings (like 'python', 'cpp', etc.) and values being unimportant (the
  2453. dictionary is used like a hash set, meaning that only the keys matter).
  2454. The '*' key is special and matches all filetypes. By default, the whitelist
  2455. contains only this '*' key.
  2456. YCM also has a |g:ycm_filetype_blacklist| option that lists filetypes for which
  2457. YCM shouldn't be turned on. YCM will work only in filetypes that both the
  2458. whitelist and the blacklist allow (the blacklist "allows" a filetype by _not_
  2459. having it as a key).
  2460. For example, let's assume you want YCM to work in files with the 'cpp'
  2461. filetype. The filetype should then be present in the whitelist either directly
  2462. ('cpp' key in the whitelist) or indirectly through the special '*' key. It
  2463. should _not_ be present in the blacklist.
  2464. Filetypes that are blocked by either of the lists will be completely ignored by
  2465. YCM, meaning that neither the identifier-based completion engine nor the
  2466. semantic engine will operate in them.
  2467. You can get the filetype of the current file in Vim with ':set ft?'.
  2468. Default: "{'*': 1}"
  2469. >
  2470. let g:ycm_filetype_whitelist = {'*': 1}
  2471. <
  2472. **Completion in buffers with no filetype**
  2473. There is one exception to the above rule. YCM supports completion in buffers
  2474. with no filetype set, but this must be _explicitly_ whitelisted. To identify
  2475. buffers with no filetype, we use the 'ycm_nofiletype' pseudo-filetype. To
  2476. enable completion in buffers with no filetype, set:
  2477. >
  2478. let g:ycm_filetype_whitelist = {
  2479. \ '*': 1,
  2480. \ 'ycm_nofiletype': 1
  2481. \ }
  2482. <
  2483. -------------------------------------------------------------------------------
  2484. The *g:ycm_filetype_blacklist* option
  2485. This option controls for which Vim filetypes (see ':h filetype') should YCM be
  2486. turned off. The option value should be a Vim dictionary with keys being
  2487. filetype strings (like 'python', 'cpp', etc.) and values being unimportant (the
  2488. dictionary is used like a hash set, meaning that only the keys matter).
  2489. See the |g:ycm_filetype_whitelist| option for more details on how this works.
  2490. Default: '[see next line]'
  2491. >
  2492. let g:ycm_filetype_blacklist = {
  2493. \ 'tagbar': 1,
  2494. \ 'notes': 1,
  2495. \ 'markdown': 1,
  2496. \ 'netrw': 1,
  2497. \ 'unite': 1,
  2498. \ 'text': 1,
  2499. \ 'vimwiki': 1,
  2500. \ 'pandoc': 1,
  2501. \ 'infolog': 1,
  2502. \ 'leaderf': 1,
  2503. \ 'mail': 1
  2504. \}
  2505. <
  2506. In addition, 'ycm_nofiletype' (representing buffers with no filetype set) is
  2507. blacklisted if 'ycm_nofiletype' is not _explicitly_ whitelisted (using
  2508. |g:ycm_filetype_whitelist|).
  2509. -------------------------------------------------------------------------------
  2510. The *g:ycm_filetype_specific_completion_to_disable* option
  2511. This option controls for which Vim filetypes (see ':h filetype') should the YCM
  2512. semantic completion engine be turned off. The option value should be a Vim
  2513. dictionary with keys being filetype strings (like 'python', 'cpp', etc.) and
  2514. values being unimportant (the dictionary is used like a hash set, meaning that
  2515. only the keys matter). The listed filetypes will be ignored by the YCM semantic
  2516. completion engine, but the identifier-based completion engine will still
  2517. trigger in files of those filetypes.
  2518. Note that even if semantic completion is not turned off for a specific
  2519. filetype, you will not get semantic completion if the semantic engine does not
  2520. support that filetype.
  2521. You can get the filetype of the current file in Vim with ':set ft?'.
  2522. Default: '[see next line]'
  2523. >
  2524. let g:ycm_filetype_specific_completion_to_disable = {
  2525. \ 'gitcommit': 1
  2526. \}
  2527. <
  2528. -------------------------------------------------------------------------------
  2529. The *g:ycm_filepath_blacklist* option
  2530. This option controls for which Vim filetypes (see ':h filetype') should
  2531. filepath completion be disabled. The option value should be a Vim dictionary
  2532. with keys being filetype strings (like 'python', 'cpp', etc.) and values being
  2533. unimportant (the dictionary is used like a hash set, meaning that only the keys
  2534. matter).
  2535. The '*' key is special and matches all filetypes. Use this key if you want to
  2536. completely disable filepath completion:
  2537. >
  2538. let g:ycm_filepath_blacklist = {'*': 1}
  2539. <
  2540. You can get the filetype of the current file in Vim with ':set ft?'.
  2541. Default: '[see next line]'
  2542. >
  2543. let g:ycm_filepath_blacklist = {
  2544. \ 'html': 1,
  2545. \ 'jsx': 1,
  2546. \ 'xml': 1,
  2547. \}
  2548. <
  2549. -------------------------------------------------------------------------------
  2550. The *g:ycm_show_diagnostics_ui* option
  2551. When set, this option turns on YCM's diagnostic display features. See the
  2552. _Diagnostic display_ section in the _User Manual_ for more details.
  2553. Specific parts of the diagnostics UI (like the gutter signs, text highlighting,
  2554. diagnostic echo, and auto location list population) can be individually turned
  2555. on or off. See the other options below for details.
  2556. Note that YCM's diagnostics UI is only supported for C-family languages.
  2557. When set, this option also makes YCM remove all Syntastic checkers set for the
  2558. 'c', 'cpp', 'objc', 'objcpp', and 'cuda' filetypes since this would conflict
  2559. with YCM's own diagnostics UI.
  2560. If you're using YCM's identifier completer in C-family languages but cannot use
  2561. the clang-based semantic completer for those languages _and_ want to use the
  2562. GCC Syntastic checkers, unset this option.
  2563. Default: '1'
  2564. >
  2565. let g:ycm_show_diagnostics_ui = 1
  2566. <
  2567. -------------------------------------------------------------------------------
  2568. The *g:ycm_error_symbol* option
  2569. YCM will use the value of this option as the symbol for errors in the Vim
  2570. gutter.
  2571. This option is part of the Syntastic compatibility layer; if the option is not
  2572. set, YCM will fall back to the value of the 'g:syntastic_error_symbol' option
  2573. before using this option's default.
  2574. Default: '>>'
  2575. >
  2576. let g:ycm_error_symbol = '>>'
  2577. <
  2578. -------------------------------------------------------------------------------
  2579. The *g:ycm_warning_symbol* option
  2580. YCM will use the value of this option as the symbol for warnings in the Vim
  2581. gutter.
  2582. This option is part of the Syntastic compatibility layer; if the option is not
  2583. set, YCM will fall back to the value of the 'g:syntastic_warning_symbol' option
  2584. before using this option's default.
  2585. Default: '>>'
  2586. >
  2587. let g:ycm_warning_symbol = '>>'
  2588. <
  2589. -------------------------------------------------------------------------------
  2590. The *g:ycm_enable_diagnostic_signs* option
  2591. When this option is set, YCM will put icons in Vim's gutter on lines that have
  2592. a diagnostic set. Turning this off will also turn off the 'YcmErrorLine' and
  2593. 'YcmWarningLine' highlighting.
  2594. This option is part of the Syntastic compatibility layer; if the option is not
  2595. set, YCM will fall back to the value of the 'g:syntastic_enable_signs' option
  2596. before using this option's default.
  2597. Default: '1'
  2598. >
  2599. let g:ycm_enable_diagnostic_signs = 1
  2600. <
  2601. -------------------------------------------------------------------------------
  2602. The *g:ycm_enable_diagnostic_highlighting* option
  2603. When this option is set, YCM will highlight regions of text that are related to
  2604. the diagnostic that is present on a line, if any.
  2605. This option is part of the Syntastic compatibility layer; if the option is not
  2606. set, YCM will fall back to the value of the 'g:syntastic_enable_highlighting'
  2607. option before using this option's default.
  2608. Default: '1'
  2609. >
  2610. let g:ycm_enable_diagnostic_highlighting = 1
  2611. <
  2612. -------------------------------------------------------------------------------
  2613. The *g:ycm_echo_current_diagnostic* option
  2614. When this option is set to 1, YCM will echo the text of the diagnostic present
  2615. on the current line when you move your cursor to that line. If a |FixIt| is
  2616. available for the current diagnostic, then '(FixIt)' is appended.
  2617. If you have a Vim that supports virtual text, you can set this option to the
  2618. string 'virtual-text', and the diagnostic will be displayed inline with the
  2619. text, right aligned in the window and wrapping to the next line if there is not
  2620. enough space, for example:
  2621. Image: Virtual text diagnostic demo (see reference [92])
  2622. Image: Virtual text diagnostic demo (see reference [93])
  2623. **NOTE**: It's _strongly_ recommended to also set
  2624. |g:ycm_update_diagnostics_in_insert_mode| to '0' when using 'virtual-text' for
  2625. diagnostics. This is due to the increased amount of distraction provided by
  2626. drawing diagnostics next to your input position.
  2627. This option is part of the Syntastic compatibility layer; if the option is not
  2628. set, YCM will fall back to the value of the 'g:syntastic_echo_current_error'
  2629. option before using this option's default.
  2630. Default: '1'
  2631. Valid values:
  2632. - '0' - disabled
  2633. - '1' - echo diagnostic to the command area
  2634. - "'virtual-text'" - display the dignostic to the right of the line in the
  2635. window using virtual text
  2636. >
  2637. let g:ycm_echo_current_diagnostic = 1
  2638. " Or, when you have Vim supporting virtual text
  2639. let g:ycm_echo_current_diagnostic = 'virtual-text'
  2640. <
  2641. -------------------------------------------------------------------------------
  2642. The *g:ycm_auto_hover* option
  2643. This option controls whether or not YCM shows documentation in a popup at the
  2644. cursor location after a short delay. Only supported in Vim.
  2645. When this option is set to "'CursorHold'", the popup is displayed on the
  2646. 'CursorHold' autocommand. See ':help CursorHold' for the details, but this
  2647. means that it is displayed after 'updatetime' milliseconds. When set to an
  2648. empty string, the popup is not automatically displayed.
  2649. In addition to this setting, there is the '<plug>(YCMHover)' mapping, which can
  2650. be used to manually trigger or hide the popup (it works like a toggle). For
  2651. example:
  2652. >
  2653. nmap <leader>D <plug>(YCMHover)
  2654. <
  2655. After dismissing the popup with this mapping, it will not be automatically
  2656. triggered again until the cursor is moved (i.e. 'CursorMoved' autocommand).
  2657. The displayed documentation depends on what the completer for the current
  2658. language supports. It's selected heuristically in this order of preference:
  2659. 1. 'GetHover' with 'markdown' syntax
  2660. 2. |GetDoc| with no syntax
  2661. 3. |GetType| with the syntax of the current file.
  2662. You can customise this by manually setting up 'b:ycm_hover' to your liking.
  2663. This buffer-local variable can be set to a dictionary with the following keys:
  2664. - 'command': The YCM completer subcommand which should be run on hover
  2665. - 'syntax': The syntax to use (as in 'set syntax=') in the popup window for
  2666. highlighting.
  2667. - 'popup_params': The params passed to a popup window which gets opened.
  2668. For example, to use C/C++ syntax highlighting in the popup for C-family
  2669. languages, add something like this to your vimrc:
  2670. >
  2671. augroup MyYCMCustom
  2672. autocmd!
  2673. autocmd FileType c,cpp let b:ycm_hover = {
  2674. \ 'command': 'GetDoc',
  2675. \ 'syntax': &filetype
  2676. \ }
  2677. augroup END
  2678. <
  2679. You can also modify the opened popup with 'popup_params' key. For example, you
  2680. can limit the popup's maximum width and add a border to it:
  2681. >
  2682. augroup MyYCMCustom
  2683. autocmd!
  2684. autocmd FileType c,cpp let b:ycm_hover = {
  2685. \ 'command': 'GetDoc',
  2686. \ 'syntax': &filetype
  2687. \ 'popup_params': {
  2688. \ 'maxwidth': 80,
  2689. \ 'border': [],
  2690. \ 'borderchars': ['─', '│', '─', '│', '┌', '┐', '┘', '└'],
  2691. \ },
  2692. \ }
  2693. augroup END
  2694. <
  2695. See ':help popup_create-arguments' for the list of available popup window
  2696. options.
  2697. Default: "'CursorHold'"
  2698. -------------------------------------------------------------------------------
  2699. The *g:ycm_filter_diagnostics* option
  2700. This option controls which diagnostics will be rendered by YCM. This option
  2701. holds a dictionary of key-values, where the keys are Vim's filetype strings
  2702. delimited by commas and values are dictionaries describing the filter.
  2703. A filter is a dictionary of key-values, where the keys are the type of filter,
  2704. and the value is a list of arguments to that filter. In the case of just a
  2705. single item in the list, you may omit the brackets and just provide the
  2706. argument directly. If any filter matches a diagnostic, it will be dropped and
  2707. YCM will not render it.
  2708. The following filter types are supported:
  2709. - "regex": Accepts a string regular expression [94]. This type matches when
  2710. the regex (treated as case-insensitive) is found anywhere in the diagnostic
  2711. text ('re.search', not 're.match')
  2712. - "level": Accepts a string level, either "warning" or "error." This type
  2713. matches when the diagnostic has the same level, that is, specifying 'level:
  2714. "error"' will remove **all** errors from the diagnostics.
  2715. **NOTE:** The regex syntax is **NOT** Vim's, it's Python's [94].
  2716. Default: '{}'
  2717. The following example will do, for Java filetype only: - Remove **all** error
  2718. level diagnostics, and, - Also remove anything that contains 'ta<something>co'
  2719. >
  2720. let g:ycm_filter_diagnostics = {
  2721. \ "java": {
  2722. \ "regex": [ "ta.+co", ... ],
  2723. \ "level": "error",
  2724. \ ...
  2725. \ }
  2726. \ }
  2727. <
  2728. -------------------------------------------------------------------------------
  2729. The *g:ycm_always_populate_location_list* option
  2730. When this option is set, YCM will populate the location list automatically
  2731. every time it gets new diagnostic data. This option is off by default so as not
  2732. to interfere with other data you might have placed in the location list.
  2733. See ':help location-list' in Vim to learn more about the location list.
  2734. This option is part of the Syntastic compatibility layer; if the option is not
  2735. set, YCM will fall back to the value of the
  2736. 'g:syntastic_always_populate_loc_list' option before using this option's
  2737. default.
  2738. Note: if YCM's errors aren't visible, it might be that YCM is updating an older
  2739. location list. See ':help :lhistory' and ':lolder'.
  2740. Default: '0'
  2741. >
  2742. let g:ycm_always_populate_location_list = 0
  2743. <
  2744. -------------------------------------------------------------------------------
  2745. The *g:ycm_open_loclist_on_ycm_diags* option
  2746. When this option is set, |:YcmDiags| will automatically open the location list
  2747. after forcing a compilation and filling the list with diagnostic data.
  2748. See ':help location-list' in Vim to learn more about the location list.
  2749. Default: '1'
  2750. >
  2751. let g:ycm_open_loclist_on_ycm_diags = 1
  2752. <
  2753. -------------------------------------------------------------------------------
  2754. The *g:ycm_complete_in_comments* option
  2755. When this option is set to '1', YCM will show the completion menu even when
  2756. typing inside comments.
  2757. Default: '0'
  2758. >
  2759. let g:ycm_complete_in_comments = 0
  2760. <
  2761. -------------------------------------------------------------------------------
  2762. The *g:ycm_complete_in_strings* option
  2763. When this option is set to '1', YCM will show the completion menu even when
  2764. typing inside strings.
  2765. Note that this is turned on by default so that you can use the filename
  2766. completion inside strings. This is very useful for instance in C-family files
  2767. where typing '#include "' will trigger the start of filename completion. If you
  2768. turn off this option, you will turn off filename completion in such situations
  2769. as well.
  2770. Default: '1'
  2771. >
  2772. let g:ycm_complete_in_strings = 1
  2773. <
  2774. -------------------------------------------------------------------------------
  2775. The *g:ycm_collect_identifiers_from_comments_and_strings* option
  2776. When this option is set to '1', YCM's identifier completer will also collect
  2777. identifiers from strings and comments. Otherwise, the text in comments and
  2778. strings will be ignored.
  2779. Default: '0'
  2780. >
  2781. let g:ycm_collect_identifiers_from_comments_and_strings = 0
  2782. <
  2783. -------------------------------------------------------------------------------
  2784. The *g:ycm_collect_identifiers_from_tags_files* option
  2785. When this option is set to '1', YCM's identifier completer will also collect
  2786. identifiers from tags files. The list of tags files to examine is retrieved
  2787. from the 'tagfiles()' Vim function which examines the 'tags' Vim option. See
  2788. ":h 'tags'" for details.
  2789. YCM will re-index your tags files if it detects that they have been modified.
  2790. The only supported tag format is the Exuberant Ctags format [95]. The format
  2791. from "plain" ctags is NOT supported. Ctags needs to be called with the
  2792. '--fields=+l' option (that's a lowercase 'L', not a one) because YCM needs the
  2793. 'language:<lang>' field in the tags output.
  2794. See the _FAQ_ for pointers if YCM does not appear to read your tag files.
  2795. This option is off by default because it makes Vim slower if your tags are on a
  2796. network directory.
  2797. Default: '0'
  2798. >
  2799. let g:ycm_collect_identifiers_from_tags_files = 0
  2800. <
  2801. -------------------------------------------------------------------------------
  2802. The *g:ycm_seed_identifiers_with_syntax* option
  2803. When this option is set to '1', YCM's identifier completer will seed its
  2804. identifier database with the keywords of the programming language you're
  2805. writing.
  2806. Since the keywords are extracted from the Vim syntax file for the filetype, all
  2807. keywords may not be collected, depending on how the syntax file was written.
  2808. Usually at least 95% of the keywords are successfully extracted.
  2809. Default: '0'
  2810. >
  2811. let g:ycm_seed_identifiers_with_syntax = 0
  2812. <
  2813. -------------------------------------------------------------------------------
  2814. The *g:ycm_extra_conf_vim_data* option
  2815. If you're using semantic completion for C-family files, this option might come
  2816. handy; it's a way of sending data from Vim to your 'Settings' function in your
  2817. '.ycm_extra_conf.py' file.
  2818. This option is supposed to be a list of VimScript expression strings that are
  2819. evaluated for every request to the ycmd server [44] and then passed to your
  2820. 'Settings' function as a 'client_data' keyword argument.
  2821. For instance, if you set this option to "['v:version']", your 'Settings'
  2822. function will be called like this:
  2823. >
  2824. # The '801' value is of course contingent on Vim 8.1; in 8.0 it would be '800'
  2825. Settings( ..., client_data = { 'v:version': 801 } )
  2826. <
  2827. So the 'client_data' parameter is a dictionary mapping Vim expression strings
  2828. to their values at the time of the request.
  2829. The correct way to define parameters for your 'Settings' function:
  2830. >
  2831. def Settings( **kwargs ):
  2832. <
  2833. You can then get to 'client_data' with "kwargs['client_data']".
  2834. Default: '[]'
  2835. >
  2836. let g:ycm_extra_conf_vim_data = []
  2837. <
  2838. -------------------------------------------------------------------------------
  2839. The *g:ycm_server_python_interpreter* option
  2840. YCM will by default search for an appropriate Python interpreter on your
  2841. system. You can use this option to override that behavior and force the use of
  2842. a specific interpreter of your choosing.
  2843. **NOTE:** This interpreter is only used for the ycmd server [44]. The YCM
  2844. client running inside Vim always uses the Python interpreter that's embedded
  2845. inside Vim.
  2846. Default: "''"
  2847. >
  2848. let g:ycm_server_python_interpreter = ''
  2849. <
  2850. -------------------------------------------------------------------------------
  2851. The *g:ycm_keep_logfiles* option
  2852. When this option is set to '1', YCM and the ycmd completion server [44] will
  2853. keep the logfiles around after shutting down (they are deleted on shutdown by
  2854. default).
  2855. To see where the log files are, call |:YcmDebugInfo|.
  2856. Default: '0'
  2857. >
  2858. let g:ycm_keep_logfiles = 0
  2859. <
  2860. -------------------------------------------------------------------------------
  2861. The *g:ycm_log_level* option
  2862. The logging level that YCM and the ycmd completion server [44] use. Valid
  2863. values are the following, from most verbose to least verbose: - 'debug' -
  2864. 'info' - 'warning' - 'error' - 'critical'
  2865. Note that 'debug' is _very_ verbose.
  2866. Default: 'info'
  2867. >
  2868. let g:ycm_log_level = 'info'
  2869. <
  2870. -------------------------------------------------------------------------------
  2871. The *g:ycm_auto_start_csharp_server* option
  2872. When set to '1', the OmniSharp-Roslyn server will be automatically started
  2873. (once per Vim session) when you open a C# file.
  2874. Default: '1'
  2875. >
  2876. let g:ycm_auto_start_csharp_server = 1
  2877. <
  2878. -------------------------------------------------------------------------------
  2879. The *g:ycm_auto_stop_csharp_server* option
  2880. When set to '1', the OmniSharp-Roslyn server will be automatically stopped upon
  2881. closing Vim.
  2882. Default: '1'
  2883. >
  2884. let g:ycm_auto_stop_csharp_server = 1
  2885. <
  2886. -------------------------------------------------------------------------------
  2887. The *g:ycm_csharp_server_port* option
  2888. When g:ycm_auto_start_csharp_server is set to '1', specifies the port for the
  2889. OmniSharp-Roslyn server to listen on. When set to '0' uses an unused port
  2890. provided by the OS.
  2891. Default: '0'
  2892. >
  2893. let g:ycm_csharp_server_port = 0
  2894. <
  2895. -------------------------------------------------------------------------------
  2896. The *g:ycm_csharp_insert_namespace_expr* option
  2897. By default, when YCM inserts a namespace, it will insert the 'using' statement
  2898. under the nearest 'using' statement. You may prefer that the 'using' statement
  2899. is inserted somewhere, for example, to preserve sorting. If so, you can set
  2900. this option to override this behavior.
  2901. When this option is set, instead of inserting the 'using' statement itself, YCM
  2902. will set the global variable 'g:ycm_namespace_to_insert' to the namespace to
  2903. insert, and then evaluate this option's value as an expression. The option's
  2904. expression is responsible for inserting the namespace - the default insertion
  2905. will not occur.
  2906. Default: ''
  2907. >
  2908. let g:ycm_csharp_insert_namespace_expr = ''
  2909. <
  2910. -------------------------------------------------------------------------------
  2911. The *g:ycm_add_preview_to_completeopt* option
  2912. When this option is set to '1', YCM will add the 'preview' string to Vim's
  2913. 'completeopt' option (see ':h completeopt'). If your 'completeopt' option
  2914. already has 'preview' set, there will be no effect. Alternatively, when set to
  2915. 'popup' and your version of Vim supports popup windows (see ':help popup'), the
  2916. 'popup' string will be used instead. You can see the current state of your
  2917. 'completeopt' setting with ':set completeopt?' (yes, the question mark is
  2918. important).
  2919. When 'preview' is present in 'completeopt', YCM will use the 'preview' window
  2920. at the top of the file to store detailed information about the current
  2921. completion candidate (but only if the candidate came from the semantic engine).
  2922. For instance, it would show the full function prototype and all the function
  2923. overloads in the window if the current completion is a function name.
  2924. When 'popup' is present in 'completeopt', YCM will instead use a 'popup' window
  2925. to the side of the completion popup for storing detailed information about the
  2926. current completion candidate. In addition, YCM may truncate the detailed
  2927. completion information in order to give the popup sufficient room to display
  2928. that detailed information.
  2929. Default: '0'
  2930. >
  2931. let g:ycm_add_preview_to_completeopt = 0
  2932. <
  2933. -------------------------------------------------------------------------------
  2934. The *g:ycm_autoclose_preview_window_after_completion* option
  2935. When this option is set to '1', YCM will auto-close the 'preview' window after
  2936. the user accepts the offered completion string. If there is no 'preview' window
  2937. triggered because there is no 'preview' string in 'completeopt', this option is
  2938. irrelevant. See the |g:ycm_add_preview_to_completeopt| option for more details.
  2939. Default: '0'
  2940. >
  2941. let g:ycm_autoclose_preview_window_after_completion = 0
  2942. <
  2943. -------------------------------------------------------------------------------
  2944. The *g:ycm_autoclose_preview_window_after_insertion* option
  2945. When this option is set to '1', YCM will auto-close the 'preview' window after
  2946. the user leaves insert mode. This option is irrelevant if
  2947. |g:ycm_autoclose_preview_window_after_completion| is set or if no 'preview'
  2948. window is triggered. See the |g:ycm_add_preview_to_completeopt| option for more
  2949. details.
  2950. Default: '0'
  2951. >
  2952. let g:ycm_autoclose_preview_window_after_insertion = 0
  2953. <
  2954. -------------------------------------------------------------------------------
  2955. The *g:ycm_max_diagnostics_to_display* option
  2956. This option controls the maximum number of diagnostics shown to the user when
  2957. errors or warnings are detected in the file. This option is only relevant for
  2958. the C-family, C#, Java, JavaScript, and TypeScript languages.
  2959. A special value of '0' means there is no limit.
  2960. Default: '30'
  2961. >
  2962. let g:ycm_max_diagnostics_to_display = 30
  2963. <
  2964. -------------------------------------------------------------------------------
  2965. The *g:ycm_key_list_select_completion* option
  2966. This option controls the key mappings used to select the first completion
  2967. string. Invoking any of them repeatedly cycles forward through the completion
  2968. list.
  2969. Some users like adding '<Enter>' to this list.
  2970. Default: "['<TAB>', '<Down>']"
  2971. >
  2972. let g:ycm_key_list_select_completion = ['<TAB>', '<Down>']
  2973. <
  2974. -------------------------------------------------------------------------------
  2975. The *g:ycm_key_list_previous_completion* option
  2976. This option controls the key mappings used to select the previous completion
  2977. string. Invoking any of them repeatedly cycles backward through the completion
  2978. list.
  2979. Note that one of the defaults is '<S-TAB>' which means Shift-TAB. That mapping
  2980. will probably only work in GUI Vim (Gvim or MacVim) and not in plain console
  2981. Vim because the terminal usually does not forward modifier key combinations to
  2982. Vim.
  2983. Default: "['<S-TAB>', '<Up>']"
  2984. >
  2985. let g:ycm_key_list_previous_completion = ['<S-TAB>', '<Up>']
  2986. <
  2987. -------------------------------------------------------------------------------
  2988. The *g:ycm_key_list_stop_completion* option
  2989. This option controls the key mappings used to close the completion menu. This
  2990. is useful when the menu is blocking the view, when you need to insert the
  2991. '<TAB>' character, or when you want to expand a snippet from UltiSnips [25] and
  2992. navigate through it.
  2993. Default: "['<C-y>']"
  2994. >
  2995. let g:ycm_key_list_stop_completion = ['<C-y>']
  2996. <
  2997. -------------------------------------------------------------------------------
  2998. The *g:ycm_key_invoke_completion* option
  2999. This option controls the key mapping used to invoke the completion menu for
  3000. semantic completion. By default, semantic completion is triggered automatically
  3001. after typing characters appropriate for the language, such as '.', '->', '::',
  3002. etc. in insert mode (if semantic completion support has been compiled in). This
  3003. key mapping can be used to trigger semantic completion anywhere. Useful for
  3004. searching for top-level functions and classes.
  3005. Console Vim (not Gvim or MacVim) passes '<Nul>' to Vim when the user types
  3006. '<C-Space>' so YCM will make sure that '<Nul>' is used in the map command when
  3007. you're editing in console Vim, and '<C-Space>' in GUI Vim. This means that you
  3008. can just press '<C-Space>' in both the console and GUI Vim and YCM will do the
  3009. right thing.
  3010. Setting this option to an empty string will make sure no mapping is created.
  3011. Default: '<C-Space>'
  3012. >
  3013. let g:ycm_key_invoke_completion = '<C-Space>'
  3014. <
  3015. -------------------------------------------------------------------------------
  3016. The *g:ycm_key_detailed_diagnostics* option
  3017. This option controls the key mapping used to show the full diagnostic text when
  3018. the user's cursor is on the line with the diagnostic. It basically calls
  3019. |:YcmShowDetailedDiagnostic|.
  3020. Setting this option to an empty string will make sure no mapping is created.
  3021. If you prefer the detailed diagnostic to be shown in a popup, then 'let
  3022. g:ycm_show_detailed_diag_in_popup=1'.
  3023. Default: '<leader>d'
  3024. >
  3025. let g:ycm_key_detailed_diagnostics = '<leader>d'
  3026. <
  3027. -------------------------------------------------------------------------------
  3028. The *g:ycm_show_detailed_diag_in_popup* option
  3029. Makes |:YcmShowDetailedDiagnostic| always show in a popup rather than echoing
  3030. to the command line.
  3031. Default: 0
  3032. >
  3033. let g:ycm_show_detailed_diag_in_popup = 0
  3034. <
  3035. -------------------------------------------------------------------------------
  3036. The *g:ycm_global_ycm_extra_conf* option
  3037. Normally, YCM searches for a '.ycm_extra_conf.py' file for compilation flags
  3038. (see the User Guide for more details on how this works). This option specifies
  3039. a fallback path to a config file which is used if no '.ycm_extra_conf.py' is
  3040. found.
  3041. You can place such a global file anywhere in your filesystem.
  3042. Default: "''"
  3043. >
  3044. let g:ycm_global_ycm_extra_conf = ''
  3045. <
  3046. -------------------------------------------------------------------------------
  3047. The *g:ycm_confirm_extra_conf* option
  3048. When this option is set to '1' YCM will ask once per '.ycm_extra_conf.py' file
  3049. if it is safe to be loaded. This is to prevent the execution of malicious code
  3050. from a '.ycm_extra_conf.py' file you didn't write.
  3051. To selectively get YCM to ask/not ask about loading certain
  3052. '.ycm_extra_conf.py' files, see the |g:ycm_extra_conf_globlist| option.
  3053. Default: '1'
  3054. >
  3055. let g:ycm_confirm_extra_conf = 1
  3056. <
  3057. -------------------------------------------------------------------------------
  3058. The *g:ycm_extra_conf_globlist* option
  3059. This option is a list that may contain several globbing patterns. If a pattern
  3060. starts with a '!' all '.ycm_extra_conf.py' files matching that pattern will be
  3061. blacklisted, that is they won't be loaded and no confirmation dialog will be
  3062. shown. If a pattern does not start with a '!' all files matching that pattern
  3063. will be whitelisted. Note that this option is not used when confirmation is
  3064. disabled using |g:ycm_confirm_extra_conf| and that items earlier in the list
  3065. will take precedence over the later ones.
  3066. Rules:
  3067. - '*' matches everything
  3068. - '?' matches any single character
  3069. - '[seq]' matches any character in seq
  3070. - '[!seq]' matches any char not in seq
  3071. Example:
  3072. >
  3073. let g:ycm_extra_conf_globlist = ['~/dev/*','!~/*']
  3074. <
  3075. - The first rule will match everything contained in the '~/dev' directory so
  3076. '.ycm_extra_conf.py' files from there will be loaded.
  3077. - The second rule will match everything in the home directory so a
  3078. '.ycm_extra_conf.py' file from there won't be loaded.
  3079. - As the first rule takes precedence everything in the home directory
  3080. excluding the '~/dev' directory will be blacklisted.
  3081. **NOTE:** The glob pattern is first expanded with Python's
  3082. 'os.path.expanduser()' and then resolved with 'os.path.abspath()' before being
  3083. matched against the filename.
  3084. Default: '[]'
  3085. >
  3086. let g:ycm_extra_conf_globlist = []
  3087. <
  3088. -------------------------------------------------------------------------------
  3089. The *g:ycm_filepath_completion_use_working_dir* option
  3090. By default, YCM's filepath completion will interpret relative paths like '../'
  3091. as being relative to the folder of the file of the currently active buffer.
  3092. Setting this option will force YCM to always interpret relative paths as being
  3093. relative to Vim's current working directory.
  3094. Default: '0'
  3095. >
  3096. let g:ycm_filepath_completion_use_working_dir = 0
  3097. <
  3098. -------------------------------------------------------------------------------
  3099. The *g:ycm_semantic_triggers* option
  3100. This option controls the character-based triggers for the various semantic
  3101. completion engines. The option holds a dictionary of key-values, where the keys
  3102. are Vim's filetype strings delimited by commas and values are lists of strings,
  3103. where the strings are the triggers.
  3104. Setting key-value pairs on the dictionary _adds_ semantic triggers to the
  3105. internal default set (listed below). You cannot remove the default triggers,
  3106. only add new ones.
  3107. A "trigger" is a sequence of one or more characters that trigger semantic
  3108. completion when typed. For instance, C++ ('cpp' filetype) has '.' listed as a
  3109. trigger. So when the user types 'foo.', the semantic engine will trigger and
  3110. serve 'foo''s list of member functions and variables. Since C++ also has '->'
  3111. listed as a trigger, the same thing would happen when the user typed 'foo->'.
  3112. It's also possible to use a regular expression as a trigger. You have to prefix
  3113. your trigger with 're!' to signify it's a regex trigger. For instance,
  3114. 're!\w+\.' would only trigger after the '\w+\.' regex matches.
  3115. **NOTE:** The regex syntax is **NOT** Vim's, it's Python's [94].
  3116. Default: '[see next line]'
  3117. >
  3118. let g:ycm_semantic_triggers = {
  3119. \ 'c': ['->', '.'],
  3120. \ 'objc': ['->', '.', 're!\[[_a-zA-Z]+\w*\s', 're!^\s*[^\W\d]\w*\s',
  3121. \ 're!\[.*\]\s'],
  3122. \ 'ocaml': ['.', '#'],
  3123. \ 'cpp,cuda,objcpp': ['->', '.', '::'],
  3124. \ 'perl': ['->'],
  3125. \ 'php': ['->', '::'],
  3126. \ 'cs,d,elixir,go,groovy,java,javascript,julia,perl6,python,scala,typescript,vb': ['.'],
  3127. \ 'ruby,rust': ['.', '::'],
  3128. \ 'lua': ['.', ':'],
  3129. \ 'erlang': [':'],
  3130. \ }
  3131. <
  3132. -------------------------------------------------------------------------------
  3133. The *g:ycm_cache_omnifunc* option
  3134. Some omnicompletion engines do not work well with the YCM cache—in particular,
  3135. they might not produce all possible results for a given prefix. By unsetting
  3136. this option you can ensure that the omnicompletion engine is re-queried on
  3137. every keypress. That will ensure all completions will be presented but might
  3138. cause stuttering and lag if the omnifunc is slow.
  3139. Default: '1'
  3140. >
  3141. let g:ycm_cache_omnifunc = 1
  3142. <
  3143. -------------------------------------------------------------------------------
  3144. The *g:ycm_use_ultisnips_completer* option
  3145. By default, YCM will query the UltiSnips plugin for possible completions of
  3146. snippet triggers. This option can turn that behavior off.
  3147. Default: '1'
  3148. >
  3149. let g:ycm_use_ultisnips_completer = 1
  3150. <
  3151. -------------------------------------------------------------------------------
  3152. The *g:ycm_goto_buffer_command* option
  3153. Defines where 'GoTo*' commands result should be opened. Can take one of the
  3154. following values: "'same-buffer'", "'split'", or "'split-or-existing-window'".
  3155. If this option is set to the "'same-buffer'" but current buffer can not be
  3156. switched (when buffer is modified and 'nohidden' option is set), then result
  3157. will be opened in a split. When the option is set to
  3158. "'split-or-existing-window'", if the result is already open in a window of the
  3159. current tab page (or any tab pages with the ':tab' modifier; see below), it
  3160. will jump to that window. Otherwise, the result will be opened in a split as if
  3161. the option was set to "'split'".
  3162. To customize the way a new window is split, prefix the 'GoTo*' command with one
  3163. of the following modifiers: ':aboveleft', ':belowright', ':botright',
  3164. ':leftabove', ':rightbelow', ':topleft', and ':vertical'. For instance, to
  3165. split vertically to the right of the current window, run the command:
  3166. >
  3167. :rightbelow vertical YcmCompleter GoTo
  3168. <
  3169. To open in a new tab page, use the ':tab' modifier with the "'split'" or
  3170. "'split-or-existing-window'" options e.g.:
  3171. >
  3172. :tab YcmCompleter GoTo
  3173. <
  3174. Default: "'same-buffer'"
  3175. >
  3176. let g:ycm_goto_buffer_command = 'same-buffer'
  3177. <
  3178. -------------------------------------------------------------------------------
  3179. The *g:ycm_disable_for_files_larger_than_kb* option
  3180. Defines the max size (in Kb) for a file to be considered for completion. If
  3181. this option is set to 0 then no check is made on the size of the file you're
  3182. opening.
  3183. Default: 1000
  3184. >
  3185. let g:ycm_disable_for_files_larger_than_kb = 1000
  3186. <
  3187. -------------------------------------------------------------------------------
  3188. The *g:ycm_use_clangd* option
  3189. This option controls whether **clangd** should be used as a completion engine
  3190. for C-family languages. Can take one of the following values: '1', '0', with
  3191. meanings:
  3192. - '1': YCM will use clangd if clangd binary exists in third party or it was
  3193. provided with 'ycm_clangd_binary_path' option.
  3194. - '0': YCM will never use clangd completer.
  3195. Default: '1'
  3196. >
  3197. let g:ycm_use_clangd = 1
  3198. <
  3199. -------------------------------------------------------------------------------
  3200. The *g:ycm_clangd_binary_path* option
  3201. When 'ycm_use_clangd' option is set to '1', this option sets the path to
  3202. **clangd** binary.
  3203. Default: "''"
  3204. >
  3205. let g:ycm_clangd_binary_path = ''
  3206. <
  3207. -------------------------------------------------------------------------------
  3208. The *g:ycm_clangd_args* option
  3209. This option controls the command line arguments passed to the clangd binary. It
  3210. appends new options and overrides the existing ones.
  3211. Default: '[]'
  3212. >
  3213. let g:ycm_clangd_args = []
  3214. <
  3215. -------------------------------------------------------------------------------
  3216. The *g:ycm_clangd_uses_ycmd_caching* option
  3217. This option controls which ranking and filtering algorithm to use for
  3218. completion items. It can take values:
  3219. - '1': Uses ycmd's caching and filtering logic.
  3220. - '0': Uses clangd's caching and filtering logic.
  3221. Default: '1'
  3222. >
  3223. let g:ycm_clangd_uses_ycmd_caching = 1
  3224. <
  3225. -------------------------------------------------------------------------------
  3226. The *g:ycm_language_server* option
  3227. This option lets YCM use an arbitrary Language Server Protocol (LSP) server,
  3228. not unlike many other completion systems. The officially supported completers
  3229. are favoured over custom LSP ones, so overriding an existing completer means
  3230. first making sure YCM won't choose that existing completer in the first place.
  3231. A simple working example of this option can be found in the section called
  3232. "Semantic Completion for Other Languages".
  3233. Many working examples can be found in the YCM lsp-examples [79] repo.
  3234. Default: '[]'
  3235. >
  3236. let g:ycm_language_server = []
  3237. <
  3238. -------------------------------------------------------------------------------
  3239. The *g:ycm_disable_signature_help* option
  3240. This option allows you to disable all signature help for all completion
  3241. engines. There is no way to disable it per-completer.
  3242. Default: '0'
  3243. >
  3244. " Disable signature help
  3245. let g:ycm_disable_signature_help = 1
  3246. <
  3247. -------------------------------------------------------------------------------
  3248. The *g:ycm_signature_help_disable_syntax* option
  3249. Set this to 1 to disable syntax highlighting in the signature help popup. Thiis
  3250. can help if your colourscheme doesn't work well with the default highliting and
  3251. inverse video.
  3252. Default: '0'
  3253. >
  3254. " Disable signature help syntax highliting
  3255. let g:ycm_signature_help_disable_syntax = 1
  3256. <
  3257. -------------------------------------------------------------------------------
  3258. The *g:ycm_gopls_binary_path* option
  3259. In case the system-wide 'gopls' binary is newer than the bundled one, setting
  3260. this option to the path of the system-wide 'gopls' would make YCM use that one
  3261. instead.
  3262. If the path is just 'gopls', YCM will search in '$PATH'.
  3263. -------------------------------------------------------------------------------
  3264. The *g:ycm_gopls_args* option
  3265. Similar to the |g:ycm_clangd_args|, this option allows passing additional flags
  3266. to the 'gopls' command line.
  3267. Default: '[]'
  3268. >
  3269. let g:ycm_gopls_args = []
  3270. <
  3271. -------------------------------------------------------------------------------
  3272. The *g:ycm_rls_binary_path* and 'g:ycm_rustc_binary_path' options
  3273. YCM no longer uses RLS for rust, and these options are therefore no longer
  3274. supported.
  3275. To use a custom rust-analyzer, see |g:ycm_rust_toolchain_root|.
  3276. -------------------------------------------------------------------------------
  3277. The *g:ycm_rust_toolchain_root* option
  3278. Optionally specify the path to a custom rust toolchain including at least a
  3279. supported version of 'rust-analyzer'.
  3280. -------------------------------------------------------------------------------
  3281. The *g:ycm_tsserver_binary_path* option
  3282. Similar to the 'gopls' path, this option tells YCM where is the TSServer
  3283. executable located.
  3284. -------------------------------------------------------------------------------
  3285. The *g:ycm_roslyn_binary_path* option
  3286. Similar to the 'gopls' path, this option tells YCM where is the
  3287. Omnisharp-Roslyn executable located.
  3288. -------------------------------------------------------------------------------
  3289. The *g:ycm_update_diagnostics_in_insert_mode* option
  3290. With async diagnostics, LSP servers might send new diagnostics mid-typing. If
  3291. seeing these new diagnostics while typing is not desired, this option can be
  3292. set to 0.
  3293. When this option is set to '0', diagnostic signs, virtual text, and highlights
  3294. are cleared when entering insert mode and replaced when leaving insert mode.
  3295. This reduces visual noise while editing.
  3296. In addition, this option is recommended when |g:ycm_echo_current_diagnostic| is
  3297. set to 'virtual-text' as it prevents updating the virtual text while you are
  3298. typing.
  3299. Default: '1'
  3300. >
  3301. let g:ycm_update_diagnostics_in_insert_mode = 1
  3302. <
  3303. -------------------------------------------------------------------------------
  3304. *youcompleteme-faq*
  3305. FAQ ~
  3306. The FAQ section has been moved to the wiki [8].
  3307. -------------------------------------------------------------------------------
  3308. *youcompleteme-contributor-code-of-conduct*
  3309. Contributor Code of Conduct ~
  3310. Please note that this project is released with a Contributor Code of Conduct
  3311. [96]. By participating in this project you agree to abide by its terms.
  3312. -------------------------------------------------------------------------------
  3313. *youcompleteme-contact*
  3314. Contact ~
  3315. If you have questions about the plugin or need help, please join the Gitter
  3316. room [1] or use the ycm-users [97] mailing list.
  3317. If you have bug reports or feature suggestions, please use the issue tracker
  3318. [98]. Before you do, please carefully read CONTRIBUTING.md [99] as this asks
  3319. for important diagnostics which the team will use to help get you going.
  3320. The latest version of the plugin is available at
  3321. https://ycm-core.github.io/YouCompleteMe/.
  3322. The author's homepage is https://val.markovic.io.
  3323. Please do **NOT** go to #vim, Reddit, or Stack Overflow for support. Please
  3324. contact the YouCompleteMe maintainers directly using the contact details.
  3325. -------------------------------------------------------------------------------
  3326. *youcompleteme-license*
  3327. License ~
  3328. This software is licensed under the GPL v3 license [100]. © 2015-2018
  3329. YouCompleteMe contributors
  3330. -------------------------------------------------------------------------------
  3331. *youcompleteme-sponsorship*
  3332. Sponsorship ~
  3333. If you like YCM so much that you're willing to part with your hard-earned cash,
  3334. please consider donating to one of the following charities, which are
  3335. meaningful to the current maintainers (in no particular order):
  3336. - Hector's Greyhound Rescue [101]
  3337. - Be Humane [102]
  3338. - Cancer Research UK [103]
  3339. - ICCF Holland [104]
  3340. - Any charity of your choosing.
  3341. Please note: The YCM maintainers do not specifically endorse nor necessarily
  3342. have any relationship with the above charities. Disclosure: It is noted that
  3343. one key maintainer is a family with Trustees of Greyhound Rescue Wales.
  3344. ===============================================================================
  3345. *youcompleteme-references*
  3346. References ~
  3347. [1] https://gitter.im/Valloric/YouCompleteMe
  3348. [2] https://img.shields.io/gitter/room/Valloric/YouCompleteMe.svg
  3349. [3] https://dev.azure.com/YouCompleteMe/YCM/_build?definitionId=3&branchName=master
  3350. [4] https://dev.azure.com/YouCompleteMe/YCM/_apis/build/status/ycm-core.YouCompleteMe?branchName=master
  3351. [5] https://codecov.io/gh/ycm-core/YouCompleteMe
  3352. [6] https://img.shields.io/codecov/c/github/ycm-core/YouCompleteMe/master.svg
  3353. [7] https://github.com/ycm-core/YouCompleteMe/wiki/Troubleshooting-steps-for-ycmd-server-SHUT-DOWN
  3354. [8] https://github.com/ycm-core/YouCompleteMe/wiki/FAQ
  3355. [9] https://github.com/ycm-core/YouCompleteMe/issues/4134#issuecomment-1446235584
  3356. [10] https://www.vim.org/
  3357. [11] https://clang.llvm.org/extra/clangd.html
  3358. [12] https://github.com/davidhalter/jedi
  3359. [13] https://github.com/OmniSharp/omnisharp-roslyn
  3360. [14] https://github.com/golang/go/wiki/gopls
  3361. [15] https://github.com/Microsoft/TypeScript/tree/master/src/server
  3362. [16] https://rust-analyzer.github.io
  3363. [17] https://github.com/eclipse/eclipse.jdt.ls
  3364. [18] https://i.imgur.com/0OP4ood.gif
  3365. [19] https://en.wikipedia.org/wiki/Subsequence
  3366. [20] https://github.com/scrooloose/syntastic
  3367. [21] https://user-images.githubusercontent.com/10026824/34471853-af9cf32a-ef53-11e7-8229-de534058ddc4.gif
  3368. [22] https://user-images.githubusercontent.com/10584846/58738348-5060da80-83fd-11e9-9537-d07fdbf4554c.gif
  3369. [23] https://i.imgur.com/nmUUbdl.gif
  3370. [24] https://user-images.githubusercontent.com/10584846/80312146-91af6500-87db-11ea-996b-7396f3134d1f.gif
  3371. [25] https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt
  3372. [26] https://github.com/VundleVim/Vundle.vim#about
  3373. [27] mono-install-macos
  3374. [28] https://macvim-dev.github.io/macvim/
  3375. [29] https://brew.sh
  3376. [30] https://www.mono-project.com/download/stable/
  3377. [31] https://golang.org/doc/install
  3378. [32] https://docs.npmjs.com/getting-started/installing-node#1-install-nodejs--npm
  3379. [33] https://adoptium.net/en-GB/temurin/releases
  3380. [34] https://github.com/ycm-core/YouCompleteMe/wiki/Building-Vim-from-source
  3381. [35] https://www.mono-project.com/download/stable/#download-lin
  3382. [36] https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16
  3383. [37] https://vimhelp.appspot.com/starting.txt.html#vimrc
  3384. [38] https://github.com/vim/vim-win32-installer/releases
  3385. [39] https://www.python.org/downloads/windows/
  3386. [40] https://cmake.org/download/
  3387. [41] https://stackoverflow.com/questions/6319274/how-do-i-run-msbuild-from-the-command-line-using-windows-sdk-7-1
  3388. [42] https://github.com/ycm-core/YouCompleteMe/wiki/Full-Installation-Guide
  3389. [43] https://www.unicode.org/glossary/#diacritic
  3390. [44] https://github.com/ycm-core/ycmd
  3391. [45] https://github.com/ycm-core/ycmd/pull/1255
  3392. [46] https://user-images.githubusercontent.com/10584846/173137003-a265e8b0-84db-4993-98f0-03ee81b9de94.png
  3393. [47] https://user-images.githubusercontent.com/10584846/173137012-7547de0b-145f-45fa-ace3-18943acd2141.png
  3394. [48] https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_semanticTokens
  3395. [49] https://user-images.githubusercontent.com/10584846/185708054-68074fc0-e50c-4a65-887c-da6f372b8982.png
  3396. [50] https://user-images.githubusercontent.com/10584846/185708156-b52970ce-005f-4f0b-97e7-bdf8feeefedc.png
  3397. [51] https://user-images.githubusercontent.com/10584846/185708242-e42dab6f-1847-46f1-8585-2d9f2c8a76dc.png
  3398. [52] https://github.com/ycm-core/YouCompleteMe/wiki/C-family-Semantic-Completion-through-libclang
  3399. [53] https://clang.llvm.org/docs/JSONCompilationDatabase.html
  3400. [54] https://ninja-build.org/manual.html
  3401. [55] https://pypi.org/project/compiledb/
  3402. [56] https://github.com/rizsotto/Bear
  3403. [57] https://raw.githubusercontent.com/ycm-core/ycmd/66030cd94299114ae316796f3cad181cac8a007c/.ycm_extra_conf.py
  3404. [58] https://github.com/rdnetto/YCM-Generator
  3405. [59] https://github.com/eclipse/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/preferences/Preferences.java
  3406. [60] https://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fproject_description_file.html
  3407. [61] https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
  3408. [62] https://docs.gradle.org/current/userguide/tutorial_java_projects.html
  3409. [63] https://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.jdt.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fjdt%2Fcore%2FIClasspathEntry.html
  3410. [64] https://github.com/ycm-core/ycmd/tree/3602f38ef7a762fc765afd75e562aec9a134711e/ycmd/tests/java/testdata/simple_eclipse_project
  3411. [65] https://github.com/ycm-core/ycmd/blob/3602f38ef7a762fc765afd75e562aec9a134711e/ycmd/tests/java/testdata/simple_maven_project/pom.xml
  3412. [66] https://github.com/ycm-core/ycmd/tree/3602f38ef7a762fc765afd75e562aec9a134711e/ycmd/tests/java/testdata/simple_gradle_project
  3413. [67] https://github.com/ycm-core/lsp-examples#kotlin
  3414. [68] https://github.com/OmniSharp/omnisharp-roslyn/releases/
  3415. [69] https://github.com/ycm-core/YouCompleteMe/blob/master/.ycm_extra_conf.py
  3416. [70] https://github.com/rust-lang/rls
  3417. [71] https://www.rust-lang.org/downloads.html
  3418. [72] https://rust-analyzer.github.io/manual.html#configuration]
  3419. [73] https://github.com/golang/tools/blob/master/gopls/doc/settings.md
  3420. [74] https://ternjs.net
  3421. [75] https://github.com/ycm-core/YouCompleteMe/wiki/JavaScript-Semantic-Completion-through-Tern
  3422. [76] https://code.visualstudio.com/docs/languages/jsconfig
  3423. [77] https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
  3424. [78] https://clang.llvm.org/
  3425. [79] https://github.com/ycm-core/lsp-examples
  3426. [80] http://eclim.org/
  3427. [81] https://github.com/ycm-core/ycmd/blob/master/ycmd/completers/completer.py
  3428. [82] https://github.com/Valloric/ListToggle
  3429. [83] https://asciinema.org/a/4JmYLAaz5hOHbZDD0hbsQpY8C
  3430. [84] https://asciinema.org/a/4JmYLAaz5hOHbZDD0hbsQpY8C.svg
  3431. [85] https://asciinema.org/a/659925
  3432. [86] https://asciinema.org/a/659925.svg
  3433. [87] https://user-images.githubusercontent.com/17928698/206855014-9131a49b-87e8-4ed4-8d91-f2fe7808a0b9.gif
  3434. [88] https://user-images.githubusercontent.com/17928698/206855713-3588c8de-d0f5-4725-b65e-bc51110252cc.gif
  3435. [89] https://jedi.readthedocs.io/en/latest/docs/api.html#jedi.Script.extract_variable
  3436. [90] https://github.com/puremourning/vimspector
  3437. [91] https://github.com/itchyny/lightline.vim
  3438. [92] https://user-images.githubusercontent.com/10584846/185707973-39703699-0263-47d3-82ac-639d52259bea.png
  3439. [93] https://user-images.githubusercontent.com/10584846/185707993-14ff5fd7-c082-4e5a-b825-f1364e619b6a.png
  3440. [94] https://docs.python.org/2/library/re.html#regular-expression-syntax
  3441. [95] http://ctags.sourceforge.net/FORMAT
  3442. [96] https://github.com/ycm-core/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md
  3443. [97] https://groups.google.com/forum/?hl=en#!forum/ycm-users
  3444. [98] https://github.com/ycm-core/YouCompleteMe/issues?state=open
  3445. [99] https://github.com/ycm-core/YouCompleteMe/blob/master/CONTRIBUTING.md
  3446. [100] https://www.gnu.org/copyleft/gpl.html
  3447. [101] https://www.hectorsgreyhoundrescue.org
  3448. [102] https://www.budihuman.rs/en
  3449. [103] https://www.cancerresearchuk.org
  3450. [104] https://iccf.nl
  3451. vim: ft=help