Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Zig Language Support #3724

Open
Ndashka-Dev opened this issue Dec 18, 2023 · 2 comments
Open

[Feature request] Zig Language Support #3724

Ndashka-Dev opened this issue Dec 18, 2023 · 2 comments

Comments

@Ndashka-Dev
Copy link

Hello!

This is just a request to add the Zig language support (syntax highlight, file type choice (.zig), ability to build and execute, etc.)
I haven't seen a similar open issue, so decided to file one.

Thank you!

@Ndashka-Dev Ndashka-Dev changed the title Zig Language Support [Feature request] Zig Language Support Dec 18, 2023
@elextr
Copy link
Member

elextr commented Dec 18, 2023

You could try making a custom filetype (read the fine manual) if one of the existing highlighters is "good enough" when given your keyword list (maybe C), and if a parser is good enough (probably not). Otherwise a parser needs to be contributed to Universal ctags where Geany gets its parsers from, and/or a highlighter contributed to Lexilla where Geany gets its highlighters from.

Edit: When either a parser or lexer is available it can be contributed to Geany with the necessary code to make a built-in filetype.

@andy5995
Copy link
Contributor

@Ndashka-Dev Here is a filetypes def I've started (It only partially works)

# For complete documentation of this file, please see Geany's main documentation
[styling=C]

[keywords]
# all items must be in one line
primary=alignof as async await break const continue defer else enum errno export extern fn for if inline noinline noreturn null pub resume return sizeof static struct switch test true false try var
secondary=bool f16 f32 f64 f128 i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize void

[lexer_properties=C]

[settings]
lexer_filetype=C
# default extension used when saving files
extension=zig

# single comments, like # in this file
comment_single=//

# set to false if a comment character/string should start at column 0 of a line, true uses any
# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d
# 		//command_example();
# setting to false would generate this
# //		command_example();
# This setting works only for single line comments
comment_use_indent=true

# context action command (please see Geany's main documentation for details)
context_action_cmd=

[indentation]
width=4
# 0 is spaces, 1 is tabs, 2 is tab & spaces
#type=0

error_regex= --> (.+):([0-9]+):([0-9]+)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants