Skip to content

Commit d5351c9

Browse files
committed
feat(lsp): add lspconfig type annotations
Fixes: #154
1 parent 1f9ab64 commit d5351c9

8 files changed

Lines changed: 18 additions & 4 deletions

File tree

‎after/lsp/clangd.lua‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
---@type vim.lsp.Config
22
return {
33
filetypes = { "c", "cpp", "cuda" },
4+
5+
---@type lspconfig.settings.clangd
6+
settings = {},
47
}

‎after/lsp/gopls.lua‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
---@type vim.lsp.Config
77
return {
8+
---@type lspconfig.settings.gopls
89
settings = {
910
gopls = {
1011
gofumpt = true,

‎after/lsp/jsonls.lua‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
---@type vim.lsp.Config
55
return {
6+
---@type lspconfig.settings.jsonls
67
settings = {
78
json = {
89
validate = { enable = true },

‎after/lsp/lua_ls.lua‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
---@type vim.lsp.Config
55
return {
6+
---@type lspconfig.settings.lua_ls
67
settings = {
78
Lua = {
89
codeLens = {

‎after/lsp/ruff.lua‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ return {
99
-- Defer to '(based)pyright' for this.
1010
client.server_capabilities.hoverProvider = false
1111
end,
12+
13+
---@type lspconfig.settings.ruff
14+
settings = {},
1215
}

‎after/lsp/sourcekit.lua‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
---@type vim.lsp.Config
22
return {
33
filetypes = { "swift", "objc", "objcpp" },
4+
5+
---@type lspconfig.settings.sourcekit
6+
settings = {},
47
}

‎after/lsp/yamlls.lua‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
---@type vim.lsp.Config
55
return {
6+
---@type lspconfig.settings.yamlls
67
settings = {
78
yaml = {
89
schemaStore = {

‎lua/peter/plugins/lsp/lazydev.lua‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ return {
2424
-- stylua: ignore
2525
library = {
2626
"lazy.nvim",
27-
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
28-
{ path = "mason.nvim", words = { "peter.lang." } },
29-
{ path = "3rd-party.nvim", words = { "peter.lang." } },
30-
{ path = "conform.nvim", words = { "peter.lang." } },
27+
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
28+
{ path = "mason.nvim", words = { "peter.lang." } },
29+
{ path = "3rd-party.nvim", words = { "peter.lang." } },
30+
{ path = "conform.nvim", words = { "peter.lang." } },
31+
{ path = "nvim-lspconfig", words = { "---@type lspconfig.settings." } },
3132
},
3233
enabled = function(root)
3334
if vim.g.lazydev_enabled ~= nil then

0 commit comments

Comments
 (0)