Rename ToggleLspFmt to LspToggleFmt

neovim_0_5
ray-x 3 years ago
parent 1ef00fe742
commit 5b2dcb7cd0

@ -361,6 +361,12 @@ That is where you saw the current symbol been highlighted.
You can override the above highlight to fit your current colorscheme
## commands
| command | function |
|--- |--- |
| LspToggleFmt | toggle lsp auto format |
## Screenshots
colorscheme: [aurora](https://github.com/ray-x/aurora)

@ -55,9 +55,10 @@ _NgConfigValues = {
}
}
vim.cmd("command! -nargs=0 LspLog call v:lua.open_lsp_log()")
vim.cmd("command! -nargs=0 LspRestart call v:lua.reload_lsp()")
vim.cmd("command! -nargs=0 ToggleLspFmt lua require'navigator.lspclient.mapping'.toggle_lspformat()<CR>")
vim.cmd("command! -nargs=0 LspLog lua require'navigator.lspclient.config'.open_lsp_log()")
vim.cmd("command! -nargs=0 LspRestart lua require'navigator.lspclient.config'.reload_lsp()")
vim.cmd(
"command! -nargs=0 LspToggleFmt lua require'navigator.lspclient.mapping'.toggle_lspformat()<CR>")
local extend_config = function(opts)
opts = opts or {}

@ -7,6 +7,7 @@ capabilities.textDocument.completion.completionItem.snippetSupport = true
function M.reload_lsp()
vim.lsp.stop_client(vim.lsp.get_active_clients())
vim.cmd [[edit]]
require'navigator.lspclient.clients'.setup()
end
function M.open_lsp_log()
@ -14,10 +15,4 @@ function M.open_lsp_log()
vim.cmd("edit " .. path)
end
vim.cmd("command! -nargs=0 LspLog call v:lua.open_lsp_log()")
vim.cmd("command! -nargs=0 LspRestart call v:lua.reload_lsp()")
local cfg = {}
require("lsp.clients").setup(cfg)
return M

Loading…
Cancel
Save