Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

just using the refactoring tool is it possible? #29

Open
dhenfie opened this issue Jan 23, 2022 · 7 comments
Open

just using the refactoring tool is it possible? #29

dhenfie opened this issue Jan 23, 2022 · 7 comments

Comments

@dhenfie
Copy link

dhenfie commented Jan 23, 2022

i just want to use refactor tool is it possible? how do i set it in vscode, where i have to edit the config?.

@BladeMF
Copy link
Contributor

BladeMF commented Jan 23, 2022

If you install the extension and phpactor and it just works. I am not sure you can disable the other language server features, though.

@dhenfie
Copy link
Author

dhenfie commented Jan 24, 2022

Apakah bisa menonaktifkan automplete?

@BladeMF
Copy link
Contributor

BladeMF commented Jan 24, 2022

I don't understand that language.

@dhenfie
Copy link
Author

dhenfie commented Jan 27, 2022

Sorry. How to disable autocomplete.

@ctf0
Copy link

ctf0 commented Jan 5, 2023

i also had the same question as am already using https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client which both have some overlapping features for example the symbol provider, ReferenceFinder, etc..

so the fix for that was create a config file, and remove the support that i dont need ex.

// under "container.extension_classes"
"Phpactor\\Extension\\LanguageServerSymbolProvider\\LanguageServerSymbolProviderExtension",
"Phpactor\\Extension\\LanguageServerReferenceFinder\\LanguageServerReferenceFinderExtension",

@ljuba-roofr
Copy link

Hey @ctf0 could your share your .phpactor.json setup? I'm also trying to use intelephense + phactor for refactoring

I started tweaking extension_classes but some things I'm not able to disable. For example, when I remove all Reference entries from extension_classes I get error below and extension crashes

No service with ID "Phpactor\ReferenceFinder\NameSearcher" exists

@ctf0
Copy link

ctf0 commented Dec 15, 2023

{
    "console_dumper_default": "indented",
    "xdebug_disable": true,
    "command": "config:dump",
    "core.warn_on_develop": true,
    "core.min_memory_limit": 1610612736,
    "class_to_file.project_root": "%project_root%",
    "class_to_file.brute_force_conversion": true,
    "code_transform.class_new.variants": [],
    "code_transform.template_paths": [
        "%project_config%/templates",
        "%config%/templates"
    ],
    "code_transform.indentation": "    ",
    "code_transform.refactor.generate_accessor.prefix": "",
    "code_transform.refactor.generate_accessor.upper_case_first": false,
    "code_transform.refactor.generate_mutator.prefix": "set",
    "code_transform.refactor.generate_mutator.upper_case_first": true,
    "code_transform.refactor.generate_mutator.fluent": false,
    "code_transform.import_globals": false,
    "code_transform.refactor.object_fill.hint": true,
    "code_transform.refactor.object_fill.named_parameters": true,
    "completion_worse.completor.doctrine_annotation.enabled": true,
    "completion_worse.completor.imported_names.enabled": true,
    "completion_worse.completor.worse_parameter.enabled": true,
    "completion_worse.completor.named_parameter.enabled": true,
    "completion_worse.completor.constructor.enabled": true,
    "completion_worse.completor.class_member.enabled": true,
    "completion_worse.completor.scf_class.enabled": true,
    "completion_worse.completor.local_variable.enabled": true,
    "completion_worse.completor.declared_function.enabled": true,
    "completion_worse.completor.declared_constant.enabled": true,
    "completion_worse.completor.declared_class.enabled": true,
    "completion_worse.completor.expression_name_search.enabled": true,
    "completion_worse.completor.use.enabled": true,
    "completion_worse.completor.attribute.enabled": true,
    "completion_worse.completor.class_like.enabled": true,
    "completion_worse.completor.type.enabled": true,
    "completion_worse.completor.keyword.enabled": true,
    "completion_worse.completor.docblock.enabled": true,
    "completion_worse.completor.constant.enabled": false,
    "completion_worse.completor.class.limit": 100,
    "completion_worse.name_completion_priority": "proximity",
    "completion_worse.snippets": true,
    "completion_worse.experimantal": false,
    "completion_worse.debug": false,
    "completion.dedupe": true,
    "completion.dedupe_match_fqn": true,
    "completion.limit": null,
    "navigator.destinations": [],
    "navigator.autocreate": [],
    "rpc.store_replay": false,
    "rpc.replay_path": "%cache%/replay.json",
    "source_code_filesystem.project_root": "%project_root%",
    "language_server_code_transform.import_globals": false,
    "worse_reflection.enable_cache": true,
    "worse_reflection.cache_lifetime": 1,
    "worse_reflection.enable_context_location": true,
    "worse_reflection.cache_dir": "%cache%/worse-reflection",
    "worse_reflection.diagnostics.undefined_variable.suggestion_levenshtein_disatance": 4,
    "file_path_resolver.app_name": "phpactor",
    "file_path_resolver.enable_cache": true,
    "file_path_resolver.enable_logging": true,
    "logging.enabled": false,
    "logging.fingers_crossed": false,
    "logging.path": "application.log",
    "logging.level": "warning",
    "logger.name": "logger",
    "logging.formatter": null,
    "composer.enable": true,
    "composer.autoloader_path": "%project_root%/vendor/autoload.php",
    "composer.autoload_deregister": true,
    "composer.class_maps_only": true,
    "console.verbosity": 32,
    "console.decorated": null,
    "php.version": null,
    "language_server.catch_errors": true,
    "language_server.enable_workspace": true,
    "language_server.method_alias_map": [],
    "language_server.diagnostic_sleep_time": 1000,
    "language_server.diagnostics_on_update": true,
    "language_server.diagnostics_on_save": true,
    "language_server.diagnostics_on_open": true,
    "language_server.diagnostic_providers": null,
    "language_server.diagnostic_outsource": true,
    "language_server.file_events": true,
    "language_server.file_event_globs": [
        "**/*!(blade).php"
    ],
    "language_server.profile": false,
    "language_server.trace": false,
    "language_server.shutdown_grace_period": 200,
    "language_server.self_destruct_timeout": 2500,
    "language_server.diagnostic_outsource_timeout": 5,
    "language_server_completion.trim_leading_dollar": false,
    "language_server_reference_reference_finder.reference_timeout": 60,
    "language_server_worse_reflection.workspace_index.update_interval": 100,
    "language_server_worse_reflection.inlay_hints.enable": false,
    "language_server_worse_reflection.inlay_hints.types": false,
    "language_server_worse_reflection.inlay_hints.params": true,
    "language_server_indexer.workspace_symbol_search_limit": 250,
    "language_server_code_transform.import_name.report_non_existing_names": true,
    "indexer.enabled_watchers": [
        "lsp",
        "inotify",
        "find",
        "php"
    ],
    "indexer.index_path": "%cache%/index/%project_id%",
    "indexer.include_patterns": [
        "**/*!(blade).php"
    ],
    "indexer.exclude_patterns": [
        "**/Tests/**/*",
        "**/tests/**/*"
    ],
    "indexer.poll_time": 5000,
    "indexer.buffer_time": 500,
    "indexer.follow_symlinks": false,
    "indexer.project_root": "%project_root%",
    "indexer.reference_finder.deep": true,
    "indexer.implementation_finder.deep": true,
    "object_renderer.template_paths.markdown": [
        "%project_config%/templates/markdown",
        "%config%/templates/markdown"
    ],
    "language_server_phpstan.level": null,
    "language_server_psalm.show_info": true,
    "language_server_psalm.use_cache": true,
    "language_server_psalm.error_level": null,
    "language_server_php_cs_fixer.env": {
        "XDEBUG_MODE": "off",
        "PHP_CS_FIXER_IGNORE_ENV": true
    },
    "language_server_php_cs_fixer.show_diagnostics": true,
    "blackfire.enabled": false,
    "prophecy.enabled": false,
    "behat.enabled": false,
    "behat.symfony.di_xml_path": null,
    "symfony.enabled": false,
    "completion_worse.completor.symfony.enabled": true,
    "phpunit.enabled": false,
    "container.extension_classes": [
        "Phpactor\\Extension\\Core\\CoreExtension",
        "Phpactor\\Extension\\ClassToFileExtra\\ClassToFileExtraExtension",
        "Phpactor\\Extension\\ClassToFile\\ClassToFileExtension",
        "Phpactor\\Extension\\ClassMover\\ClassMoverExtension",
        "Phpactor\\ClassMover\\Extension\\ClassMoverExtension",
        "Phpactor\\Extension\\CodeTransform\\CodeTransformExtension",
        "Phpactor\\Extension\\CodeTransformExtra\\CodeTransformExtraExtension",
        "Phpactor\\Extension\\CompletionExtra\\CompletionExtraExtension",
        "Phpactor\\Extension\\CompletionWorse\\CompletionWorseExtension",
        "Phpactor\\Extension\\Completion\\CompletionExtension",
        "Phpactor\\Extension\\CompletionRpc\\CompletionRpcExtension",
        "Phpactor\\Extension\\Navigation\\NavigationExtension",
        "Phpactor\\Extension\\ContextMenu\\ContextMenuExtension",
        "Phpactor\\Extension\\Rpc\\RpcExtension",
        "Phpactor\\Extension\\SourceCodeFilesystemExtra\\SourceCodeFilesystemExtraExtension",
        "Phpactor\\Extension\\SourceCodeFilesystem\\SourceCodeFilesystemExtension",
        "Phpactor\\Extension\\WorseReflection\\WorseReflectionExtension",
        "Phpactor\\Extension\\WorseReflectionExtra\\WorseReflectionExtraExtension",
        "Phpactor\\Extension\\WorseReflectionAnalyse\\WorseReflectionAnalyseExtension",
        "Phpactor\\Extension\\FilePathResolver\\FilePathResolverExtension",
        "Phpactor\\Extension\\Logger\\LoggingExtension",
        "Phpactor\\Extension\\ComposerAutoloader\\ComposerAutoloaderExtension",
        "Phpactor\\Extension\\Console\\ConsoleExtension",
        "Phpactor\\Extension\\WorseReferenceFinder\\WorseReferenceFinderExtension",
        "Phpactor\\Extension\\ReferenceFinderRpc\\ReferenceFinderRpcExtension",
        "Phpactor\\Extension\\ReferenceFinder\\ReferenceFinderExtension",
        "Phpactor\\Extension\\Php\\PhpExtension",
        "Phpactor\\Extension\\Configuration\\ConfigurationExtension",
        "Phpactor\\Extension\\ComposerInspector\\ComposerInspectorExtension",
        "Phpactor\\Extension\\LanguageServer\\LanguageServerExtension",
        "Phpactor\\Extension\\LanguageServerCompletion\\LanguageServerCompletionExtension",
        "Phpactor\\Extension\\LanguageServerReferenceFinder\\LanguageServerReferenceFinderExtension",
        "Phpactor\\Extension\\LanguageServerWorseReflection\\LanguageServerWorseReflectionExtension",
        "Phpactor\\Extension\\LanguageServerIndexer\\LanguageServerIndexerExtension",
        "Phpactor\\Extension\\LanguageServerHover\\LanguageServerHoverExtension",
        "Phpactor\\Extension\\LanguageServerBridge\\LanguageServerBridgeExtension",
        "Phpactor\\Extension\\LanguageServerCodeTransform\\LanguageServerCodeTransformExtension",
        "Phpactor\\Extension\\LanguageServerSelectionRange\\LanguageServerSelectionRangeExtension",
        "Phpactor\\Extension\\LanguageServer\\LanguageServerExtraExtension",
        "Phpactor\\Extension\\LanguageServerDiagnostics\\LanguageServerDiagnosticsExtension",
        "Phpactor\\Extension\\LanguageServerRename\\LanguageServerRenameExtension",
        "Phpactor\\Extension\\LanguageServerRename\\LanguageServerRenameWorseExtension",
        "Phpactor\\Extension\\LanguageServerConfiguration\\LanguageServerConfigurationExtension",
        "Phpactor\\Indexer\\Extension\\IndexerExtension",
        "Phpactor\\Extension\\ObjectRenderer\\ObjectRendererExtension",
        "Phpactor\\Extension\\LanguageServerPhpstan\\LanguageServerPhpstanExtension",
        "Phpactor\\Extension\\LanguageServerPhpstan\\LanguageServerPhpstanSuggestExtension",
        "Phpactor\\Extension\\LanguageServerPsalm\\LanguageServerPsalmExtension",
        "Phpactor\\Extension\\LanguageServerPsalm\\LanguageServerPsalmSuggestExtension",
        "Phpactor\\Extension\\LanguageServerPhpCsFixer\\LanguageServerPhpCsFixerExtension",
        "Phpactor\\Extension\\LanguageServerPhpCsFixer\\LanguageServerPhpCsFixerSuggestExtension",
        "Phpactor\\Extension\\LanguageServerBlackfire\\LanguageServerBlackfireExtension",
        "Phpactor\\Extension\\Prophecy\\ProphecyExtension",
        "Phpactor\\Extension\\Prophecy\\ProphecySuggestExtension",
        "Phpactor\\Extension\\Behat\\BehatExtension",
        "Phpactor\\Extension\\Behat\\BehatSuggestExtension",
        "Phpactor\\Extension\\Symfony\\SymfonyExtension",
        "Phpactor\\Extension\\Symfony\\SymfonySuggestExtension",
        "Phpactor\\Extension\\PHPUnit\\PHPUnitExtension",
        "Phpactor\\Extension\\Debug\\DebugExtension"
    ]
}

but make sure to clear the cache every time u update the config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants