Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
config:docker-compose [2019/06/24 20:56] – Fix recognizing Dockerfile* janax | config:docker-compose [2024/06/02 16:46] (current) – Remove Dockerfile filetype as it is included in Geany enrico | ||
---|---|---|---|
Line 5: | Line 5: | ||
[[http:// | [[http:// | ||
- | This page describe how to add basic Dockerfile | + | This page describe how to add basic docker-compose file syntax highlighting |
- | In addition, it adds docker-compose syntax highlighting. | + | |
+ | // | ||
+ | For older versions, the filetype can be manually installed from https:// | ||
===== Step 1) ===== | ===== Step 1) ===== | ||
Line 13: | Line 16: | ||
<file properties> | <file properties> | ||
[Extensions] | [Extensions] | ||
- | Dockerfile=Dockerfile*; | + | DockerCompose=docker-compose*.yml;docker-compose*.yaml;compose.yml;compose.yaml |
- | YAML= | + | |
- | YML=*.yaml;*.yml; | + | |
[Groups] | [Groups] | ||
- | Script=Dockerfile; | + | Script=DockerCompose; |
- | Misc=YML; | + | |
</ | </ | ||
- | (For the interested : it seems as the default YAML is a built-in, which cannot be removed. | ||
===== Step 2) ===== | ===== Step 2) ===== | ||
- | Save the configuration file below in your Geany filetype definition files config directory, e.g. // | + | Save the configuration file below in your Geany filetype definition files config directory, e.g. // |
- | <file properties filetypes.Dockerfile.conf> | + | <file properties filetypes.DockerCompose.conf> |
# For complete documentation of this file, please see Geany' | # For complete documentation of this file, please see Geany' | ||
# | # | ||
- | # Geany Color Syntax support for Dockerfiles | + | # Geany Color Syntax support for Docker-Compose |
- | # | + | |
- | # It can also parse docker-compose | + | |
- | # but requires commenting out the YAML-row in the Geany installation filetype_extensions.conf | + | |
- | # | + | |
- | # version 0.3 | + | |
- | # | + | |
- | # 0.1 - estadieu.pl@gmail.com | + | |
- | # 0.2 - axelsson.jan@gmail.com | + | |
- | # 0.3 - axelsson.jan@gmail.com | + | |
- | + | ||
- | [styling] | + | |
- | default=default | + | |
- | commentline=comment_line | + | |
- | number=number_1 | + | |
- | string=string_1 | + | |
- | word=keyword_1 | + | |
- | + | # Use the Python filetype as base for better highlighting of YAML keys according to defined keywords | |
- | [keywords] | + | [styling=Python] |
- | primary= ADD ARG CMD COPY ENTRYPOINT ENV EXPOSE FROM HEALTHCHECK LABEL ONBUILD RUN SHELL STOPSIGNAL USER VOLUME WORKDIR build container_name context command default depends_on dns dockerfile entrypoint environment env_file expose external extra_hosts external_links file hostname image labels links name network ports service services version volumes devices | + | |
- | + | [lexer_properties=Python] | |
- | [settings] | + | |
- | lexer_filetype=Python | + | |
- | + | ||
- | # single comments, like # in this file | + | |
- | comment_single=# | + | |
- | + | ||
- | # set to false if a comment character/ | + | |
- | # indentation of the line, e.g. setting to true causes the following on pressing CTRL+d | + | |
- | # | + | |
- | # setting to false would generate this | + | |
- | # | + | |
- | # This setting works only for single line comments | + | |
- | comment_use_indent=false | + | |
- | # context action command (please see Geany' | + | |
- | context_action_cmd=xdg-open " | + | |
- | + | ||
- | # | + | |
- | + | ||
- | + | ||
- | </ | + | |
- | + | ||
- | + | ||
- | ===== Step 3) ===== | + | |
- | + | ||
- | Save the configuration file below in your Geany filetype definition files config directory, e.g. // | + | |
- | + | ||
- | <file properties filetypes.YML.conf> | + | |
- | # For complete documentation of this file, please see Geany' | + | |
- | [styling] | + | |
- | # Edit these in the colorscheme .conf file instead | + | |
- | default=default | + | |
- | comment=comment | + | |
- | identifier=identifier | + | |
- | keyword=keyword_1 | + | |
- | number=number_1 | + | |
- | reference=function | + | |
- | document=preprocessor | + | |
- | text=string_1 | + | |
- | error=error | + | |
- | operator=operator | + | |
[keywords] | [keywords] | ||
- | # all items must be in one line | + | primary=aliases annotations app_protocol args attach attachable aux_addresses blkio_config build cap_add cap_drop cgroup cgroup_parent command condition configs container_name content context cpu_count cpu_percent cpu_period cpu_quota cpu_rt_period cpu_rt_runtime cpu_shares cpus cpuset credential_spec default depends_on deploy develop device_cgroup_rules device_read_bps device_read_iop device_read_iops device_write_bps device_write_iops devices disable dns dns_opt dns_search dockerfile domainname drive driver_opts enable_ipv6 entrypoint env_file environment expose extends external external_links extra_hosts file gateway gid group_add hard healthcheck host_ip hostname image init internal interval ip_range ipam ipc ipv4_address ipv6_address isolation labels link_local_ips links logging mac_address mem_limit mem_reservation mem_swappiness memswap_limit mode name network network_mode networks nofile nproc oom_kill_disable oom_score_adj options path pid pids_limit platform ports priority privileged profiles protocol published pull_policy rate read_only required restart retries runtime scale secrets security_opt service services shm_size soft source start_interval start_period stdin_open stop_grace_period stop_signal storage_opt subnet sysctls target test timeout tmpfs tty type uid ulimits user userns_mode uts version volumes volumes_from weight weight_device working_dir |
- | keywords= true false yes no | + | identifiers=false |
[settings] | [settings] | ||
- | lexer_filetype=YAML | + | lexer_filetype=Python |
- | # default extension used when saving files | + | |
extension=yaml | extension=yaml | ||
- | |||
- | # MIME type | ||
mime_type=application/ | mime_type=application/ | ||
- | |||
- | # the following characters are these which a " | ||
- | # | ||
- | |||
- | # single comments, like # in this file | ||
comment_single=# | comment_single=# | ||
- | # multiline comments | ||
- | # | ||
- | # | ||
- | # set to false if a comment character/string should start at column 0 of a line, true uses any | + | context_action_cmd=xdg-open " |
- | # indentation of the line, e.g. setting to true causes the following on pressing CTRL+d | + | |
- | # | + | |
- | # setting to false would generate this | + | |
- | # | + | |
- | # This setting works only for single line comments | + | |
- | comment_use_indent=true | + | |
- | # context action command (please see Geany' | + | </ |
- | context_action_cmd= | + | |
- | [indentation] | ||
- | #width=4 | ||
- | # 0 is spaces, 1 is tabs, 2 is tab & spaces | ||
- | #type=1 | ||
- | |||
- | </ | ||
- | (For the interested : this is a copy of the default filetypes.yaml) | ||
+ | {{tag> | ||
- | {{tag> |