irongit

A Neovim plugin enabling you to solve LeetCode problems.

14 lines354 BLua
1local Text = require("nui.text")
2
3---@class lc.ui.Indent : lc.ui.Line
4local Indent = Text:extend("LeetIndent")
5
6function Indent:init(i, char, hl) --
7 local text = ("\t"):rep(i or 0) .. (char or "")
8 Indent.super.init(self, text, hl)
9end
10
11---@type fun(c: integer, text: string, hl: string): lc.ui.Indent
12local LeetIndent = Indent
13
14return LeetIndent