briankendall / vscode-indent-to-bracket

Extension for VS Code that adds "indent to bracket" behavior available in Sublime Text and other editors
The Unlicense
6 stars 4 forks source link

Breaks vim plugins #4

Open dwlsalmeida opened 5 years ago

dwlsalmeida commented 5 years ago

Specifically this https://marketplace.visualstudio.com/items?itemName=vscodevim.vim

but a few others too..

briankendall commented 5 years ago

Unfortunately there's no way for this plugin not to break this vim plugins since it uses the same technique of overriding Code's type command. As far as I understand, only one extension can do that at a time. Until Code introduces a more direct API for modifying formatting behavior on the fly I'm afraid there's nothing I can do to fix this.

dwlsalmeida commented 5 years ago

@briankendall Then I suggest a shortcut to toggle this extension. It does not need to be on all the time.

dwlsalmeida commented 3 years ago

I suppose nothing has changed regarding this? :/ If this could work on the modified lines whenever the file is saved I believe this issue would be solved. I would help if I could but I know nothing about javascript let alone vscode extension programming...

briankendall commented 3 years ago

Admittedly I haven't touched this in a while, especially since it's been working for me (as I do not use vim plugins).

I haven't checked back to see whether Code has added the necessary APIs to allow this without overriding type. If it has then I could update the extension.

j-proc commented 3 years ago

Just an FYI https://github.com/microsoft/vscode/issues/13441

There's been a lot of issues. The latest discussion does seem to imply an ability to make a temporary claim.

briankendall commented 3 years ago

I've been waiting for VSCode to implement a proper API for hooking into typing since I first wrote this extension. (And apparently others have been waiting even longer than that!) It seems that it still does not have the API required.