This repository was archived by the owner on Jul 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +10
-7
lines changed Expand file tree Collapse file tree 5 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 37
37
local function formErrorMsg (cmd , err )
38
38
local msg = " Something went wrong when calling [" .. cmd .name .. " ]\n "
39
39
if cmd .dependencies then
40
- msg = msg .. " \n Please check dependencies firstly" .. " \n "
40
+ msg = msg .. " \n Please check dependencies firstly(required by this command) " .. " \n "
41
41
for _ , d in ipairs (cmd .dependencies ) do
42
42
msg = msg .. " - " .. d .. " \n "
43
43
end
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ local M = {
47
47
{
48
48
name = " DebugTest" ,
49
49
callback = function ()
50
- require (" easy-commands.impl.util.lang" ).CallLanguageSpecificFunc (" DebugTest" )
50
+ require (" easy-commands.impl.util.lang" ).call_language_specific_func (" DebugTest" )
51
51
end ,
52
52
dependencies = {
53
53
" https://github.com/leoluz/nvim-dap-go" ,
@@ -56,7 +56,7 @@ local M = {
56
56
{
57
57
name = " DebugLastTest" ,
58
58
callback = function ()
59
- require (" easy-commands.impl.util.lang" ).CallLanguageSpecificFunc (" DebugLastTest" )
59
+ require (" easy-commands.impl.util.lang" ).call_language_specific_func (" DebugLastTest" )
60
60
end ,
61
61
dependencies = {
62
62
" https://github.com/leoluz/nvim-dap-go" ,
Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ M.GoToTestFile = function()
6
6
local current_file = vim .fn .expand (" %:p" )
7
7
8
8
local jump_to_file
9
- if strings .EndsWithSuffix (current_file , test_suffix ) then
10
- jump_to_file = strings .ReplacePattern (current_file , test_suffix , " .go" )
9
+ if strings .ends_with_suffix (current_file , test_suffix ) then
10
+ jump_to_file = strings .replace_pattern (current_file , test_suffix , " .go" )
11
11
else
12
12
jump_to_file = vim .fn .expand (" %:p:r" ) .. test_suffix
13
13
end
Original file line number Diff line number Diff line change 15
15
16
16
function M .easy_command_split ()
17
17
if vim .g .eacy_command_two_split_mode == true then
18
- require (" easy-commands.impl.util.editor" ).close_all_other_windows ()
18
+ require (" easy-commands.impl.util.editor" ).window .close_all_other_windows ({
19
+ " filesystem" ,
20
+ " Trouble" ,
21
+ })
19
22
end
20
23
vim .cmd (" rightbelow vsplit" )
21
24
end
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ local editor = require("easy-commands.impl.util.editor")
2
2
3
3
--- @functionName string
4
4
local call_language_specific_func = function (functionName )
5
- require (" easy-commands.impl.lang." .. editor .getFiletype ())[functionName ]()
5
+ require (" easy-commands.impl.lang." .. editor .buf . read . get_buf_filetype ())[functionName ]()
6
6
-- local ok, _ = pcall(require("easy-commands.impl.lang." .. editor.getFiletype())[functionName])
7
7
-- if not ok then
8
8
-- vim.notify("There's some error or may not be implemented yet for [" .. editor.getFiletype() .. "] type")
You can’t perform that action at this time.
0 commit comments