return cmds as a module

This commit is contained in:
2022-02-02 21:31:31 +03:00
parent fa176e51af
commit d9e217383e
2 changed files with 9 additions and 5 deletions

View File

@@ -1,6 +1,8 @@
local yank = require("user.utils").yank
function open_terminal(vertically)
local M = {}
M.open_terminal = function(vertically)
vertically = vertically or false
if vertically then
@@ -10,7 +12,7 @@ function open_terminal(vertically)
end
end
function copy_diagnostic_message()
M.copy_diagnostic_message = function()
local diagnostics = vim.lsp.diagnostic.get_line_diagnostics()
if #diagnostics == 0 then
@@ -26,3 +28,5 @@ function copy_diagnostic_message()
print("Diagnostic message was yanked")
end
return M