diff --git a/after/ftplugin/ruby.lua b/after/ftplugin/ruby.lua index 4f14c0b..6b97de6 100644 --- a/after/ftplugin/ruby.lua +++ b/after/ftplugin/ruby.lua @@ -1,3 +1,9 @@ +-- after/ftplugin/ruby.lua +local lspconfig = require("lspconfig") +lspconfig.ruby_lsp.setup({ + cmd = { vim.fn.expand("~/.asdf/shims/ruby"), "-S", "ruby-lsp" }, +}) + local map = LazyVim.safe_keymap_set -- map("n", "x", ":lua RunInTerminal('ruby ' .. vim.fn.expand('%'), true)", { buffer = true }) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua new file mode 100644 index 0000000..a1f184f --- /dev/null +++ b/lua/plugins/lsp.lua @@ -0,0 +1,10 @@ +return { + "neovim/nvim-lspconfig", + opts = function(_, opts) + print("heeeey") + opts.servers = opts.servers or {} + opts.servers.ruby_lsp = vim.tbl_deep_extend("force", opts.servers.ruby_lsp or {}, { + cmd = { vim.fn.expand("~/.asdf/shims/ruby"), "-S", "ruby-lsp" }, + }) + end, +}