Skip to content

Commit

Permalink
chore: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
tris203 committed May 5, 2024
1 parent 330cc01 commit fbdcf0f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ return {
-- startVisible = true,
-- showBlankVirtLine = true,
-- hints = {
-- Carat = { text = "^", prio = 1 },
-- Caret = { text = "^", prio = 1 },
-- Dollar = { text = "$", prio = 1 },
-- w = { text = "w", prio = 10 },
-- b = { text = "b", prio = 10 },
Expand Down
12 changes: 4 additions & 8 deletions lua/precognition/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ local vm = require("precognition.vertical_motions")

local M = {}

---@alias Dollar "$"
---@alias PrevParagraph "{"
---@alias NextParagraph "}"

---@class HintOpts
---@field text string
---@field prio integer
Expand All @@ -17,7 +13,7 @@ local M = {}
---@field w HintOpts
---@field e HintOpts
---@field b HintOpts
---@field Carat HintOpts
---@field Caret HintOpts
---@field Dollar HintOpts

---@class GutterHintConfig
Expand All @@ -41,7 +37,7 @@ local M = {}
---@field w PlaceLoc
---@field e PlaceLoc
---@field b PlaceLoc
---@field Carat PlaceLoc
---@field Caret PlaceLoc
---@field Dollar PlaceLoc

---@class (exact) Precognition.GutterHints
Expand All @@ -52,7 +48,7 @@ local M = {}

---@type HintConfig
local defaultHintConfig = {
Carat = { text = "^", prio = 1 },
Caret = { text = "^", prio = 1 },
Dollar = { text = "$", prio = 1 },
w = { text = "w", prio = 10 },
b = { text = "b", prio = 9 },
Expand Down Expand Up @@ -204,7 +200,7 @@ local function on_cursor_hold()
--
---@type Precognition.VirtLine
local virtual_line_marks = {
Carat = hm.line_start_non_whitespace(cur_line, cursorcol, line_len),
Caret = hm.line_start_non_whitespace(cur_line, cursorcol, line_len),
w = hm.next_word_boundary(cur_line, cursorcol, line_len),
e = hm.end_of_word(cur_line, cursorcol, line_len),
b = hm.prev_word_boundary(cur_line, cursorcol, line_len),
Expand Down
12 changes: 6 additions & 6 deletions tests/precognition/virtline_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local eq = assert.are.same
describe("Build Virtual Line", function()
it("can build a simple virtual line", function()
local marks = {
Carat = 4,
Caret = 4,
Dollar = 10,
}
local virtual_line = precognition.build_virt_line(marks, 10)
Expand All @@ -15,7 +15,7 @@ describe("Build Virtual Line", function()

it("can build a virtual line with a single mark", function()
local marks = {
Carat = 4,
Caret = 4,
}
local virtual_line = precognition.build_virt_line(marks, 10)
eq(" ^ ", virtual_line[1][1])
Expand All @@ -33,7 +33,7 @@ describe("Build Virtual Line", function()

it("can build a virtual line with a single mark at the beginning", function()
local marks = {
Carat = 1,
Caret = 1,
}
local virtual_line = precognition.build_virt_line(marks, 10)
eq("^ ", virtual_line[1][1])
Expand All @@ -43,7 +43,7 @@ describe("Build Virtual Line", function()
it("can build a complex virtual line", function()
---@type Precognition.VirtLine
local marks = {
Carat = 1,
Caret = 1,
e = 6,
b = 4,
w = 10,
Expand Down Expand Up @@ -81,7 +81,7 @@ describe("Build Virtual Line", function()
w = hm.next_word_boundary(cur_line, cursorcol, line_len),
e = hm.end_of_word(cur_line, cursorcol, line_len),
b = hm.prev_word_boundary(cur_line, cursorcol, line_len),
Carat = hm.line_start_non_whitespace(cur_line, cursorcol, line_len),
Caret = hm.line_start_non_whitespace(cur_line, cursorcol, line_len),
Dollar = hm.line_end(cur_line, cursorcol, line_len),
}, line_len)

Expand All @@ -101,7 +101,7 @@ describe("Build Virtual Line", function()
w = hm.next_word_boundary(cur_line, cursorcol, line_len),
e = hm.end_of_word(cur_line, cursorcol, line_len),
b = hm.prev_word_boundary(cur_line, cursorcol, line_len),
Carat = hm.line_start_non_whitespace(cur_line, cursorcol, line_len),
Caret = hm.line_start_non_whitespace(cur_line, cursorcol, line_len),
Dollar = hm.line_end(cur_line, cursorcol, line_len),
}, line_len)

Expand Down

0 comments on commit fbdcf0f

Please sign in to comment.