nvim/plugin/scaladeps.lua

12 lines
305 B
Lua
Raw Permalink Normal View History

2023-09-08 10:14:51 +00:00
local sbtToScalaCLI = function()
vim.cmd([[s/\s*libraryDependencies\s*+=\s*/\/\/> using dep /]])
vim.cmd([[s/" \(%\+\) "/\=repeat(":", strlen(submatch(1)))/g]])
2023-09-08 10:14:51 +00:00
end
vim.keymap.set(
"n",
"<leader>dep",
sbtToScalaCLI,
{ noremap = true, silent = true, desc = "Convert sbt dependency to Scala CLI" }
)