Autocomplete #2

Closed
opened 2024-05-28 12:41:13 +02:00 by Amzd · 2 comments
Amzd commented 2024-05-28 12:41:13 +02:00 (Migrated from github.com)

Is there a way to manually generate the Loc type so I can get autocomplete? Rather than it being generated at the compile step.

Is there a way to manually generate the Loc type so I can get autocomplete? Rather than it being generated at the compile step.
david-swift commented 2024-06-01 12:26:06 +02:00 (Migrated from github.com)

The plugin calls the Generation executable which you could also call manually in your project directory, specifying the input file's path (Localized.yml) as the first argument and the path of the output file (Localized.swift) as the second one.

After compiling, you should get autocomplete for the Swift file generated via the plugin without requiring you to run the executable manually.

The plugin calls the [Generation executable](https://github.com/AparokshaUI/Localized/tree/master/Sources/Generation) which you could also call manually in your project directory, specifying the input file's path (`Localized.yml`) as the first argument and the path of the output file (`Localized.swift`) as the second one. After compiling, you should get autocomplete for the Swift file generated via the plugin without requiring you to run the executable manually.
Amzd commented 2024-06-01 16:20:04 +02:00 (Migrated from github.com)

After compiling, you should get autocomplete for the Swift file generated via the plugin without requiring you to run the executable manually.

I can't get this to work with sourcekit-lsp, maybe some editors do a trick I am not seeing? I think it is related to this issue https://github.com/apple/sourcekit-lsp/issues/665

I am working around this by adding to my build-commands:

rm -f Sources/Target/Localized.swift
swift build [...]
ln -s .build/plugins/outputs/folder/Target/GenerateLocalized/Localized.swift Sources/Target/Localized.swift
> After compiling, you should get autocomplete for the Swift file generated via the plugin without requiring you to run the executable manually. I can't get this to work with sourcekit-lsp, maybe some editors do a trick I am not seeing? I think it is related to this issue https://github.com/apple/sourcekit-lsp/issues/665 I am working around this by adding to my build-commands: ```bash rm -f Sources/Target/Localized.swift swift build [...] ln -s .build/plugins/outputs/folder/Target/GenerateLocalized/Localized.swift Sources/Target/Localized.swift ```
Sign in to join this conversation.
No Milestone
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: aparoksha/localized#2
No description provided.