Skip to content

Commit

Permalink
correct misspelled words
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhongjia committed Aug 9, 2023
1 parent 58f59ce commit 65bdb50
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
10 changes: 5 additions & 5 deletions lua/LspUI/_meta.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
--- @field auto_select boolean whether select all string in float window
--- @field key_binding { exec: string, quit: string } keybind for `rename`

--- @class LspUI_lighthulb_config
--- @field enable boolean whether enable `lighthulb` module
--- @class LspUI_lightbulb_config
--- @field enable boolean whether enable `lightbulb` module
--- @field is_cached boolean whether enable cache
--- @field icon string icon for lighthulb
--- @field icon string icon for lightbulb

--- @class LspUI_code_action_config
--- @field enable boolean whether enable `code_action` module
--- @field command_enable boolean whether enable command for `lighthulb`
--- @field command_enable boolean whether enable command for `lightbulb`
--- @field key_binding { exec: string, prev: string, next: string, quit: string } keybind for `code_action`

--- @class LspUI_config config for LspUI
--- @field rename LspUI_rename_config `rename` module
--- @field lighthulb LspUI_lighthulb_config `lighthulb` module
--- @field lightbulb LspUI_lightbulb_config `lightbulb` module
--- @field code_action LspUI_code_action_config `code_action` module
2 changes: 1 addition & 1 deletion lua/LspUI/code_action/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ local lib_windows = require("LspUI.lib.windows")

local M = {}

-- get all valid clients for lighthulb
-- get all valid clients for lightbulb
--- @param buffer_id integer
--- @return lsp.Client[]|nil clients array or nil
M.get_clients = function(buffer_id)
Expand Down
8 changes: 4 additions & 4 deletions lua/LspUI/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ local default_rename_config = {
},
}

--- @type LspUI_lighthulb_config
local default_lighthulb_config = {
--- @type LspUI_lightbulb_config
local default_lightbulb_config = {
enable = true,
-- whether cache code action, if do, code action will use lighthulb's cache
-- whether cache code action, if do, code action will use lightbulb's cache
is_cached = true,
icon = "💡",
}
Expand All @@ -35,7 +35,7 @@ local default_code_action_config = {
--- @type LspUI_config
local default_config = {
rename = default_rename_config,
lighthulb = default_lighthulb_config,
lightbulb = default_lightbulb_config,
code_action = default_code_action_config,
}

Expand Down
2 changes: 1 addition & 1 deletion lua/LspUI/global.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
return {
lighthulb = { sign_name = "Lspui_lightBulb", sign_group = "Lspui_lightBulb" },
lightbulb = { sign_name = "Lspui_lightBulb", sign_group = "Lspui_lightBulb" },
}
10 changes: 5 additions & 5 deletions lua/LspUI/lighthulb/init.lua → lua/LspUI/lightbulb/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local api, fn = vim.api, vim.fn
local lib_notify = require("LspUI.lib.notify")
local lib_util = require("LspUI.lib.util")
local config = require("LspUI.config")
local util = require("LspUI.lighthulb.util")
local util = require("LspUI.lightbulb.util")

local M = {}

Expand All @@ -11,9 +11,9 @@ local is_initialized = false

local lightbulb_group = api.nvim_create_augroup("Lspui_lightBulb", { clear = true })

-- init for lighthulb
-- init for lightbulb
M.init = function()
if not config.options.lighthulb.enable then
if not config.options.lightbulb.enable then
return
end

Expand Down Expand Up @@ -70,9 +70,9 @@ M.init = function()
})
end

-- run for lighthulb
-- run for lightbulb
M.run = function()
lib_notify.Info("lighthulb has no run func")
lib_notify.Info("lightbulb has no run func")
end

return M
8 changes: 4 additions & 4 deletions lua/LspUI/lighthulb/util.lua → lua/LspUI/lightbulb/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local lib_util = require("LspUI.lib.util")

local M = {}

-- get all valid clients for lighthulb
-- get all valid clients for lightbulb
--- @param buffer_id integer
--- @return lsp.Client[]|nil clients array or nil
M.get_clients = function(buffer_id)
Expand All @@ -21,21 +21,21 @@ end
--- @param line integer the line number, and this will be set as sign id
--- @return integer sign_identifier sign's identifier, -1 means failing
M.render = function(buffer_id, line)
return fn.sign_place(line, global.lighthulb.sign_group, global.lighthulb.sign_name, buffer_id, {
return fn.sign_place(line, global.lightbulb.sign_group, global.lightbulb.sign_name, buffer_id, {
lnum = line,
})
end

-- clear sign
M.clear_render = function()
-- TODO:Do you need to add pcall here???
fn.sign_unplace(global.lighthulb.sign_group)
fn.sign_unplace(global.lightbulb.sign_group)
end

-- register the sign
-- note: this func only can be called once!
M.register_sign = function()
fn.sign_define(global.lighthulb.sign_name, { text = config.options.lighthulb.icon })
fn.sign_define(global.lightbulb.sign_name, { text = config.options.lightbulb.icon })
end

-- this function will request all lsp clients
Expand Down
2 changes: 1 addition & 1 deletion lua/LspUI/modules.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
return {
rename = require("LspUI.rename"),
lighthulb = require("LspUI.lighthulb"),
lightbulb = require("LspUI.lightbulb"),
code_action = require("LspUI.code_action"),
}

0 comments on commit 65bdb50

Please sign in to comment.