I find that I don’t need to run this command explicitly for the SourceKit-LSP to work. It can be run from the terminal with the command xcrun sourcekit-lsp I’m using XCode 14.2 at the time of writing this post. Hopefully, you should already have XCode, if not, go to Mac App Store and download XCode. Having XCode 11.4+ and higher, the SourceKit-LSP server is included, no need for a separate download. Step 1: Get SourceKit-LSP by installing XCode To do this we need the Language Server Protocol(LSP) which is supported on both VSCode and Swift via a package called SourceKit-LSP. How To Setup VSCode for Swift Developmentįirst, we need VSCode to show definitions and code completion when writing in the Swift language. Good thing there is a way to accomplish it in VSCode. Thanks to everyone who attended the talk and asked such awesome questions! If you missed it, the video is above and all the code, links and resources can be found in the GitHub repo linked below.There is a nice attempt using Xcode Source Editor Extension in this GitHub project by “intitni” that allows you to run Github Copilot in Xcode but honestly, it is a bit clunky to use and not as seamless experience compared to VSCode. We also had some fun with the text-based GPT3 model to generate a poem about Python and to suggest a funny cat name token by token. I showed an R script to access the OpenAI API directly using the httr2 package, and also provided an R function to call an OpenAI model. With the Azure OpenAI Service, you can access the underlying OpenAI Codex model directly, and generate code suggestions via its API. I also took a behind-the-scenes look to see how Copilot uses Generative AI to make its suggestions. In the presentation (video below) I showed how while I was editing in Visual Studio Code with Copilot enabled, it suggested tidyverse functions for cleaning a data set, and even the code for performing an analysis of variance: If you haven't come across Copilot before, it's like an AI-based pair programmer that suggests new lines of code, and perhaps entire functions, based on context. It was my great pleasure to present last week to the NYC Data Hackers on the topic of Copilot for R.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |