Skip to content

Commit

Permalink
refactor: check that token is valid
Browse files Browse the repository at this point in the history
  • Loading branch information
kylo252 committed Feb 21, 2022
1 parent ac7dfb5 commit b1655a3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lua/lspconfig/server_configurations/sourcery.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,19 @@ return {
init_options = {
editor_version = 'vim',
extension_version = 'vim.lsp',
token = '<YOUR_TOKEN>',
token = nil,
},
root_dir = function(fname)
return util.root_pattern(unpack(root_files))(fname) or util.find_git_ancestor(fname)
end,
single_file_support = true,
},
on_new_config = function(new_config, _)
if not new_config.init_options.token then
local notify = vim.notify_once or vim.notify
notify('[lspconfig] The authentication token must be provided in config.init_options', vim.log.levels.ERROR)
end
end,
docs = {
description = [[
https://github.com/sourcery-ai/sourcery
Expand Down

0 comments on commit b1655a3

Please sign in to comment.