Add an LspRestart command

This commit is contained in:
Jeremy Wall 2023-08-25 09:20:04 -04:00
parent 99b7613dde
commit 9a39d0d4f1
2 changed files with 8 additions and 3 deletions

View File

@ -375,3 +375,8 @@ vim.keymap.set("n", "<Leader>rr", vim.lsp.codelens.run)
-- Show whatever errors we have in our trouble pane
vim.keymap.set("n", "<Leader>se", "<cmd>TroubleToggle<cr>", { silent = true, noremap = true })
vim.api.nvim_create_user_command("LspRestart", function()
vim.lsp.stop_client(vim.lsp.get_active_clients())
vim.cmd("edit")
end, {})

6
nix/darwin/flake.lock generated
View File

@ -34,12 +34,12 @@
},
"locked": {
"lastModified": 1,
"narHash": "sha256-LgQtRMnE0Y5PV4fRX3war7RtEixqP3VaxG3dnUTuar0=",
"path": "/nix/store/dlkbgkad5wnyhlaynh16hrdk7735gd4c-source/nix/base-system",
"narHash": "sha256-XK2JhfLtXZTNOvCsQneGtoMTJ+1OypeZuTwqe4Vfj5o=",
"path": "/nix/store/c42xfjgbyhii3n7djvmfkzn5ic6yimj1-source/nix/base-system",
"type": "path"
},
"original": {
"path": "/nix/store/dlkbgkad5wnyhlaynh16hrdk7735gd4c-source/nix/base-system",
"path": "/nix/store/c42xfjgbyhii3n7djvmfkzn5ic6yimj1-source/nix/base-system",
"type": "path"
}
},