GithubHelp home page GithubHelp logo

panicinc / icarus Goto Github PK

View Code? Open in Web Editor NEW
69.0 69.0 5.0 20.78 MB

Swift, C, C++, and Objective-C Support for Nova

License: MIT License

C++ 96.06% C 0.30% NASL 1.86% Swift 1.15% Objective-C 0.14% Objective-C++ 0.28% Scheme 0.15% JavaScript 0.05%
c cpp editor extension nova objc objective-c swift

icarus's People

Contributors

haikusw avatar jamespanic avatar logancollins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

icarus's Issues

Feature Request: Macro Expansion Preview

Xcode can show the generated code that a macro creates by right clicking and choosing "Expand Macro". I'm not sure if this is possible through the LSP or not but I found some discussion of it here and it looks like it might be?

Generated Source Code Not Recognized (Swift OpenAPI Generator )

I'm using the Swift OpenAPI generator and I've followed the basic tutorial they present (https://swiftpackageindex.com/apple/swift-openapi-generator/1.2.1/tutorials/swift-openapi-generator) and it builds successfully, but in Nova it shows a bunch of errors - all claiming the auto-generated types don't exist.

Please advise

Screenshot 2024-04-13 at 17 37 12@2x

SourceCode.zip

edit: Note, the source code I attached is missing a dependency declaration (.target(name: "ThemeParksSchema")) however resolving this error does not resolve the reported problem.

Extension/LSP crashing after renaming and deleting the C family lang files

Hello,

There is a bug (maybe two see below) with the extension that crashes after renaming a file.

1. The Crash:

To replicate:

  • Create an empty project with test.cpp
  • write some code in there
  • change the file name and you will get an error
  • Now even after restart or turning the extension on and off things work unexpectedly as discussed below.
image

2. Post Crash Issues for example auto importing header files not working.

  • If you already have even a single header file (in bracket) The auto import function works. but if there is no header you will face some issues.. here is how to replicate the issue
  • open a blank .cpp file with just in main() in it. (no header files)
  • change the file name
  • restart the server and you will see when you type std::cout the <iostream> is not added automatically
image
  • Now add a random header like <stdlib.h> try again and you see it finds the std but the auto import is unpredictable unless you manually import the iostream
image image
  • But once you import iostream manually. You can remove and give it a shot and you will see as soon as you type std::cout it just imports them for you.
image

iOS Projects?

I've read the Readme and the plugin description but I'm none the wiser. Is it possible to use icarus in lieu of Xcode for doing iOS development (given that the iOS project is a pure SPM project)? Or can Icarus only be used with Swift non-app Swift SPM projects?

Preview windows don't scale well

The token preview on hover is a great feature, especially for looking up function prototypes. However some times it cannot autoscale appropriately.

Consider these :

Screenshot 2023-08-10 at 10 33 12 AM

const, char, restrict all three on different lines. Also couldn't completely display restrict in arguments.


Screenshot 2023-08-11 at 2 58 43 PM

This one is somewhat of extreme case due to parameter names, but displaying each parameter with it's (complete) type line-by-line would make it more readable.


These might look very minute details but it ultimately makes the code much less comprehensive.

REQUEST: Additionally, if possible, make the windows resizable using cursor, so worst case scenario users are able to read even if autoscaling fails.

Need to index generated files

When using build tool plugins in Swift packages, it's possible to generate code that is then available to the project. Some examples of projects that do this are:

When the build tools run, they generate their output in .build/plugins/outputs
Screenshot 2023-10-06 at 2 07 30 PM

Since this is in a hidden root folder which is generally in .gitignore I think that by default Nova will not index them. I was able to get things working with these project settings:
Screenshot 2023-10-06 at 2 13 49 PM

I'm not sure if a plugin can influence the indexing allow/block list, but it would be great to have this "just work" somehow.

Bug: LSP crashes when calling XCTAssertTrue before completion

I noticed that, when writing unit tests using XCTest, the LSP will crash whenever I call XCTAssertTrue before I finish writing the condition:

final class MyTestCase: XCTestCase {
    func testExample() throws {
        XCTAssertTrue(|) // | is my cursor
    }
}

A workaround I've found was writing the condition first and wrapping it in parens, then add XCTAssertTrue before the wrapped expression.

Language Server random freezes

I have sometimes experienced that clangd LSP server hangs up. Autosuggestions, code analysis, everything stops working and only syntax highlighting works.

The quick workaround for this has been disabling and re-enabling the Icarus extension. But it would be great to have this simple option to "Restart Language Server" in command pallet or something easily accessible.

I unfortunately don't have any logs of any kind to demonstrate or reproduce this, so if you could assist me how I could get some logs to post here, I'd be more than happy.

Issues doesn't seem to be working for Objective-C

I'm working with Objective-C in Nova and I'm not seeing issues like I do in Xcode. If I open my .m file in Xcode I see issues like "Unused variable" warnings for example, popping up at the edge of the editor. But I see no such warnings in Nova. I keep switching back over to Xcode while editing so I can see the issues.

Is this supposed to be a feature of Icarus or no? Is there something else I need to do to get it working? I have Xcode and its command line tools installed.

Bug: `cannot find <object> in scope` issue is emitted but the object does exist.

When I create a new file and define a new class, referencing the new class in another file will produce a cannot find <object> in scope error. It persists through builds (which work fine). The menu option to clear issues from previous builds doesn't remove it.

The only way I know to clear this error is to toggle off the Icarus extension and then toggle it on again.

Screenshot 2023-10-05 at 11 08 45 AM Screenshot 2023-10-05 at 11 08 35 AM

I reproduced this from a fresh launch and watched the extension console, but nothing was emitted there as I added the file and referenced it.

I also noticed that the LSP will crash with a notification if I delete a file, in case that's relevant.

Question: Remote debugging of swift code with LLDB?

I'm not seeing support for remote debugging with LLDB (use case 1: from Nova on my Mac to a Docker container on the same Mac running Linux and bound to a folder on the Mac that has the source code so Nova can edit it but it can be built and run inside the docker container).

Looking inside Icarus UI and source I don't see any specific support for remote debugging with LLDB but the Readme file says:

If you are Swift or C-family language developer, Icarus can provide you with first-class support for building client- and server-side applications and frameworks.

and the "server-side applications" part made me think it might.

I was able to use a generic task (not the LLDB) task and get Nova editing and able to invoke a remote build and run command via Run Script Tasks like docker exec -i -w /app {ContainerID} swift build and docker exec -i -w /app {ContainerID} swift run but that doesn't give you debugging inside Nova via LLDB.


I started looking at what it would take to add support for this to Icarus and I'd have a lot to learn before I could do it. I'm working though that as time permits, but it seemed worth asking if:

  1. It's already there and I'm missing it (?)
  2. You are already working on adding this so there's no need for me to work on it.

TIA

Feature Request: Marker Comment Divider Lines

I see that // MARK: comments have basic support, in that they show in the symbol list.

It would be awesome if marker comments containing hyphens showed a horizontal divider line, as in Xcode (and, in fact, as they already do in the minimap). Over the years I’ve come to completely rely on this feature for organising and scanning code, and I find my Swift code hard to browse without it.

Although outside the scope of this extension, it would also be great to see support for marker comments as a global app feature for all languages. I was excited when I discovered Nova’s 'type and function separators' preference, but it’s not the same as being able to give your own titles.

Syntax highlighting (C++) not working

Dear Panic team, thanks for this extension which is very useful for me, thanks a lot!

Unfortunately the syntax highlighting is not working at all for C++ files (e.g. .h and .cpp files). If I switch the language to C the highlighting works. Please note that previously I had this C++ extension installed which I have uninstalled now. I also tried to reinstall Icarus but it did not help. What else can I do?

Send stdin input to lldb debugger not responding

I have a C code :

printf("What's your First Name?");
in = fgets(you.first_name, MAX_DATA - 1,stdin);

When I launch the dubber, and hit this line, the bulit-in dubbger wait for me to give input (still not hitting break point yet, so the process is still running), as seen here:
image
But when I type something the built-in dubbger shell is not responding when I type in and thing and hit "Enter",

Do I need to hit some shortcut or I' missing something?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.