Skip to content

Commit

Permalink
Switch to using symfony_lsp
Browse files Browse the repository at this point in the history
  • Loading branch information
RhydianJenkins committed Feb 3, 2024
1 parent 3f5deea commit bcc700a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
14 changes: 9 additions & 5 deletions nvim/after/plugin/lsp_test.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
local lspconfig = require("lspconfig")
local util = require("lspconfig.util")
local configs = require("lspconfig.configs")
local cmp_nvim_lsp = require("cmp_nvim_lsp")

if not configs.lsp_test then
configs.lsp_test = {
if not configs.symfony_lsp then
configs.symfony_lsp = {
default_config = {
cmd = { "lsp_test", "--stdio" },
cmd_cwd = "/home/rhydian/projects/lsp_test/target/release",
filetypes = { "lua" },
cmd = { "symfony_lsp" },
filetypes = { "php", "yml", "yaml" },
root_dir = util.find_git_ancestor,
},
}
end

vim.lsp.set_log_level("debug")
8 changes: 4 additions & 4 deletions nvim/after/plugin/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@ local function on_attach(client, bufnr)
end
end

lspconfig.lsp_test.setup({
on_attach = on_attach,
})

---@param client any
---@param bufnr number
local function on_attach_with_format(client, bufnr)
Expand All @@ -151,6 +147,10 @@ local function on_attach_with_format(client, bufnr)
return on_attach(client, bufnr)
end

lspconfig.symfony_lsp.setup({
on_attach = on_attach,
})

mason_lspconfig.setup_handlers({
function(server)
lspconfig[server].setup({
Expand Down

0 comments on commit bcc700a

Please sign in to comment.