Sonic Pi intergration improved by configuring solargraph

This commit is contained in:
2024-10-29 21:11:15 +01:00
parent 294870a25b
commit 9a0c3a4ca2
2 changed files with 40 additions and 25 deletions

View File

@@ -83,6 +83,20 @@ require('mason-lspconfig').setup_handlers({
-- and will be called for each installed server that doesn't have
-- a dedicated handler.
function(server_name) -- default handler (optional)
-- 2024-10-29 Solargraph shall handle ruby AND sonicpi files, add on_init according to documentation
if server_name == "solargraph" then
lspconfig[server_name].setup {
on_attach = on_attach,
config = {
on_init = function(client)
require('sonicpi').lsp_on_init(client, { server_dir = '/opt/sonic-pi/app/server' })
end
},
filetypes = { 'ruby', 'sonicpi' },
}
end
if server_name == 'ts_ls' then
-- taken from https://github.com/vuejs/language-tools
-- If you are using mason.nvim, you can get the ts_plugin_path like this