{"action":"created","issue":{"url":"https://api.github.com/repos/OmniSharp/omnisharp-atom/issues/660","repository_url":"https://api.github.com/repos/OmniSharp/omnisharp-atom","labels_url":"https://api.github.com/repos/OmniSharp/omnisharp-atom/issues/660/labels{/name}","comments_url":"https://api.github.com/repos/OmniSharp/omnisharp-atom/issues/660/comments","events_url":"https://api.github.com/repos/OmniSharp/omnisharp-atom/issues/660/events","html_url":"https://github.com/OmniSharp/omnisharp-atom/issues/660","id":135270531,"number":660,"title":"code actions don't work when using vim-mode-plus","user":{"login":"andycmaj","id":97470,"avatar_url":"https://avatars.githubusercontent.com/u/97470?v=3","gravatar_id":"","url":"https://api.github.com/users/andycmaj","html_url":"https://github.com/andycmaj","followers_url":"https://api.github.com/users/andycmaj/followers","following_url":"https://api.github.com/users/andycmaj/following{/other_user}","gists_url":"https://api.github.com/users/andycmaj/gists{/gist_id}","starred_url":"https://api.github.com/users/andycmaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andycmaj/subscriptions","organizations_url":"https://api.github.com/users/andycmaj/orgs","repos_url":"https://api.github.com/users/andycmaj/repos","events_url":"https://api.github.com/users/andycmaj/events{/privacy}","received_events_url":"https://api.github.com/users/andycmaj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-21T22:39:47Z","updated_at":"2016-02-22T12:32:07Z","closed_at":null,"body":"Code Actions filter doesn't work when using vim-mode-plus plugin because the show/hide logic is hard-coded to enable/disable `vim-mode`.\r\n\r\nhttps://github.com/OmniSharp/omnisharp-atom/blob/master/lib/views/code-actions-view.ts#L79\r\n```\r\n    public enableVimMode() {\r\n        if (this._vimMode) {\r\n            this._editorElement.classList.add(\"vim-mode\");\r\n        }\r\n    }\r\n\r\n    public disableVimMode() {\r\n        if (this._vimMode) {\r\n            this._editorElement.classList.remove(\"vim-mode\");\r\n        }\r\n    }\r\n```\r\n\r\n### Possible solution 1\r\n\r\nA more extensible way of doing this might be to publish a config change, and then use your init file to observe this config key and enable/disable whatever plugins you want manually.\r\n\r\nFor example\r\n\r\nIn [code-actions-view](https://github.com/OmniSharp/omnisharp-atom/blob/master/lib/views/code-actions-view.ts#L53)\r\n```\r\n    public show() {\r\n        this.storeFocusedElement();\r\n        // Instead of this...\r\n        // this.disableVimMode();\r\n\r\n        // Do this...\r\n        atom.config.set(\"omnisharp.code-actions.visible\", true)\r\n\r\n        this.destroyOverlay();\r\n        this._overlayDecoration = this.editor.decorateMarker(this.editor.getLastCursor().getMarker(),\r\n            { type: \"overlay\", position: \"tail\", item: this });\r\n\r\n        setTimeout(() => this.focusFilterEditor(), 100);\r\n    }\r\n```\r\n\r\nThen in **init.coffee** (haven't tried this, but in theory...)\r\n```\r\natom.config.observe 'omnisharp.code-actions.visible', (newValue, {previous}) =>\r\n        editor = atom.workspace.getActiveTextEditor()\r\n        editor.classList.remove(\"vim-mode-plus\");\r\n```\r\n\r\n### Possible solution 2\r\n\r\nAdd a config value with a comma separated list of scopes/classNames to add/remove from the `editor` when the `code-actions-view` is shown/hidden.\r\n\r\nActually this seems more sane :)\r\n\r\nLet me know if you agree and I can submit a PR..."},"comment":{"url":"https://api.github.com/repos/OmniSharp/omnisharp-atom/issues/comments/187152957","html_url":"https://github.com/OmniSharp/omnisharp-atom/issues/660#issuecomment-187152957","issue_url":"https://api.github.com/repos/OmniSharp/omnisharp-atom/issues/660","id":187152957,"user":{"login":"david-driscoll","id":1269157,"avatar_url":"https://avatars.githubusercontent.com/u/1269157?v=3","gravatar_id":"","url":"https://api.github.com/users/david-driscoll","html_url":"https://github.com/david-driscoll","followers_url":"https://api.github.com/users/david-driscoll/followers","following_url":"https://api.github.com/users/david-driscoll/following{/other_user}","gists_url":"https://api.github.com/users/david-driscoll/gists{/gist_id}","starred_url":"https://api.github.com/users/david-driscoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-driscoll/subscriptions","organizations_url":"https://api.github.com/users/david-driscoll/orgs","repos_url":"https://api.github.com/users/david-driscoll/repos","events_url":"https://api.github.com/users/david-driscoll/events{/privacy}","received_events_url":"https://api.github.com/users/david-driscoll/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T12:32:07Z","updated_at":"2016-02-22T12:32:07Z","body":"sure! I'll keep an eye out for it.\r\n\r\nLet me know if you need any help, feel free to ping me on Github / [Jabbr](https://jabbr.net/#/rooms/omnisharp) / [Twitter](https://twitter.com/david_blacklite)."}}