Sonic Pi intergration improved by configuring solargraph
This commit is contained in:
14
lua/lsp.lua
14
lua/lsp.lua
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user