xi-term icon indicating copy to clipboard operation
xi-term copied to clipboard

syntect-plugin highlight as a feature

Open nunotexbsd opened this issue 6 years ago • 5 comments

Hello,

It is possible to have syntect-plugin as a feature in Cargo.toml like, e.g.:

[features] default = ["dist-client", "s3"] all = ["dist-client", "redis", "s3", "memcached", "gcs", "azure"] azure = ["chrono", "hyper", "hyperx", "rust-crypto", "url"]

(example from sccache Cargo.toml project)

I'm asking this because I'm porting xi-term to FreeBSD and it will be more easy to me to use: . CARGO_FEATURES= syntect-plugin or CARGO_FEATURES= all if there are more features that we like to have activated in a port.

I have not ported your project yet but I am using/testing it and it works very well.

Thanks,

Nuno Teixeira

nunotexbsd avatar Apr 22 '19 15:04 nunotexbsd

Hi. To answer your question i'm not entirely sure. the syntect-plugin is a binary program much like xi-term itself and must be installed on the system to be use, There is no 'dependency' for Cargo.toml to manage. xi-term works regardless of whether the syntect plugin is enabled or not. I'm not sure i understand why a feature would be needed for this?

patrickisgreene avatar Apr 22 '19 18:04 patrickisgreene

Hello. I was thinking syntect-plugin as an internal xi-term plugin. You explain me that sintect-plugin is an external program that I think it is https://github.com/trishume/syntect . Correct? In that way I will need to port this as well so xi-term can use it.

Thanks,

Nuno Teixeira

nunotexbsd avatar Apr 23 '19 17:04 nunotexbsd

Yeah you pretty much got it. It is actually an xi-core plugin, located here. The library you linked to is the syntect crate, it's a rust library for syntax highlighting it does nothing on it's own.

Yes in order to get this working you would have to Port xi-term, xi-core, and syntect-plugin all 3 would be required.

Thanks for using xi-term btw :smile:, If there's anything i could do to help with the porting process just let me know i'd be happy to help.

patrickisgreene avatar Apr 23 '19 18:04 patrickisgreene

Hello,

I just submit my first port to FreeBSD and now I'm waiting that it will be accepted/included in ports tree:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237533

and I also adopted xi-editor port because it was without maintainer. Also waiting for permission so I can be port maintainer:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237532

When this stage is complete I will include a new port so we can have syntax highlighting included and I will start working on that now :)

Nuno Teixeira

nunotexbsd avatar Apr 24 '19 16:04 nunotexbsd

Awesome. That's great to hear! i thank you very much for your work

patrickisgreene avatar Apr 24 '19 16:04 patrickisgreene