Skip to content

Commit

Permalink
fix: formatting of text-objects plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Apr 28, 2021
1 parent 6e461ca commit 442d2d3
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 36 deletions.
1 change: 1 addition & 0 deletions lua/which-key/layout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ function Layout:layout(win)
local start = (col - 1) * column_width + self.options.layout.spacing
if col == 1 then start = start + pad_left end
local key = item.key or ""
if key == "<lt>" then key = "<" end
if #key < max_key_width then key = string.rep(" ", max_key_width - #key) .. key end

self.text:set(row + pad_top, start, key, "")
Expand Down
72 changes: 36 additions & 36 deletions lua/which-key/plugins/text-objects.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,42 @@ M.name = "text-objects"
local objects = {
a = { name = "around" },
i = { name = "inside" },
["a\""] = [["double quoted string]],
["a'"] = [["single quoted string]],
["a("] = [["same as ab]],
["a)"] = [["same as ab]],
["a<lt>"] = [[""a <>" from '<' to the matching '>']],
["a>"] = [["same as a<]],
["aB"] = [[""a Block" from "[{" to "]}" (with brackets)]],
["aW"] = [[""a WORD" (with white space)]],
["a["] = [[""a []" from '[' to the matching ']']],
["a]"] = [["same as a[]],
["a`"] = [["string in backticks]],
["ab"] = [[""a block" from "[(" to "])" (with braces)]],
["ap"] = [[""a paragraph" (with white space)]],
["as"] = [[""a sentence" (with white space)]],
["at"] = [[""a tag block" (with white space)]],
["aw"] = [[""a word" (with white space)]],
["a{"] = [["same as aB]],
["a}"] = [["same as aB]],
["i\""] = [["double quoted string without the quotes]],
["i'"] = [["single quoted string without the quotes]],
["i("] = [["same as ib]],
["i)"] = [["same as ib]],
["i<lt>"] = [[""inner <>" from '<' to the matching '>']],
["i>"] = [["same as i<]],
["iB"] = [[""inner Block" from "[{" and "]}"]],
["iW"] = [[""inner WORD"]],
["i["] = [[""inner []" from '[' to the matching ']']],
["i]"] = [["same as i[]],
["i`"] = [["string in backticks without the backticks]],
["ib"] = [[""inner block" from "[(" to "])"]],
["ip"] = [[""inner paragraph"]],
["is"] = [[""inner sentence"]],
["it"] = [[""inner tag block"]],
["iw"] = [[""inner word"]],
["i{"] = [["same as iB]],
["i}"] = [["same as iB]],
["a\""] = [[double quoted string]],
["a'"] = [[single quoted string]],
["a("] = [[same as ab]],
["a)"] = [[same as ab]],
["a<lt>"] = [[a <> from '<' to the matching '>']],
["a>"] = [[same as a<]],
["aB"] = [[a Block from [{ to ]} (with brackets)]],
["aW"] = [[a WORD (with white space)]],
["a["] = [[a [] from '[' to the matching ']']],
["a]"] = [[same as a[]],
["a`"] = [[string in backticks]],
["ab"] = [[a block from [( to ]) (with braces)]],
["ap"] = [[a paragraph (with white space)]],
["as"] = [[a sentence (with white space)]],
["at"] = [[a tag block (with white space)]],
["aw"] = [[a word (with white space)]],
["a{"] = [[same as aB]],
["a}"] = [[same as aB]],
["i\""] = [[double quoted string without the quotes]],
["i'"] = [[single quoted string without the quotes]],
["i("] = [[same as ib]],
["i)"] = [[same as ib]],
["i<lt>"] = [[inner <> from '<' to the matching '>']],
["i>"] = [[same as i<]],
["iB"] = [[inner Block from [{ and ]}]],
["iW"] = [[inner WORD]],
["i["] = [[inner [] from '[' to the matching ']']],
["i]"] = [[same as i[]],
["i`"] = [[string in backticks without the backticks]],
["ib"] = [[inner block from [( to ])]],
["ip"] = [[inner paragraph]],
["is"] = [[inner sentence]],
["it"] = [[inner tag block]],
["iw"] = [[inner word]],
["i{"] = [[same as iB]],
["i}"] = [[same as iB]],
}

function M.setup(wk)
Expand Down

0 comments on commit 442d2d3

Please sign in to comment.