summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dotfiles/fish/conf.d/ai.fish23
-rw-r--r--dotfiles/helix/config.toml2
-rw-r--r--dotfiles/helix/languages.toml12
-rw-r--r--dotfiles/zsh/zshrc_d/supersync.source.zsh30
4 files changed, 32 insertions, 35 deletions
diff --git a/dotfiles/fish/conf.d/ai.fish b/dotfiles/fish/conf.d/ai.fish
index d4bad07..1315ab7 100644
--- a/dotfiles/fish/conf.d/ai.fish
+++ b/dotfiles/fish/conf.d/ai.fish
@@ -1,19 +1,4 @@
-# AI tools in here need API keys to be configured. That's
-# not done automatically through Rex yet.
-
-function ai::chatgpt
- chatgpt $argv | less
-end
-alias gpt="ai::chatgpt"
-alias gpti="chatgpt --interactive"
-
-function copilot::suggest
- gh copilot suggest $argv
-end
-
-function copilot::explain
- gh copilot explain $argv
-end
-
-alias suggest="copilot::suggest"
-alias explain="copilot::explain"
+abbr -a gpt chatgpt
+abbr -a gpti "chatgpt --interactive"
+abbr -a suggest 'gh copilot suggest'
+abbr -a explain 'gh copilot explain'
diff --git a/dotfiles/helix/config.toml b/dotfiles/helix/config.toml
index 99f725b..331a38e 100644
--- a/dotfiles/helix/config.toml
+++ b/dotfiles/helix/config.toml
@@ -1,4 +1,4 @@
-theme = "rose_pine_dawn"
+theme = "snazzy"
[editor]
bufferline = "always"
diff --git a/dotfiles/helix/languages.toml b/dotfiles/helix/languages.toml
index fe2b02d..9888a31 100644
--- a/dotfiles/helix/languages.toml
+++ b/dotfiles/helix/languages.toml
@@ -125,6 +125,18 @@ comment-token = "#"
language-servers = [ "bash-language-server", "gpt" ]
indent = { tab-width = 2, unit = " " }
+[[language]]
+name = "fish"
+# scope = "source.fish"
+# injection-regex = "(fish)"
+# file-types = [
+# "fish",
+# ]
+# shebangs = ["fish" ]
+# comment-token = "#"
+language-servers = [ "fish-lsp", "gpt" ]
+# indent = { tab-width = 4, unit = " " }
+
[[grammar]]
name = "bash"
source = { git = "https://github.com/tree-sitter/tree-sitter-bash", rev = "275effdfc0edce774acf7d481f9ea195c6c403cd" }
diff --git a/dotfiles/zsh/zshrc_d/supersync.source.zsh b/dotfiles/zsh/zshrc_d/supersync.source.zsh
index 93e6dcb..06a9fbc 100644
--- a/dotfiles/zsh/zshrc_d/supersync.source.zsh
+++ b/dotfiles/zsh/zshrc_d/supersync.source.zsh
@@ -1,26 +1,26 @@
-set -x SUPERSYNC_STAMP_FILE ~/.supersync.last
+export SUPERSYNC_STAMP_FILE=~/.supersync.last
-function supersync::is_it_time_to_sync
- set -l max_age 86400
- set -l now (date +%s)
- if test -f $SUPERSYNC_STAMP_FILE
- set -l diff (math $now - (cat $SUPERSYNC_STAMP_FILE))
- if test $diff -lt $max_age
+supersync::is_it_time_to_sync () {
+ local max_age=86400
+ local now=$(date +%s)
+ if [[ -f $SUPERSYNC_STAMP_FILE ]]; then
+ local diff=$(( now - $(cat $SUPERSYNC_STAMP_FILE) ))
+ if [[ $diff -lt $max_age ]]; then
return 0
- end
- end
+ fi
+ fi
echo 'It is time to run supersync!!!'
-end
+}
-function supersync::sync
+supersync::sync () {
worktime::sync
uprecords::sync
task::sync
- if test -f $GOS_BIN
+ if [[ -f $GOS_BIN ]]; then
gos
- end
+ fi
date +%s > $SUPERSYNC_STAMP_FILE.tmp
mv $SUPERSYNC_STAMP_FILE.tmp $SUPERSYNC_STAMP_FILE
-end
+}
-alias supersync=supersync::sync
+alias supersync='supersync::sync'