Skip to content

Commit 6416730

Browse files
committed
Fix opencode solargraph lsp
anomalyco/opencode#7405 (comment)
1 parent 24091ac commit 6416730

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎.zshrc‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,6 @@ export PATH="/Users/lekemula/Projects/finlink/dev-pal/exe:$PATH"
109109

110110
# Primarily for Claude Github Plugin
111111
export GITHUB_PERSONAL_ACCESS_TOKEN=$(gh auth token)
112+
113+
# https://github.com/anomalyco/opencode/issues/7405#issuecomment-4018473781
114+
export OPENCODE_EXPERIMENTAL_LSP_TOOL=true

‎nvim/lua/lsp_settings.lua‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ local timestamped_output_file = "/tmp/solargraph_vernier_profile_" .. os.date("%
5454
local solargraph_cmd
5555
if os.getenv("SOLARGRAPH_PROFILE") then
5656
-- solargraph_cmd = { "vernier", "run", "--allocation-interval", "10", "--output", timestamped_output_file, "--", "solargraph", "stdio" }
57-
solargraph_cmd = { "vernier", "run", "--output", timestamped_output_file, "--", "solargraph", "stdio" }
57+
solargraph_cmd = { "vernier", "run", "--out", timestamped_output_file, "--", "solargraph", "stdio" }
5858
elseif os.getenv("SOLARGRAPH_PROFILE_MEMORY") then
5959
-- ruby-memory-profiler run --pretty --output solargraph_memory_profile.json.gz -- solargraph stdio
6060
solargraph_cmd = { "ruby-memory-profiler", "run", "--pretty", "--output", timestamped_output_file, "--", "solargraph", "stdio" }

‎opencode.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
},
2828
"lsp": {
2929
"solargraph": {
30-
"command": [ "solargraph stdio" ],
31-
"extensions": ["rb", "ruby", "erb", "rake", "gemspec", "ru", "pryrc"],
32-
"settings": {
30+
"command": ["solargraph", "stdio"],
31+
"extensions": [".rb", ".erb", ".rake", ".gemspec", ".ru", ".pryrc"],
32+
"initialization": {
3333
"solargraph": {
3434
"diagnostics": true,
3535
"completion": true,

0 commit comments

Comments
 (0)