Skip to content

Commit

Permalink
🚨 use # for table length not the deprecated table.getn
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhomer committed Oct 6, 2024
1 parent 21c0724 commit d02c4a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions dotfiles/nvim/.config/nvim/lua/config/which_key.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ whichKey.add({
{ "<leader>,.", group = "profile" },
})

local findNamedFile = {
"<cmd>lua require'telescope.builtin'.find_files({find_command={'fd', '-H', '-i', vim.fn.expand('<cword>')}})<cr>",
"Find named file",
}
-- local findNamedFile = {
-- "<cmd>lua require'telescope.builtin'.find_files({find_command={'fd', '-H', '-i', vim.fn.expand('<cword>')}})<cr>",
-- "Find named file",
-- }

local my = require("myutils")
whichKey.add({
Expand Down
2 changes: 1 addition & 1 deletion dotfiles/nvim/.config/nvim/lua/myutils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function M.find_node_process()
return processOnPort
end
local processesMatchingNode = M.find_named_processes("node")
if table.getn(processesMatchingNode) == 1 then
if #processesMatchingNode == 1 then
return processesMatchingNode[0].pid
end
return processesMatchingNode
Expand Down

0 comments on commit d02c4a8

Please sign in to comment.