~glacambre/firenvim

45518a90c41703b53e40200f174832a13c15a267 — glacambre 2 years ago 586a401
Force exit if :qall doesn't work

https://github.com/glacambre/firenvim/issues/49
3 files changed, 7 insertions(+), 1 deletions(-)

M lua/firenvim.lua
M src/background.ts
M tslint.json
M lua/firenvim.lua => lua/firenvim.lua +4 -0
@@ 3,6 3,10 @@ local websocket = require("websocket")
local function close_server(server)
        vim.loop.close(server)
        vim.schedule(function()
                -- Work around https://github.com/glacambre/firenvim/issues/49
                -- Note: important to do this before nvim_command("qall")
                -- because it breaks
                vim.loop.new_timer():start(1000, 100, (function() os.exit() end))
                vim.api.nvim_command("qall!")
        end)
end

M src/background.ts => src/background.ts +2 -1
@@ 145,7 145,8 @@ function fetchSettings() {
        registerErrors(nvim, reject);
        nvim.onMessage.addListener((resp: any) => {
            checkVersion(resp.version);
            return resolve(resp.settings);
            resolve(resp.settings);
            nvim.disconnect();
        });
        nvim.postMessage({
            newInstance: false,

M tslint.json => tslint.json +1 -0
@@ 3,6 3,7 @@
  "rules": {
    "arrow-parens": false,
    "cognitive-complexity": false,
    "comment-format": false,
    "max-line-length": [
      true,
      {