Skip to content

Commit

Permalink
chore(goimpl): setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ttak0422 committed Dec 26, 2024
1 parent d9bb44b commit ae9f9d8
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 0 deletions.
34 changes: 34 additions & 0 deletions flake.lock

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

8 changes: 8 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1356,6 +1356,14 @@
url = "github:maxandron/goplements.nvim";
flake = false;
};
goimpl-nvim = {
url = "github:edolphin-ydf/goimpl.nvim";
flake = false;
};
popup-nvim = {
url = "github:nvim-lua/popup.nvim";
flake = false;
};
};

outputs =
Expand Down
12 changes: 12 additions & 0 deletions fnl/after/go.fnl
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
(set vim.opt_local.expandtab false)

;; depends goimpl
(let [opts (fn [d] {:noremap false :silent true :buffer true :desc d})]
(each [mode ks (pairs {:n [[:<LocalLeader>fi
(fn []
((-> (require :telescope)
(. :extensions)
(. :goimpl)
(. :goimpl))))
(opts " generate stub for I/F")]]})]
(each [_ k (ipairs ks)]
(vim.keymap.set mode (. k 1) (. k 2) (. k 3)))))
2 changes: 2 additions & 0 deletions fnl/goimpl.fnl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
;; depends telescope
((. (require :telescope) :load_extension) :goimpl)
13 changes: 13 additions & 0 deletions lua/autogen/after/go.lua

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

2 changes: 2 additions & 0 deletions lua/autogen/goimpl.lua

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

8 changes: 8 additions & 0 deletions main/language.nix
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ rec {
package = goplements-nvim;
postConfig = read ../lua/autogen/goplements.lua;
}
{
package = goimpl-nvim;
postConfig = read ../lua/autogen/goimpl.lua;
depends = [
search.telescope
popup-nvim
];
}
];
postConfig = read ../lua/autogen/gopher.lua;
extraPackages = with pkgs; [
Expand Down

0 comments on commit ae9f9d8

Please sign in to comment.