Skip to content

Commit

Permalink
chore(other): setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ttak0422 committed Dec 16, 2024
1 parent 8389489 commit 7eec83d
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 5 deletions.
23 changes: 20 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,10 @@
url = "github:Shougo/ddc-source-omni";
flake = false;
};
other-nvim = {
url = "github:rgroli/other.nvim";
flake = false;
};
};

outputs =
Expand Down
3 changes: 2 additions & 1 deletion fnl/hook-buffer.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@
; (dapui.toggle {:reset true})))
(desc "dap toggle ui")]
;; copilot chat
[:<Leader>ta (cmd :CopilotChatToggle)]])]
[:<Leader>ta (cmd :CopilotChatToggle)]
[:<Leader>O (cmd :Other)]])]
(vim.keymap.set :n (. k 1) (. k 2) (or (. k 3) opts)))
(each [_ k (ipairs [;; translate
[:T (cmd "Translate JA")]
Expand Down
29 changes: 29 additions & 0 deletions fnl/other.fnl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
(let [other (require :other-nvim)
window (require :other-nvim.helper.window)
util (require :other-nvim.helper.util)
builtinMappings (require :other-nvim.builtin.mappings)
transformers (require :other-nvim.builtin.transformers)
mappings [:golang]
transformers {:camelToKebap transformers.camelToKebap
:kebapToCamel transformers.kebapToCamel
:pluralize transformers.pluralize
:singularize transformers.singularize}
keybindings {:<cr> "open_file_by_command()"
:<esc> "close_window()"
:q "close_window()"
:<C-c> "close_window()"
:o "open_file()"
:t "open_file_tabnew()"
:v "open_file_vs()"
:s "open_file_sp()"}
style {:border :none
:seperator "|"
:newFileIndicator "(* new *)"
:width 0.7
:minHeight 2}]
(other.setup {:showMissingFiles true
:rememberBuffers true
: mappings
: transformers
: keybindings
: style}))
2 changes: 1 addition & 1 deletion lua/autogen/hook-buffer.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions lua/autogen/other.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions main/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ let
window-picker
lir
oil
other
dotfyle-metadata
copilot-chat
screenkey
Expand Down
5 changes: 5 additions & 0 deletions main/tool.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ rec {
postConfig = read ../lua/autogen/oil.lua;
hooks.modules = [ "oil" ];
};
other = {
package = other-nvim;
postConfig = read ../lua/autogen/other.lua;
hooks.commands = [ "Other" ];
};
dotfyle-metadata = {
package = dotfyle-metadata-nvim;
hooks.commands = [ "DotfyleGenerate" ];
Expand Down

0 comments on commit 7eec83d

Please sign in to comment.