Skip to content

Commit 975c90c

Browse files
committed
chore(lsp): switch to native lsp in neovim 0.11
1 parent 4bf2e33 commit 975c90c

File tree

4 files changed

+33
-20
lines changed

4 files changed

+33
-20
lines changed

lazy-lock.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
{
2-
"blink.cmp": { "branch": "main", "commit": "4f38ce99a472932d5776337f08f7a8180f1f571a" },
3-
"catppuccin": { "branch": "main", "commit": "b7bbdf93b42866f166af98d39a2563eedb7cabac" },
4-
"dropbar": { "branch": "master", "commit": "cb7c17bb35fe8860d490dfd1d5c45fce40ecba26" },
2+
"blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" },
3+
"catppuccin": { "branch": "main", "commit": "8162a4bd9afb42837a655e404d1f937a87ba95e6" },
4+
"dropbar": { "branch": "master", "commit": "1cb3facee196a4ac7ee31df502d5dddeb77122e7" },
55
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
66
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
77
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
8-
"lspconfig": { "branch": "master", "commit": "46434074f188e6bfccf9d9153dd8be6b1381498b" },
9-
"mini": { "branch": "main", "commit": "90ab64f944a5a63a9efebe6735e1f2c6d4db3613" },
10-
"render-markdown.nvim": { "branch": "main", "commit": "57c7f33f276876c994898683680da9e3a3590d0d" },
8+
"mini": { "branch": "main", "commit": "14ce72476995255fc5cb919da8067f65865e1225" },
9+
"render-markdown.nvim": { "branch": "main", "commit": "ca5c29f6032338b71bdcae9b3e525d131557d363" },
1110
"snacks": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
12-
"treesitter": { "branch": "master", "commit": "94ea4f436d2b59c80f02e293466c374584f03b8c" }
11+
"treesitter": { "branch": "master", "commit": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79" }
1312
}

lua/lsp.lua

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,30 @@ capabilities.experimental = {
4646
},
4747
}
4848

49-
vim.lsp.enable({ 'lua_ls', 'rust_analyzer' })
49+
vim.lsp.config.lua_ls = {
50+
cmd = { "lua-language-server" },
51+
filetypes = { "lua" },
52+
root_markers = { ".luarc.json", ".git", vim.uv.cwd() },
53+
settings = {
54+
Lua = {
55+
telemetry = {
56+
enable = false,
57+
},
58+
},
59+
},
60+
}
61+
vim.lsp.enable("lua_ls")
62+
63+
require('mappings').lsp()
64+
65+
vim.api.nvim_create_user_command("LspLog", function()
66+
vim.cmd.vsplit(vim.lsp.log.get_filename())
67+
end, {
68+
desc = "Get all the lsp logs",
69+
})
5070

71+
vim.api.nvim_create_user_command("LspInfo", function()
72+
vim.cmd("silent checkhealth vim.lsp")
73+
end, {
74+
desc = "Get all the information about all LSP attached",
75+
})

lua/plugins/lsp.lua renamed to lua/plugins/lazydev.lua

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
11
return {
2-
{
3-
"neovim/nvim-lspconfig",
4-
name = "lspconfig",
5-
event = { "BufReadPost", "BufNewFile" },
6-
keys = function()
7-
require("mappings").lsp()
8-
end,
9-
config = function()
10-
require "lsp"
11-
end,
12-
},
13-
142
{
153
{
164
"folke/lazydev.nvim",

lua/plugins/misc.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ return {
4949
require("opts").final()
5050
require("mappings").general()
5151
require("mappings").misc()
52+
require("lsp")
5253
end,
5354
},
5455

0 commit comments

Comments
 (0)