feat: automatically restart lsp server (opt-in)
This commit is contained in:
parent
440a7cc432
commit
7c198a1b36
7 changed files with 105 additions and 69 deletions
|
|
@ -25,9 +25,12 @@ local default_config = {
|
|||
---@type number
|
||||
timeout = 2000,
|
||||
|
||||
--- timeout for running installer commands(e.g :GoDepsInstall, :GoDepsInstallSync)
|
||||
-- timeout for running installer commands(e.g :GoDepsInstall, :GoDepsInstallSync)
|
||||
installer_timeout = 999999,
|
||||
|
||||
-- restart gopls server after commands like `:GoMod`, `:GoGet`, `:GoWork`
|
||||
restart_lsp = false,
|
||||
|
||||
-- user specified paths to binaries
|
||||
---@class gopher.ConfigCommand
|
||||
commands = {
|
||||
|
|
@ -84,6 +87,7 @@ function config.setup(user_config)
|
|||
vim.validate("log_level", _config.log_level, "number")
|
||||
vim.validate("timeout", _config.timeout, "number")
|
||||
vim.validate("installer_timeout", _config.timeout, "number")
|
||||
vim.validate("restart_lsp", _config.restart_lsp, "boolean")
|
||||
vim.validate("commands", _config.commands, "table")
|
||||
vim.validate("commands.go", _config.commands.go, "string")
|
||||
vim.validate("commands.gomodifytags", _config.commands.gomodifytags, "string")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue