Skip to content

Commit

Permalink
Why was this on _G again?
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed Sep 3, 2024
1 parent 1aa2169 commit 02a2db0
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions ftplugin/lean/switch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ local function segment(word)
return [[\(\<\|[_.']\)\zs]] .. word .. [[\ze\(\>\|[_.']\)]]
end

function _G.switch_lean_simp(original)
if original[2] == '' and original[3] == '' then
return 'simp?'
else
return 'simp'
end
end

vim.b.switch_definitions = {
vim.g.switch_builtins.true_false,
{ '#check', '#eval', '#reduce' },
Expand Down Expand Up @@ -49,7 +41,13 @@ vim.b.switch_definitions = {
{ '', '', '', '' },

{
[ [=[\<simp\(?\?\)\(\s\+only\s\+\[[^\]]*]\)\?]=] ] = _G.switch_lean_simp,
[ [=[\<simp\(?\?\)\(\s\+only\s\+\[[^\]]*]\)\?]=] ] = function(original)
if original[2] == '' and original[3] == '' then
return 'simp?'
else
return 'simp'
end
end,
},

{ [segment 'bot'] = 'top', [segment 'top'] = 'bot' },
Expand Down

0 comments on commit 02a2db0

Please sign in to comment.