Skip to content

Commit 639e31d

Browse files
committed
refactor: Options => TroubleOptions
1 parent 36b6813 commit 639e31d

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

.nvim.lsp.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"Lua.diagnostics.disable": ["undefined-local"]
3+
}

lua/trouble/config.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ local M = {}
22

33
M.namespace = vim.api.nvim_create_namespace("Trouble")
44

5-
---@class Options
5+
---@class TroubleOptions
66
---@field buf number|nil
77
---@field win number|nil
88
-- TODO: make some options configurable per mode
@@ -52,10 +52,10 @@ local defaults = {
5252
use_lsp_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client
5353
}
5454

55-
---@type Options
55+
---@type TroubleOptions
5656
M.options = {}
57+
---@return TroubleOptions
5758

58-
---@return Options
5959
function M.setup(options)
6060
M.options = vim.tbl_deep_extend("force", {}, defaults, options or {})
6161
M.fix_mode(M.options)

lua/trouble/providers/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ M.providers = {
1616
telescope = telescope.telescope,
1717
}
1818

19-
---@param options Options
19+
---@param options TroubleOptions
2020
function M.get(win, buf, cb, options)
2121
local name = options.mode
2222
local provider = M.providers[name]

lua/trouble/providers/lsp.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ local util = require("trouble.util")
44
---@class Lsp
55
local M = {}
66

7-
---@param options Options
7+
---@param options TroubleOptions
88
---@return Item[]
99
function M.diagnostics(_win, buf, cb, options)
1010
if options.mode == "lsp_workspace_diagnostics" then

0 commit comments

Comments
 (0)