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
11
lua/gopher/_utils/lsp.lua
Normal file
11
lua/gopher/_utils/lsp.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
local lsp = {}
|
||||
|
||||
local gopls = "gopls"
|
||||
|
||||
-- Restarts gopls server (see: `:h lsp-restart`)
|
||||
function lsp.restart()
|
||||
vim.lsp.enable(gopls, false)
|
||||
vim.lsp.enable(gopls, true)
|
||||
end
|
||||
|
||||
return lsp
|
||||
Loading…
Add table
Add a link
Reference in a new issue