Skip to content

Commit

Permalink
fix(config): update emmylua_annotation of lsp.on_attach
Browse files Browse the repository at this point in the history
  • Loading branch information
saecki committed Jul 28, 2024
1 parent 29435f7 commit d1be10c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doc/crates.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ lsp.name *crates-config-lsp-name*


lsp.on_attach *crates-config-lsp-on_attach*
Type: `fun(client: lsp.Client, bufnr: integer)`, Default: `function(client, bufnr) end`
Type: `fun(client: vim.lsp.Client, bufnr: integer)`, Default: `function(client, bufnr) end`

Callback to run when the in-process language server attaches to a buffer.

Expand Down
2 changes: 1 addition & 1 deletion lua/crates/config/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,7 @@ entry(schema_lsp, {
name = "on_attach",
type = {
config_type = "function",
emmylua_annotation = "fun(client: lsp.Client, bufnr: integer)",
emmylua_annotation = "fun(client: vim.lsp.Client, bufnr: integer)",
},
default = function(_client, _bufnr) end,
default_text = "function(client, bufnr) end",
Expand Down
4 changes: 2 additions & 2 deletions lua/crates/config/types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
---@class LspConfig
---@field enabled boolean
---@field name string
---@field on_attach fun(client: lsp.Client, bufnr: integer)
---@field on_attach fun(client: vim.lsp.Client, bufnr: integer)
---@field actions boolean
---@field completion boolean
---@field hover boolean
Expand Down Expand Up @@ -405,7 +405,7 @@
---@class crates.UserLspConfig
---@field public enabled? boolean
---@field public name? string
---@field public on_attach? fun(client: lsp.Client, bufnr: integer)
---@field public on_attach? fun(client: vim.lsp.Client, bufnr: integer)
---@field public actions? boolean
---@field public completion? boolean
---@field public hover? boolean
Expand Down

0 comments on commit d1be10c

Please sign in to comment.