generated from AstroNvim/template
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
Use rgroli/other plugin with custom config to switch between files under the src and test trees
Add Clojure configuration for 'other', share by dominicm on Clojurians Slack.
{
"rgroli/other.nvim",
main = "other-nvim",
opts = {
mappings = {
{
context = "test",
pattern = function(path)
local match = vim.fn.matchlist(path, '\\v^(.*)/src/(.{-}_test)@!(.{-}).clj(.?)')
if #match > 0 then
return match
end
end,
target = "%2/test/%4_test.clj%5"
},
{
context = "implementation",
pattern = "(.*)/test/(.*)_test.clj(.?)$",
target = "%1/src/%2.clj%3",
},
},
},
},Tasks
- Check Astrocommunity for other plugin - not included
- Package rgroli/other.nvim for Astrocommunity #24
- Add localleader key binding to toggle current file (and any other key bindings that are useful
- Add clojure specific menu (although this can be used for many other languages
Key map suggestions
-
localleader t sto switch buffer,localleader t Screate split -
leader l osub-menu containing all :Other commands - AstroNvim find menu ?
leader f ior as sub-menu - look at key map for 'project' style plugins, e.g.
leader P osub-menu with a as shortcut (alternate) - matches Emacs projectile
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done