summary refs log tree commit diff
path: root/dot_config/nano/nanorc.tmpl
diff options
context:
space:
mode:
authorAlen <alen@dotfiles.xyz>2023-09-23 21:44:49 +0400
committerAlen <alen@dotfiles.xyz>2023-09-23 21:44:49 +0400
commit9c2aab641b33bcf6cc034406b87cc283e13a660d (patch)
tree3d946b066a3d732062e0659c0490a27ec271aeaa /dot_config/nano/nanorc.tmpl
parent433eefbf83325aa12ea8411979766d1dc65a742d (diff)
Add basic nano config
Diffstat (limited to 'dot_config/nano/nanorc.tmpl')
-rw-r--r--dot_config/nano/nanorc.tmpl13
1 files changed, 13 insertions, 0 deletions
diff --git a/dot_config/nano/nanorc.tmpl b/dot_config/nano/nanorc.tmpl
new file mode 100644
index 0000000..a0de6af
--- /dev/null
+++ b/dot_config/nano/nanorc.tmpl
@@ -0,0 +1,13 @@
+{{- $nanoVersion := .nano.default_version -}}
+{{- if lookPath "nano" -}}
+    {{- $nanoVersion = index (output "nano" "--version" | split " ") "_4" -}}
+{{- end -}}
+{{- output "dot_local/bin/nano_config.py" "generate"
+    "--config" .nano.config
+    "--version" $nanoVersion -}}
+# Extra syntax includes
+{{ range .nano.include_paths -}}
+{{ if (. | lstat) -}}
+include "{{ . }}/*.nanorc"
+{{ end -}}
+{{- end -}}