Skip to content

Commit 9948d09

Browse files
committed
refactor(lsp): use vim.lsp.config api and lspconfig as a backend directly
1 parent 4f023db commit 9948d09

File tree

3 files changed

+3
-69
lines changed

3 files changed

+3
-69
lines changed

lazy-lock.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"blink.cmp": { "branch": "main", "commit": "cb5e346d9e0efa7a3eee7fd4da0b690c48d2a98e" },
33
"catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" },
4-
"dropbar": { "branch": "master", "commit": "a64fc20c4ec7e10fc92dc80312457010755bb019" },
4+
"dropbar": { "branch": "master", "commit": "c853c7b5ce4c13aceab39ef88e77f8b8669d638e" },
55
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
66
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
77
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
8-
"lspconfig": { "branch": "master", "commit": "f9b6a702b7430aff0770c04771f2dba78163d2c6" },
8+
"lspconfig": { "branch": "master", "commit": "81920264a264144bd075f7f48f0c4356fc2c6236" },
99
"mini": { "branch": "main", "commit": "b418d585d99bd1c1a4b04dc8b2c585471665173a" },
1010
"render-markdown.nvim": { "branch": "main", "commit": "8bb0d4725cc4909a603158d44ff28b6158ad9278" },
1111
"snacks": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },

lua/lsp.lua

Lines changed: 1 addition & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -46,70 +46,5 @@ capabilities.experimental = {
4646
},
4747
}
4848

49-
local lspconfig = require "lspconfig"
49+
vim.lsp.enable('lua_ls')
5050

51-
lspconfig.rust_analyzer.setup {}
52-
53-
lspconfig.lua_ls.setup {
54-
filetypes = { "lua" },
55-
settings = {
56-
Lua = {
57-
runtime = {
58-
version = "LuaJIT",
59-
},
60-
completion = {
61-
callSnippet = "Replace",
62-
},
63-
diagnostics = {
64-
globals = { "vim" },
65-
},
66-
format = {
67-
defaultConfig = {
68-
},
69-
},
70-
hint = {
71-
enable = true,
72-
arrayIndex = 'Enable',
73-
},
74-
},
75-
},
76-
}
77-
78-
lspconfig.bashls.setup {}
79-
80-
lspconfig.gopls.setup {}
81-
82-
lspconfig.ts_ls.setup {
83-
settings = {
84-
completions = {
85-
completeFunctionCalls = true,
86-
},
87-
},
88-
}
89-
90-
lspconfig.nixd.setup({
91-
cmd = { "nixd" },
92-
settings = {
93-
nixd = {
94-
nixpkgs = {
95-
expr = "import <nixpkgs> { }",
96-
},
97-
formatting = {
98-
command = { "nixfmt" },
99-
},
100-
options = {
101-
home_manager = {
102-
expr = '(builtins.getFlake \"/Users/pwnwriter/.local/nix\").homeConfigurations.earlymoon.options',
103-
},
104-
nix_darwin = {
105-
expr = '(builtins.getFlake \"/Users/pwnwriter/.local/nix\").darwinConfigurations.earlymoon.options',
106-
},
107-
},
108-
},
109-
},
110-
})
111-
112-
113-
lspconfig.gleam.setup {}
114-
115-
lspconfig.zls.setup {}

lua/plugins/lsp.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ return {
22
{
33
"neovim/nvim-lspconfig",
44
name = "lspconfig",
5-
cmd = { "LspInfo", "LspInstall", "LspUninstall" },
65
event = { "BufReadPost", "BufNewFile" },
76
keys = function()
87
require("mappings").lsp()

0 commit comments

Comments
 (0)