Shopify / ruby-lsp

An opinionated language server for Ruby
https://shopify.github.io/ruby-lsp/
MIT License
1.35k stars 121 forks source link

vscode/asdf: search the default XDG base data directory #2045

Closed gi closed 1 day ago

gi commented 2 weeks ago

This updates the detection of the asdf data directory for setting the environment variable ASDF_DATA_DIR during activation.

Fixes #2023

Motivation

Fixes #2023

The XDG base directory specification is becoming more popular in outside of Linux. The default base data directory is ~/.local/share where applications store their user data within a directory under the base: e.g. ~/.local/share/asdf.

Implementation

This update includes the XDG base data directory in the list when detecting the location for activation.

Automated Tests

Yes.

Manual Tests

  1. Create the directory ~/.local/share/asdf/shims
  2. Start VS Code
  3. Open Ruby file
andyw8 commented 2 weeks ago

(the rest of the team is at RubyKaigi so there might be a little delay until we ship this)

gi commented 1 week ago

Just bumping this and wondering if the tests could be run so that this is ready to go when reviewed and if approved.

andyw8 commented 1 week ago

Triggered the tests.

vinistock commented 1 day ago

@gi I shipped a few improvements to the ASDF implementation which should fix many of the issues we were seeing before. I think this PR can just add the .local/share directory to the list and that should be good 👍.

gi commented 1 day ago

@vinistock I just tested the latest version, and the changes work on my machine. Thanks for updating. I'm going to close this as the changes are no longer needed.

The issue was fixed by https://github.com/Shopify/ruby-lsp/pull/2006