Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix formatting on Windows #375

Merged
merged 4 commits into from Oct 8, 2020
Merged

Conversation

princemaple
Copy link
Contributor

Alternative PR to #373

Bring formatting back on Windows. Regression in 0.6.0

Create elixir.yml

try without downcase

fix cwd

Revert test without downcase

fix matching

fix capture

fix missing end

r
@princemaple
Copy link
Contributor Author

🤕 String.replace that takes a replacement function was added in Elixir 1.9

@lukaszsamson
Copy link
Collaborator

🤕 String.replace that takes a replacement function was added in Elixir 1.9

We've just dropped support for elixir 1.7 in 0.6. I wouldn't be happy with dropping 1.8 so soon.

@princemaple
Copy link
Contributor Author

When Elixir 1.11 is out, you can probably drop 1.8. But now, yeah, I agree with you - hence the 🤕 .

@princemaple
Copy link
Contributor Author

Gonna try a new idea.

@@ -815,7 +815,7 @@ defmodule ElixirLS.LanguageServer.Server do

defp set_project_dir(%{project_dir: prev_project_dir, root_uri: root_uri} = state, project_dir)
when is_binary(root_uri) do
root_dir = SourceFile.path_from_uri(root_uri)
root_dir = root_uri |> SourceFile.path_from_uri() |> Path.absname()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this normalizes the project_dir path, so it's in "elixir case" (lower c:/)

@princemaple
Copy link
Contributor Author

@lukaszsamson @axelson this patch should be mergeable now!

  • passes test (works on Elixir 1.8)
  • works on my machine - Windows
  • does not break case sensitive systems

Copy link
Member

@axelson axelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks good now. ❤️

@axelson axelson merged commit fe1e871 into elixir-lsp:master Oct 8, 2020
@princemaple princemaple deleted the patch-matching branch October 8, 2020 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants