-
Notifications
You must be signed in to change notification settings - Fork 106
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
feat: add toPipe and fromPipe commands #182
feat: add toPipe and fromPipe commands #182
Conversation
@@ -408,7 +416,15 @@ | |||
}, | |||
{ | |||
"command": "extension.expandMacro", | |||
"title": "editorLangId == elixir" | |||
"when": "editorLangId == elixir || editorLangId == eex || editorLangId == html-eex" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at line 415, this seemed to need a fix
@axelson @lukaszsamson any tips on how to test this locally with the unreleased changes in ElixirLS? Should I just compile the LS and copy the files over to the local extension build for said test? |
@polvalente I think there was a section in the readme some time ago. Maybe it was in the original Jake's repo. Open this repo in vscode and run debug with launch profile: Launch extension. It should build and release elixir-LS from submodule and launch a new debug vscode window. |
This is what I usually do. It looks something like |
Thanks! I've already tested and opened another fix on elixir-ls (elixir-lsp/elixir-ls#521). It seems everything is working as expected, but there is a problem with sigils when there are |
src/extension.ts
Outdated
return; | ||
} | ||
|
||
const uri = editor.document.uri; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This client retrieval is a common part of custom commands and could be extracted into a function
src/extension.ts
Outdated
} | ||
} | ||
|
||
interface ManipulatePipesResponse { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interface not used
@lukaszsamson Sorry this took so long. PR is now ready for review again. One caveat is that ElixirLS needs to be updated in the submodule for this to work properly. I haven't committed this in this PR, but it'll be a necessary fix before releasing this feature :) |
const disposable = vscode.commands.registerCommand(commandName, async () => { | ||
const extension = vscode.extensions.getExtension("jakebecker.elixir-ls"); | ||
const editor = vscode.window.activeTextEditor; | ||
if (!extension || !editor) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the extension check necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly, this just fails faster upon a bizarre error, if that makes sense. I can remove it if you prefer
@polvalente can you resolve merge conflicts? |
@lukaszsamson done. I did it through the web interface, so hopefully I didn't break the code. Please @ me if there are any problems! |
Adds support for the commands defined in elixir-lsp/elixir-ls#515, keeping the fixes in elixir-lsp/elixir-ls#520 in mind