diff options
| author | halfcrazy | 2026-01-25 15:25:25 +0800 |
|---|---|---|
| committer | GitHub | 2026-01-25 16:25:25 +0900 |
| commit | c0dd8167a6fc469105e2cd8ef8a4e73cdf04e4d8 (patch) | |
| tree | 4ad5c2b0f6aa26413adae1ad5ae0ba606e4921bc /lua | |
| parent | 8eb4803da99a575bc827a6c814e63b1053b7002f (diff) | |
| download | ale-c0dd8167a6fc469105e2cd8ef8a4e73cdf04e4d8.tar.gz | |
fix gopls without setting alegogoplsinitoptions (#5059)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/ale/lsp.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lua/ale/lsp.lua b/lua/ale/lsp.lua index 6c54db126..5df3097ab 100644 --- a/lua/ale/lsp.lua +++ b/lua/ale/lsp.lua @@ -8,6 +8,14 @@ module.start = function(config) config.init_options[true] = nil end + -- ensure init_options uses empty_dict if empty + if type(config.init_options) == "table" + and next(config.init_options) == nil + and getmetatable(config.init_options) == nil + then + config.init_options = vim.empty_dict() + end + -- If configuring LSP via a socket connection, then generate the cmd -- using vim.lsp.rpc.connect(), as defined in Neovim documentation. if config.host then |