@lru_cache(maxsize=<NUM_LIT:32>)<EOL><INDENT>def settings(self, document_path=None):<DEDENT>
settings = {}<EOL>sources = self._settings.get('<STR_LIT>', DEFAULT_CONFIG_SOURCES)<EOL>for source_name in reversed(sources):<EOL><INDENT>source = self._config_sources.get(source_name)<EOL>if not source:<EOL><INDENT>continue<EOL><DEDENT>source_conf = source.user_config()<EOL>log.debug("<STR_LIT>", source.__class__.__name__, source_conf)<EOL>settings = _utils.merge_dicts(settings, source_conf)<EOL><DEDENT>log.debug("<STR_LIT>", settings)<EOL>settings = _utils.merge_dicts(settings, self._plugin_settings)<EOL>log.debug("<STR_LIT>", settings)<EOL>settings = _utils.merge_dicts(settings, self._settings)<EOL>log.debug("<STR_LIT>", settings)<EOL>for source_name in reversed(sources):<EOL><INDENT>source = self._config_sources.get(source_name)<EOL>if not source:<EOL><INDENT>continue<EOL><DEDENT>source_conf = source.project_config(document_path or self._root_path)<EOL>log.debug("<STR_LIT>", source.__class__.__name__, source_conf)<EOL>settings = _utils.merge_dicts(settings, source_conf)<EOL><DEDENT>log.debug("<STR_LIT>", settings)<EOL>return settings<EOL>
Settings are constructed from a few sources:

            1. User settings, found in user's home directory
            2. Plugin settings, reported by PyLS plugins
            3. LSP settings, given to us from didChangeConfiguration
            4. Project settings, found in config files in the current project.

        Since this function is nondeterministic, it is important to call
        settings.cache_clear() when the config is updated